Code::Blocks Forums
User forums => Help => Topic started by: blue orb on November 06, 2011, 10:59:12 pm
-
have spent many hours searching the net for facts about compiler build options.
there is a dearth of information out there.. i am a bit stuck on this subject.
is there a list anywhere of what linker settings and search directories should be used?
i am using wxPack 2.8.12 installed on my c: drive.
what linker settings/search directories do i use with wxWidgets/wxsmith?
this is much-wanted knowledge :)
-
wxSmith is just a code generator and it generates wxWidgets code.
So, if your project has been setup for wxWidgets, it will work with wxSmith.
I've never used wxPack, but I guess you have to inspect the install of wxPack, you need to search for .dll and .a files. Then depending on your project settings (what wx config you're using) different libraries should be used.
You can use depends.exe and nm + grep to see what symbols every library file provides.
Linking an application to wx is tough task, especially for a beginner.
-
There are "linker settings" and "search directories" in the Build Options of your project. The linker settings should contain "wx-config --libs" and the search directories should contain "wx-config --cxxflags". The wx-config is, in fact, a script, which will produce the libpath and the include path along with other compiler and linker settings. Open a console and run wx-config with "--libs" and "--cxxflags" like any other console app. This way you can find out how is your program compiled and linked. Supposing your question is related to the not found headers, the following results are possible:
(1) wx-config will not be found. The simplest way of fixing the problem is copying wx-config somewhere on the path. Because wx-config failed, no include directories and no libraries were added to your project.
(2) wx-config will be found but the include paths will not contain directories with your headers or libraries. You can add the directories youself to the Build Options or you can create links to your directories (and libraries) somewhere on the paths produced by wx-config.
-
thank you for your posts!
i am determined to learn this thing :)
it is a problem with header files... #include <wx/wx.h> woes.
did you people learn this stuff in college?
there's almost nothing about this on the net = including nearly every forum post that i have googled.
can you recommend a book or something?
thanks