Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » CDT » Linker parameters
Linker parameters [message #518438] Thu, 04 March 2010 01:29 Go to previous message
Alex Farber is currently offline Alex Farber
Messages: 44
Registered: February 2010
Member
I have wxWidget application which contains this code:
http://wiki.wxwidgets.org/Compiling_and_getting_started

Compiling it from the command line:
alex@alex-linux:~/Tmp$ g++ `wx-config --cppflags` `wx-config --libs` widgetTest.cpp
/tmp/ccMcZC6J.o: In function `wxCreateApp()':
widgetTest.cpp:(.text+0x2d): undefined reference to `wxAppConsole::CheckBuildOptions(char const*, char const*)'
...
widgetTest.cpp:(.text._ZN20wxThreadHelperThreadD0Ev[wxThreadHelperThread::~wxThreadHelperThread()]+0x16): undefined reference to `wxThread::~wxThread()'
collect2: ld returned 1 exit status

A lot of linker errors. Now, if I change command line, moving linker flags to the end, build succeeds:
g++ `wx-config --cppflags` widgetTest.cpp  `wx-config --libs`


When I build the same code from Eclipse CDT, in the Project Settings, GCC C++ Compiler, I add these flags: `wx-config --cppflags`. For linker I add these flags: `wx-config --libs`. Result is linker errors, as in the first command line.
How can I reproduce the second command line solution in the CDT project? If exist working command line, it must be some way to do the same in CDT.

[Updated on: Thu, 04 March 2010 01:30]

Report message to a moderator

 
Read Message
Read Message
Previous Topic:generate an assembly file from a C++ source
Next Topic:cross-platform development question
Goto Forum:
  


Current Time: Thu May 23 23:36:16 EDT 2013

Powered by FUDForum. Page generated in 0.01720 seconds