Author Topic: wxwidgets build and compile problem  (Read 6322 times)

Offline poda19

  • Multiple posting newcomer
  • *
  • Posts: 10
wxwidgets build and compile problem
« on: August 04, 2011, 10:51:24 am »
Hi, i have a problem
i have installed wxpack in win xp sp3
when i create a project and check the 'use wxwidgets dll', the program builds and runs fine. but when i compile it and run the .exe file it gives this error: "The application couldn't start, because 'wxmsw28u_gcc.dll" was not found."
then if i unckeck the 'use wxwidgets dll', the program won't be built and it gives "undefined reference to _Unwind_*" errors.

additional information: i have read WxWindowsQuickRef, it says it is a bulid problem for wxwidgets. but as i have installed wxpack it doesn't make sense.
i use global variable for wxwidgets location in project.
when i check the wxwidgets directory, in dll folder there are many dlls but there is not wxmsw28u_gcc.dll.other dlls with similar names are there.
wxwidgets are not in same drive with gcc and codeblocks

i know it was discussed in a topic before but that didn't help.

thanks in advise
« Last Edit: August 04, 2011, 10:55:18 am by poda19 »
"Common sense is the most fairly distributed thing in the world, for each one thinks he is so well-endowed with it."<br />Rene Descartes

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: wxwidgets build and compile problem
« Reply #1 on: August 04, 2011, 11:12:56 am »
then if i unckeck the 'use wxwidgets dll', the program won't be built and it gives "undefined reference to _Unwind_*" errors.
Remember, that you need to re-build is you are changing the underlying framework.
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 poda19

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: wxwidgets build and compile problem
« Reply #2 on: August 04, 2011, 11:26:06 am »
i don't understand, i'm not rebuilding anything, just trying to build my GUI hello world
in create new project options, if i check the 'use dll', it  builds but .exe doesn't run. if i don't check it it doesn't even build.
"Common sense is the most fairly distributed thing in the world, for each one thinks he is so well-endowed with it."<br />Rene Descartes

Offline Freem

  • Almost regular
  • **
  • Posts: 219
Re: wxwidgets build and compile problem
« Reply #3 on: August 04, 2011, 01:29:06 pm »
when i check the wxwidgets directory, in dll folder there are many dlls but there is not wxmsw28u_gcc.dll.other dlls with similar names are there.

Is there is a wxmsw28u_gcc_custom.dll ?
If the problem is the one about I think, then it is because you don't use an official build of wxWidgets (wxPack is not official if I remember correctly) and so the name of dll is not wxmsw28u_gcc.dll. The most probable is that it's name is wxmsw28u_gcc_custom.dll.

If it is this problem you have, try to modify in your C::B's project the dll name (adding the "_custom" part).

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: wxwidgets build and compile problem
« Reply #4 on: August 04, 2011, 03:35:23 pm »
when i check the wxwidgets directory, in dll folder there are many dlls but there is not wxmsw28u_gcc.dll.other dlls with similar names are there.
wxwidgets are not in same drive with gcc and codeblocks

And, the DLL names you have are what?

Note: Some versions of wxPack use different Compiler Versions that are not compatible with other Compilers of the same name; but different version/builds.

Tim S.
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

Offline poda19

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: wxwidgets build and compile problem
« Reply #5 on: August 06, 2011, 08:35:09 pm »
sorry i didn't check for your response yesterday, i looked in the dll directory again today and i found the dll!
i don't know maybe midnight coding is ****ing my eyes. :shock:
then i copied the dll in system32 folder and now the .exe is working fine.
thank you very much for your answers
"Common sense is the most fairly distributed thing in the world, for each one thinks he is so well-endowed with it."<br />Rene Descartes

Offline Freem

  • Almost regular
  • **
  • Posts: 219
Re: wxwidgets build and compile problem
« Reply #6 on: August 10, 2011, 02:28:12 pm »
Duh... I didn't check your post too, I'm sorry.
But NEVER copy files yourself in the "C:\WINDOWS\system32"!
This can lead you to DLL HELL, if your application is linked with a lib's version which is not binary compatible with the one you have, you'll run into strange bugs.

Windows look in 2 positions when looking for a dll:
_ first, the directory of the executable file
_ second, all directories in %PATH%

I recommend you to put dll with your exe file, this is the easier and the less error-prone solution.
If you are compiling many wxwidgets applications, just add the dll directory in the path. The day you will want to remove wxWidgets, you won't have to search in windows to remove the files you added many months (or years, if windows is stable enough :D) ago.