User forums > Using Code::Blocks

wxWidgets DLL problem

<< < (2/4) > >>

Dastas:
I did those four steps and then I couldn't even run the program from the compiler. It said it can't find a dll file. Also, I found four occurences in my cbp file of "gcc_dll", and I replaced them all. Do I only need to replace some?

I'm posting the fields you asked (before changing anything).


--- Code: --- <Linker>
<Add option="-s" />
<Add library="C:\wxWidgets-2.8.7\lib\gcc_dll\libwxmsw28u.a" />
<Add directory="C:\wxWidgets-2.8.7\lib\gcc_dll" />
</Linker>

--- End code ---


--- Code: --- <Compiler>
<Add option="-Wall" />
<Add option="-pipe" />
<Add option="-mthreads" />
<Add option='[[if (PLATFORM == PLATFORM_MSW &amp;&amp; (GetCompilerFactory().GetCompilerVersionString(_T(&quot;gcc&quot;)) &gt;= _T(&quot;4.0.0&quot;))) print(_T(&quot;-Wno-attributes&quot;));]]' />
<Add option="-Winvalid-pch" />
<Add option="-include wx_pch.h" />
<Add option="-D__GNUWIN32__" />
<Add option="-D__WXMSW__" />
<Add option="-DWXUSINGDLL" />
<Add option="-DwxUSE_UNICODE" />
<Add option="-DWX_PRECOMP" />
<Add directory="C:\wxWidgets-2.8.7\include" />
<Add directory="C:\wxWidgets-2.8.7\contrib\include" />
</Compiler>

--- End code ---

Thanks for your help!

stahta01:
Does the path C:\wxWidgets-2.8.7\lib\gcc_lib exist?

And, does the file libwxmsw28u.a exist in that folder?

Tim S

Dastas:
Yes, the folder exists and that file is in there.

Biplab:

--- 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 ---


--- Quote from: stahta01 on May 14, 2008, 07:35:43 pm ---
--- 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.
...
--- End quote ---

The easier and quicker solution is to ask wxWidgets wizard to create a new empty project which uses statically build wx libraries. Then add your old project files to the empty project.

Dastas:
How would I create such a project? I think I created the current project with Use wxWidgets DLL, built as monolithic library and Enable unicode all checked. Also use precompiled header is checked. Which one would need to be unchecked?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version