Author Topic: Build fails with  (Read 5160 times)

Offline blinkinhek

  • Multiple posting newcomer
  • *
  • Posts: 17
Build fails with
« on: October 25, 2005, 11:40:52 pm »
I get the following (extracted from a long list of errors) when building my first wxWidgets (with THIS IDE) app.

Linking executable: C:\CodeBlocks\projects\test\test.exe
.objs\base.o:base.cpp:(.text$_ZN6wxMenuC1El[wxMenu::wxMenu(long)]+0x1d): variable 'vtable for wxMenu' can't be auto-imported. Please read the documentation for ld's --enable-auto-import for details.
etc, etc

If I use WXUSINGDLL as per the Wiki, then I can get the build done ... but I should be able to link the Libraries.... what am I doing wrong? (I believe I have the libs identified in the project options)

As an extra .... am I able to add project definitions like libraries in the wx widgets project template?

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Build fails with
« Reply #1 on: October 26, 2005, 09:15:04 am »
Quote
If I use WXUSINGDLL as per the Wiki, then I can get the build done ... but I should be able to link the Libraries.... what am I doing wrong? (I believe I have the libs identified in the project options)
Well, is it compiled or not? Does it work or not?
If you have built wx as DLL then you must use WXUSINGDLL.

Quote
As an extra .... am I able to add project definitions like libraries in the wx widgets project template?
Look in share/codeblocks/templates/wxwidgets*.cbp. You can edit them at will.
Be patient!
This bug will be fixed soon...

Offline blinkinhek

  • Multiple posting newcomer
  • *
  • Posts: 17
Re: Build fails with
« Reply #2 on: October 26, 2005, 10:10:19 am »
Quote
If I use WXUSINGDLL as per the Wiki, then I can get the build done ... but I should be able to link the Libraries.... what am I doing wrong? (I believe I have the libs identified in the project options)

Well, is it compiled or not? Does it work or not?
If you have built wx as DLL then you must use WXUSINGDLL.

when I use WXUSINGDLL, then the app compiles and links, and executes OK. 
I built wx following the steps in the Codeblocks Wiki which gives:
"mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=0 VENDOR=cb"

Does this produce a DLL version ?
If so then, I hadn't realised, and I now feel really stupid :{

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Build fails with
« Reply #3 on: October 26, 2005, 10:48:42 am »
Yes, SHARED=1 produces a DLL :)
Be patient!
This bug will be fixed soon...