Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: poda19 on August 04, 2011, 10:51:24 am

Title: wxwidgets build and compile problem
Post by: poda19 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
Title: Re: wxwidgets build and compile problem
Post by: MortenMacFly 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.
Title: Re: wxwidgets build and compile problem
Post by: poda19 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.
Title: Re: wxwidgets build and compile problem
Post by: Freem 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).
Title: Re: wxwidgets build and compile problem
Post by: stahta01 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.
Title: Re: wxwidgets build and compile problem
Post by: poda19 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
Title: Re: wxwidgets build and compile problem
Post by: Freem 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.