User forums > Using Code::Blocks
wxWidgets DLL problem
Dastas:
Hello,
I have compiled wxWidgets using the commands from http://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_2.6.2_to_develop_Code::Blocks_%28MSW%29
I have created a GUI application which compiles and runs fine from the compiler, but when I attempt to run it from the release dir, I get the following error: "This application has failed to start because wxmsw28u_gcc_custom.dll was not found. Re-installing the application ...".
I have read in another thread that this might have something to do with the SHARED flag. I have also recompiled with SHARED = 0 (I just used clean and build commands. Did I have to uninstall something before?)
I'm running out of ideas. I don't want to have to distribute this DLL with the application.
Any suggestions appreciated, thanks.
stahta01:
I suggest looking at these directions
http://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_2.8.6_to_develop_Code::Blocks_(MSW%29
Since your program wants the 2.8 DLL as it asks for wxmsw28u_gcc_custom.dll
Tim S
stahta01:
--- Quote from: Dastas on May 13, 2008, 08:17:10 pm ---I'm running out of ideas. I don't want to have to distribute this DLL with the application.
--- End quote ---
FYI: I would distribute the DLL as a separate download. Helping people compile the DLL the DLL is work.
Or do you not wish to use the DLL and instead make a Static build? With a Static build the EXE will contain the wxWidgets code so it will be larger.
To do a Static build compile wxWidgets using SHARED=0; then change you program to use the static library.
The way to do this varies, sometimes you just change "gcc_dll" to "gcc_lib".
Tim S
Dastas:
--- Quote from: stahta01 on May 14, 2008, 01:53:23 am ---
--- Quote from: Dastas on May 13, 2008, 08:17:10 pm ---I'm running out of ideas. I don't want to have to distribute this DLL with the application.
--- End quote ---
FYI: I would distribute the DLL as a separate download. Helping people compile the DLL the DLL is work.
Or do you not wish to use the DLL and instead make a Static build? With a Static build the EXE will contain the wxWidgets code so it will be larger.
To do a Static build compile wxWidgets using SHARED=0; then change you program to use the static library.
The way to do this varies, sometimes you just change "gcc_dll" to "gcc_lib".
Tim S
--- End quote ---
I don't mind if the exe is bigger, I just don't want to have to distribute anything else except the exe.
That is correct, I don't want to use the DLL at all. Could you please explain how to make a Static built? As I said, I first compiled with SHARED = 1, read that it should be SHARED=0, so I ran the compile command with BUILD=release clean, then the command at http://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_2.8.6_to_develop_Code::Blocks_(MSW%29 with SHARED=0. No errors occured, but I wonder, was this enough or should I have done something more to uninstall the previous compiled version?
Also, how would I change my program to use the static library? I have no idea what it uses right now, nor how I can check...
stahta01:
--- Quote from: Dastas on May 14, 2008, 12:16:13 pm ---Also, how would I change my program to use the static library? I have no idea what it uses right now, nor how I can check...
--- End quote ---
Note, the four steps below can be done in the IDE in the search directory settings area.
1. Backup your project cbp file.
2. Open the project cbp file in a text editor
3. Look for gcc_dll in the text editor.
If found, change to gcc_lib
4. save changes
If the above does not work, I need to know how you created the project. Wizard? And, Wizard options?
Or you can post the cbp file if it is small enough.
Mainly just need these areas of cbp file Compiler and Linker
--- Code: --- <Compiler>
<Add option="-Wall" />
<Add option="-g" />
<Add option="-pipe" />
<Add option="-mthreads" />
<Add option="-fmessage-length=0" />
<Add option="-fexceptions" />
<Add option="-Winvalid-pch" />
<Add option="-DHAVE_W32API_H" />
<Add option="-D__WXMSW__" />
<Add option="-DWXUSINGDLL" />
<Add option="-DcbDEBUG" />
<Add option="-DCB_PRECOMP" />
<Add option="-DWX_PRECOMP" />
<Add option="-DwxUSE_UNICODE" />
<Add directory="$(#WX.include)" />
<Add directory="$(#WX.lib)\gcc_dll$(WX_CFG)\msw$(WX_SUFFIX)" />
<Add directory="include\wxscintilla\include" />
<Add directory="include\tinyxml" />
</Compiler>
--- End code ---
--- Code: --- <Linker>
<Add library="wxmsw28$(WX_SUFFIX)" />
<Add directory="base\tinyxml" />
<Add directory="$(#WX.lib)\gcc_dll$(WX_CFG)" />
</Linker>
--- End code ---
Tim S
Navigation
[0] Message Index
[#] Next page
Go to full version