fir*_*cdt 29 c++ eclipse makefile eclipse-cdt
我用Eclipse(helios)CDT构建了一个hello world C++项目.它汇编得很好.但我想看一下生成的Makefile CDT.我在项目文件夹/调试/发布文件夹或src文件夹中找不到它.我在哪里可以找到这个Makefile?
aha*_*ala 17
如果使用默认设置current builder = CDT internal builder,则没有make文件.如果选择current builder = GNU make,您将在调试文件夹中看到makefile.
Hug*_*Poi 16
在Windows上,
单击您的项目,转到菜单project- > properties,选择Tool Chain Editor然后选择Current Builder Gnu Make Builder.
现在构建一个目标生成makefile.

默认情况下,您应该有[workspace]/[project folder]/Debug/makefile.您是否对默认环境进行了任何更改?
这是来自Helios(windows/cygwin)安装的HelloWorld示例项目makefile:
################################################################################
# Automatically-generated file. Do not edit!
################################################################################
-include ../makefile.init
RM := rm -rf
# All of the sources participating in the build are defined here
-include sources.mk
-include subdir.mk
-include src/subdir.mk
-include objects.mk
ifneq ($(MAKECMDGOALS),clean)
ifneq ($(strip $(C++_DEPS)),)
-include $(C++_DEPS)
endif
ifneq ($(strip $(C_DEPS)),)
-include $(C_DEPS)
endif
ifneq ($(strip $(CC_DEPS)),)
-include $(CC_DEPS)
endif
ifneq ($(strip $(CPP_DEPS)),)
-include $(CPP_DEPS)
endif
ifneq ($(strip $(CXX_DEPS)),)
-include $(CXX_DEPS)
endif
ifneq ($(strip $(C_UPPER_DEPS)),)
-include $(C_UPPER_DEPS)
endif
endif
-include ../makefile.defs
# Add inputs and outputs from these tool invocations to the build variables
# All Target
all: HelloWorld.exe
# Tool invocations
HelloWorld.exe: $(OBJS) $(USER_OBJS)
@echo 'Building target: $@'
@echo 'Invoking: Cygwin C++ Linker'
g++ -o"HelloWorld.exe" $(OBJS) $(USER_OBJS) $(LIBS)
@echo 'Finished building target: $@'
@echo ' '
# Other Targets
clean:
-$(RM) $(C++_DEPS)$(OBJS)$(C_DEPS)$(CC_DEPS)$(CPP_DEPS)$(EXECUTABLES)$(CXX_DEPS)$(C_UPPER_DEPS) HelloWorld.exe
-@echo ' '
.PHONY: all clean dependents
.SECONDARY:
-include ../makefile.targets
我唯一能想到的是没有创建makefile.单击您的项目,转到菜单project- > properties,C/C++ Build在左窗格中选择,并确保Generate Makefiles automatically选中该复选框.
| 归档时间: |
|
| 查看次数: |
42433 次 |
| 最近记录: |