User forums > Help

wxWidgets 2.4.2

(1/2) > >>

David Perfors:
I am trying to install/add wxWidgets to my installation of CodeBlocks, but when I try to run he wxWidgets template, I get the error that the linker could not find -lwxmsw241.

I know it should be in my lib directory, and there is libwxmsw.a but when I rename it, I get a lot of errors/warnings/etc.

My question, which package of wxWidgets should I use to install? just wxMSW-2.4.2.zip?

and whenI've got the rigth package, what is the problem than?

mandrav:
Yes, the template contains a linker option for the wxWidgets 2.4.1 library. Go to project options and, in the "Linker options" tab, change the line that says -lwxmsw241 to -lwxmsw (erase "241").
Then it should work fine :)

Yiannis.

David Perfors:
hmm. it still doesn't work :( I think there is something wrong with my installation of wxwidgets. I get a lot of undefined references... any tips?

--edit--

I have download the setup file, and now I see that I have to compile it first  :?
So I first trying that.. hope it works

David Perfors:
I am trying to get wxwidgets compilled on my Windows box for while now, but I can't get it working :( does someone knows a pre-compiled package which I could download?  :?:

mandrav:

--- Quote from: mispunt ---I am trying to get wxwidgets compilled on my Windows box for while now, but I can't get it working :( does someone knows a pre-compiled package which I could download?  :?:
--- End quote ---


Building wxWidgets on windows, using mingw gcc is really a no-brainer.
Assuming you decompressed wxWidgets in C:\tmp, all you have to do is:


--- Code: ---
cd c:\tmp\wxWidgets-2.4.2\src\msw
mingw32-make -f makefile.g95 WXMAKINGDLL=1 FINAL=1 UNICODE=0

--- End code ---

If you don't want to build wxWidgets as a DLL set WXMAKINGDLL=0.
FINAL=0 means that no debug info should be left inside the generated library. For UNICODE=0, you figure out what it means :wink:

After the build is done, copy C:\tmp\wxWidgets-2.4.2\include\wx\* to C:\MinGW\include\wx\* (assuming a default mingw installation).
Also copy C:\tmp\wxWidgets-2.4.2\lib\*.a to C:\MinGW\lib. Finally copy C:\tmp\wxWidgets-2.4.2\lib\wxmsw242.dll to C:\Windows\System32.
That's it.
For every project you 're building that uses wxWidgets, you just have to link it to libwxmsw242.a

HTH,
Yiannis.

Navigation

[0] Message Index

[#] Next page

Go to full version