Author Topic: build options help  (Read 3604 times)

Offline blue orb

  • Multiple posting newcomer
  • *
  • Posts: 25
build options help
« 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 :)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: build options help
« Reply #1 on: November 06, 2011, 11:38:29 pm »
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.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Radek

  • Multiple posting newcomer
  • *
  • Posts: 104
Re: build options help
« Reply #2 on: November 07, 2011, 04:28:38 pm »
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.

Offline blue orb

  • Multiple posting newcomer
  • *
  • Posts: 25
Re: build options help
« Reply #3 on: November 07, 2011, 07:53:49 pm »
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