Eclipse CDT生成的Makefile在哪里?

发布于 2024-10-05 18:11:44 字数 139 浏览 3 评论 0原文

我已经使用 Eclipse(helios) CDT 构建了一个 hello world C++ 项目。它编译得很好。但我想看一下生成的 Makefile CDT。我在项目文件夹/调试/发布文件夹或 src 文件夹中找不到它。我在哪里可以找到这个 Makefile?

I've built a hello world C++ project with Eclipse(helios) CDT. It compiled fine. But I would like to take a look at the Makefile CDT generated. I can't find it in project folder/debug/release folders or in the src folders. Where can I find this Makefile?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

夜司空 2024-10-12 18:11:44

在 Windows 上,

单击您的项目,转到菜单 project -> properties,选择Tool Chain Editor,然后在Current Builder中选择Gnu Make Builder

现在构建一个目标并生成 makefile。

当前构建器 Gnu Make Builder

http://help.eclipse.org/helios/index.jsp?topic=%2Forg.eclipse.cdt。 doc.user%2Freference%2Fcdt_u_prop_build_toolchain.htm

On Windows,

Click your project, go to menu project -> properties, select Tool Chain Editor then select in Current Builder Gnu Make Builder.

Build a target now generate makefile.

Current builder Gnu Make Builder

http://help.eclipse.org/helios/index.jsp?topic=%2Forg.eclipse.cdt.doc.user%2Freference%2Fcdt_u_prop_build_toolchain.htm

夏尔 2024-10-12 18:11:44

如果您使用当前构建器 = CDT 内部构建器的默认设置,则没有 make 文件。
如果您选择current builder = GNU make,您将在调试文件夹中看到makefile。

If you use the default setttings with current builder = CDT internal builder, there is no make file.
if you select current builder = GNU make, you will see the makefile in the debug folder.

空城缀染半城烟沙 2024-10-12 18:11:44

我唯一能想到的是 makefile 没有创建。单击您的项目,进入菜单 project -> properties,在左侧窗格中选择 C/C++ Build,并确保选中自动生成 Makefiles 复选框。

The only thing I can think of is that the makefile isn't created. Click your project, go to menu project -> properties, select C/C++ Build in the left pane, and make sure the Generate Makefiles automatically checkbox is checked.

£烟消云散 2024-10-12 18:11:44

默认情况下,您应该有[工作空间]/[项目文件夹]/Debug/ma​​kefile。您对默认环境进行过任何更改吗?

以下是来自 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

By default you should have [workspace]/[project folder]/Debug/makefile. Have you made any changes to the default environment?

Here's the HelloWorld sample project makefile from a Helios (windows/cygwin) installation:

################################################################################
# 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
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文