Author Topic: Link errors when trying to build a static version of my wxWidget program  (Read 3351 times)

Offline zorro

  • Single posting newcomer
  • *
  • Posts: 8
I've managed to instal C::B and wxWidgets under windows. When i tried to execute my first generated program it complained about a missing wxmsw26_gcc_custom.dll. Putting this DLL in the same directory as where my application is located worked fine but is a bit unsatisfactory.

1) How can I tell my application where to find wxmsw26_gcc_custom.dll?

Then I tried to avoid using this DLL by making a static version of wxWidgets. I've change a few compiler/linker directories but the linker gives numerous undefined references. (I've also recompiled the wxWidgets stuff with build option SHARED turned off.)

2) What goes wrong?

Thanks in advance.

Offline dje

  • Lives here!
  • ****
  • Posts: 683
Re: Link errors when trying to build a static version of my wxWidget program
« Reply #1 on: December 06, 2006, 10:03:09 am »
Hi !!

Quote
How can I tell my application where to find xmsw26_gcc_custom.dll?

You can change your environment PATH variable.

For more details, http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/loadlibrary.asp

Quote
What goes wrong?
I already followed wxWidgets procedure using mingw and there was no problem but I need to rework a little makefile.gcc file to make it compliant with CodeBlocks RC2 version.
How do you build it ?

Dje

Offline zorro

  • Single posting newcomer
  • *
  • Posts: 8
Re: Link errors when trying to build a static version of my wxWidget program
« Reply #2 on: December 06, 2006, 10:22:09 am »
Hi,

Quote
I already followed wxWidgets procedure using mingw and there was no problem but I need to rework a little makefile.gcc file to make it compliant with CodeBlocks RC2 version.
How do you build it ?

I've just followed the instructions on http://www.wxwidgets.org/wiki/index.php/CodeBlocks_Setup_Guide by typing

mingw32-make.exe -f makefile.gcc clean USE_XRC=1 SHARED=0 MONOLITHIC=1 BUILD=release UNICODE=0

in the command prompt.

So, I didn't change the makefile.
Thanks again.



Offline dje

  • Lives here!
  • ****
  • Posts: 683
Re: Link errors when trying to build a static version of my wxWidget program
« Reply #3 on: December 06, 2006, 10:47:34 am »
If your static building problem is still there, can you send the command/log ?

Offline zorro

  • Single posting newcomer
  • *
  • Posts: 8
Re: Link errors when trying to build a static version of my wxWidget program
« Reply #4 on: December 07, 2006, 08:06:56 am »
The problem is more or less solved: I switched to the latest nightly built version of C::B and apparently the IDE was able to call the linker correctly. At least is seems as there were no errors in my static wx libraries. Still, i don't know how tell C::B 1r2 how to make a static executable. Moreover, I've still problems with setting search paths correctly, but a will post this question as a separate item.

Again thanks for your reply