Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » CDT 3.0.1 Managed Make and GNU/MinGW Make
CDT 3.0.1 Managed Make and GNU/MinGW Make [message #158579] Mon, 21 November 2005 06:06 Go to next message
Eclipse UserFriend
Originally posted by: cgozzini.robur.it

Hi all,
I just upgraded to CDT 3.0.1 from from CDT 2.1.0 on Windows (details of
versions below), building some old Managed Make projects I obtain:

*** multiple target patterns. Stop.

The problem is in this line of the generated makefile:

[...]
# Tool invocations
my.exe: $(OBJS) $(USER_OBJS)
[...]

If I manually delete the "$(USER_OBJS)", and manually invoke the make, it
all build just fine.

Version 2.1.0 used to generate simply "my.exe: $(OBJS)" and worked just
fine.


Is this expected? Is it now mandatory to use a custom-made makefile instead
of Managed Make to use MinGW's make with CDT? Is there something I'm
missing?


I'm using:
Windows XP
Eclipse 3.1.1
CDT 3.0.1
GNU Make 3.80 (included in both MinGW and Cygwin)


Thank you all,
--
Cristiano G. Gozzini
Managed Make and external libraries [was: CDT 3.0.1 Managed Make and GNU/MinGW Make] [message #158848 is a reply to message #158579] Wed, 23 November 2005 08:30 Go to previous message
Eclipse UserFriend
Originally posted by: cgozzini.robur.it

Hi again,
I've finally resolved.
I try to describe the problem for anyone else that might be in a similar
situation. (Maybe it's an obvious task to most of you, but it proved tricky
for me.)

The point could be re-stated as: what's the proper way to link external
libraries with Managed Make?

The "USER_OBJS" of the previous message were two MS SDK libraries (with .Lib
extensions) which I want to link together with my compiled objects, so I
specified them in the "GCC C++ Linker" -> "Miscellaneous" -> "Other object"
panel (with full path and extension), and with CDT 2.1.0 this just worked.
With CDT 3.0.1 this solution seem to work only at link level (it puts the
libraries simply after the .o in the command line, with no option) but fails
at compile level, since (so it seems) the "Other object" are managed just as
other .o files.

The proper way seems to be:

- add the external libraries names, WITHOUT .Lib EXTENSION and WITHOUT THE
PATH, in the "GCC C++ Linker" -> "Libraries" -> "Libraries" panel
(corresponding to the -l option)
- add the external libraries path in the "GCC C++ Linker" -> "Libraries" ->
"Library search path" (corresponding to the -L option)
- ensure to use g++, and not ld, as link command (which is default, in fact,
but I changed it too during the various attempt)


Cheers,
--
Cristiano G. Gozzini


"Cristiano Gozzini" <cgozzini@robur.it> ha scritto nel messaggio
news:dls9q0$nl0$1@news.eclipse.org...
> Hi all,
> I just upgraded to CDT 3.0.1 from from CDT 2.1.0 on Windows (details of
> versions below), building some old Managed Make projects I obtain:
>
> *** multiple target patterns. Stop.
>
> The problem is in this line of the generated makefile:
>
> [...]
> # Tool invocations
> my.exe: $(OBJS) $(USER_OBJS)
> [...]
>
> If I manually delete the "$(USER_OBJS)", and manually invoke the make, it
> all build just fine.
>
> Version 2.1.0 used to generate simply "my.exe: $(OBJS)" and worked just
> fine.
>
>
> Is this expected? Is it now mandatory to use a custom-made makefile
instead
> of Managed Make to use MinGW's make with CDT? Is there something I'm
> missing?
>
>
> I'm using:
> Windows XP
> Eclipse 3.1.1
> CDT 3.0.1
> GNU Make 3.80 (included in both MinGW and Cygwin)
>
>
> Thank you all,
> --
> Cristiano G. Gozzini
>
>
Previous Topic:Defines while indexing
Next Topic:make instead of build in Managed Make
Goto Forum:
  


Current Time: Thu May 08 04:13:12 EDT 2025

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

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

Back to the top