Author Topic: what does the new project wizard do when you specify wxWidgets settings exactly?  (Read 4642 times)

Offline ouch

  • Almost regular
  • **
  • Posts: 223
I have a project that was created with the use wx as a DLL option checked. I now would like to link statically, but I'm getting and odd warning message:

Code
c:/tdm-mingw32/bin/../lib/gcc/mingw32/4.5.2/../../../../mingw32/bin/ld.exe: C:\wxwidgets\WX_2_9_0_BRANCH\lib\gcc_lib\/libwxmsw29u.a(monolib_containr.o): warning: duplicate section `.rdata$_ZTV20wxObjectEventFunctor[vtable for wxObjectEventFunctor]' has different size

I have a hunch it's telling me It's still trying to link dynamically but in addition it's linking statically causing this warning.

So I guess my question is if a codeblocks project file has settings somewhere that controls whether an gui app is statically linked or dynamically linked to wxwidgets?

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
So I guess my question is if a codeblocks project file has settings somewhere that controls whether an gui app is statically linked or dynamically linked to wxwidgets?
Yes, you'll need to apply the correct compiler and linker settings for the static version of wxWidgets. Consult the wxWidgets documentation accordingly. Alternatively use the wxWidgets wizard to create yourself a skeleton for using wxWidgets statically.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline ouch

  • Almost regular
  • **
  • Posts: 223
but that's what I mean, Codeblocks itself doesn't have settings for that right? it's all just compiler and linker options right?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Right... What is the problem with that?
Why don't you read the FAQ: http://wiki.codeblocks.org/index.php?title=FAQ ?
(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 ouch

  • Almost regular
  • **
  • Posts: 223
theres nothing wrong with that. These warnings are puzzling me, and I just wanted to make sure that codeblocks itself wasn't responsible for it, and that's it's just my compiler or linking flags or something.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
codeblocks itself wasn't responsible for it, and that's it's just my compiler or linking flags or something.
Code::Blocks does no hocus-pocus magic in the background. You and only your are responsible for setting up your project. The only help are the wizards that create you a skeleton for different libraries / frameworks as a starter. still: The settings might not be complete as soon as you start using extended functionalities.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline ouch

  • Almost regular
  • **
  • Posts: 223
See, you say that but how does it always know what i'm going to type and offer to type it for me? It obviously does in fact do hocus-pocus magic in the background. lol

But seriously, I tried starting a new static project (with the wizard) and it does the same thing. So I'm thinking it's likely a wxwidgets issue.

Just for kicks though, anyone with the svn of 2.9 want to run through the wizard and generate a wxwidgets static linked project and post what the results were?