Author Topic: which library I need for wxWidgets project in Debug mode?  (Read 4157 times)

Offline DreamCT

  • Multiple posting newcomer
  • *
  • Posts: 13
which library I need for wxWidgets project in Debug mode?
« on: May 28, 2007, 03:03:48 pm »
Hi~
My wxWidets project was well done in "Release" build target.
The library of that project is only one; "wxmsw28u_gcc_cb.dll".

But today I add "Debug" build target for special need.
As I think that above dll is for release, I compile wx2.8.4 for 'unicode dll debug', the result file is wxmsw28u_vc_cusom.dll.

But link error was occured as followed.
=>undefined reference to '_imp__wxDefaultSize'
=>undefined reference to '_imp__wxDefaultPosition'
=>undefined reference to '_imp__ZN7wxFrame6CreateEP8wxWindowiRK8...
...

So I link all of the other library for non-dll. but result is same.

How can I build wxWidgets project for Debug mode?

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: which library I need for wxWidgets project in Debug mode?
« Reply #1 on: May 28, 2007, 03:22:42 pm »
Debug target needs Debug Lib of wxWidgets. You can't link Release lib in Debug mode, at least with VC.
Be a part of the solution, not a part of the problem.

Offline DreamCT

  • Multiple posting newcomer
  • *
  • Posts: 13
Re: which library I need for wxWidgets project in Debug mode?
« Reply #2 on: May 29, 2007, 02:48:07 am »
Debug target needs Debug Lib of wxWidgets. You can't link Release lib in Debug mode, at least with VC.
ok..of course Debug target needs Debug Lib.

My first write above had contained a mistake. "wxmsw28u_core_vc_custom.dll" is a typographic error of "wxmsw28ud_core_vc_custom.dll".

In other words, in Release mode I linked wxmsw28u_gcc_cb.dll and in Debug mode I linked wxmsw28u_core_vc_custom.dll. The result is... Release mode  worked pretty well, but the other did not work.

My environment is.. cb3975 & wx2.8.4 & vc8.0(for building wx lib).

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: which library I need for wxWidgets project in Debug mode?
« Reply #3 on: May 29, 2007, 03:40:51 am »
Your dll for release is monolithic while your DLL for debug is multilib. This means you have an issue to me.
Why are you changing two things at once. Please try doing an monolithic debug or do an multilib release build next. Do not try to change them both at once till you know more.

Note, changing the compiler makes it three things at once.

You should decide are you doing an Static or DLL build?
If Static, I suggest multilib.
If DLL, I suggest monolithic build.

If you decide to do multilib build, you need to list more libraries than just one. The base dll and core dll is a good start, but there is other wxWidgets libraries that might need listed. The order libraries are listed matters with some compilers I have no idea if it matters with MSVC or not.

Here's a possible wxWidgets build command, I have not tested it, but it should work.
it is for monolithic debug unicode DLL.

remember to change dir to build\msw
Code
CALL "%VS80COMNTOOLS%vsvars32.bat"
nmake -f makefile.vc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=debug UNICODE=1 clean
nmake -f makefile.vc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=debug UNICODE=1

Tim S
« Last Edit: May 29, 2007, 04:11:53 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org