Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » g++ warning: ignoring old commands for target 'xxx.o'(Getting warning in directory that I've specifically told eclipse to remove from build)
g++ warning: ignoring old commands for target 'xxx.o' [message #1809857] Wed, 24 July 2019 23:44 Go to next message
Tim Anderson is currently offline Tim AndersonFriend
Messages: 6
Registered: June 2018
Junior Member
I'm in the process of porting a software package from Visual Studio 2017 on Windows 10 to Eclipse Helios on RHEL 6.9.
On the Windows side there is a single solution with multiple projects under the one solution. When I moved the code to Linux I just copied the source as is so it all ended up as series of directories in a single directory.
I imported the main directory into a project and have been slowly removing the Visual Studio specific data types and in some cases just told eclipse to exclude the resource from the overall build because I didn't want to lose the software that I brought over (just in case I will need it later).
That worked for all but one case where I'm now getting a warning stating that it is 'ignoring old commands for target 'xxx.o'. The line that is being ignored is "echo 'Building file: %<'" in subdirs.mk in the directory that I told eclipse to exclude.
I guess since it's not a part of the original software I could just remove the subdirs.mk file but I'm curious why it's trying to use this makefile when I've told eclipse to exclude it.


There are only 10 kinds of people in the world. Those that understand binary and those that don't.
Re: g++ warning: ignoring old commands for target 'xxx.o' [message #1809865 is a reply to message #1809857] Thu, 25 July 2019 04:10 Go to previous message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
You have multiple recipes for a target.
GNU make only allows one recipe to be specified for a target.
It's telling you the last recipe encountered is being used.
The one exception is a double colon rule.

https://www.gnu.org/software/make/manual/html_node/Error-Messages.html
https://www.gnu.org/software/make/manual/html_node/Multiple-Rules.html#Multiple-Rules
https://www.gnu.org/software/make/manual/html_node/Double_002dColon.html

As for subdirs,mk Eclipse isn't doing anything with it -- make is.

[Updated on: Thu, 25 July 2019 04:14]

Report message to a moderator

Previous Topic:Arduino C++ IDE ignoring .c source files for headers at build
Next Topic:Eclipse CDT on MacOS 10.14.5: "Failed to find a Main Class" ?!
Goto Forum:
  


Current Time: Mon Sep 23 22:38:04 GMT 2024

Powered by FUDForum. Page generated in 0.03458 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top