libwxmsw28.a missing out of the box? Topic is solved

If you are using wxDev-C++ for your wxWidgets design, please ask your questions here instead of in IDE Related.
Post Reply
thavinator
In need of some credit
In need of some credit
Posts: 2
Joined: Mon Nov 21, 2011 10:32 pm

libwxmsw28.a missing out of the box?

Post by thavinator »

For starters, I've already read and followed the advice in the following threads:
http://forums.wxwidgets.org/viewtopic.php?f=28&t=22952
http://forums.wxwidgets.org/viewtopic.php?f=28&t=20009

I've downloaded and installed wxDev-C++ (using both the internet installer and the "full download", several attempts with each). Straight out of the box, creating a new wxWidgets Frame or Dialog project and then trying to build it gives me "cannot find -lwxmsw28". Sure enough, libwxmsw28.a doesn't exist on my computer. I have libwxmswu.a, but I presume that's not the same thing (unicode related?). I've tried downloading additional wxWidgets-related DevPacks, but AFAICT, none give me libwxmsw28.a. What gives, is there something I'm missing here? Should wxDev be looking at libwxmswu.a (_UNICODE is set in preprocessor directives)? I tried pulling over the missing files from wxPack, but that leads to a ton of undefined reference errors from the linker, which some other research suggests is due to a compiler mismatch between wxPack and wxDev--I realize I should be able to compile wxWidgets myself to match, but I spent most of yesterday trying to do that so I could use it with Code::Blocks to no avail, which was the whole reason I started trying to use wxDev today!

Any advice would be greatly appreciated.
peteh
Earned a small fee
Earned a small fee
Posts: 16
Joined: Fri Jan 29, 2010 4:37 pm

Re: libwxmsw28.a missing out of the box?

Post by peteh »

The latest build of wxwidgets is Unicode so you need to go into:

Project > Project Options > Additional Command-line options

and in the Linker pane change

-lwxmsw28, -lwxmsw28_gl, and -lwxregex to -lwxmsw28u, -lwxmsw28u_gl and -lwxregexu.
thavinator
In need of some credit
In need of some credit
Posts: 2
Joined: Mon Nov 21, 2011 10:32 pm

Re: libwxmsw28.a missing out of the box?

Post by thavinator »

Hooray!

I looked at that before, but the Linker pane already lists -lwxregexu, and lists -lwxmsw28u & -lwxmsw28u_gl by environment variable (-l$(WXLIBNAME) and -l$(WXLIBNAME)_gl), so I had naively assumed that the environment variables would have been set correctly. Changing them to -l$(WXLIBNAME)u and -l$(WXLIBNAME)u_gl in the linker pane makes the project build correctly. After googling WXLIBNAME, I discovered that selecting "Unicode Support" under Tools->Compiler Options->[WxWidgets pane] accomplishes the same thing.

Thanks!
danny
In need of some credit
In need of some credit
Posts: 1
Joined: Wed Nov 30, 2011 4:47 pm

Re: libwxmsw28.a missing out of the box?

Post by danny »

Hello,

I'm very newbie to c++ and I have found wxdev-c++ while looking for a IDE software for develop a program for cycling managment.
I have installed wxdev-c++ and if I try to compile a wxwidgets frame application debug show the error "cannot find -lwxmsw28".
I try the thavinator' s solution but without success.

My Project\Project Options\Parameters linker list it's:

-mwindows
-l$(WXLIBNAME)
-l$(WXLIBNAME)_gl
-lwxtiff
-lwxjpeg
-lwxpng
-lwxzlib
-lwxregexu
-lwxexpat
-lkernel32
-luser32
-lgdi32
-lcomdlg32
-lwinspool
-lwinmm
-lshell32
-lcomctl32
-lole32
-loleaut32
-luuid
-lrpcrt4
-ladvapi32
-lwsock32
-lodbc32
-lopengl32

Someone can help me? thanks.
tbreina
Moderator
Moderator
Posts: 1289
Joined: Thu Nov 25, 2004 7:38 pm
Location: Coronado, CA

Re: libwxmsw28.a missing out of the box?

Post by tbreina »

Yes, I goofed on the latest release. I thought I had set the wxWidgets options to use Unicode, but that didn't happen. I'm working on a 7.4.1 release as we speak to handle the extra step.

In the meantime, you just need to go to Tools->Compiler Options->wxWidgets and select the checkbox for "Unicode support". Once you do that, it will correctly add the "u" to the library name automatically.

For existing projects, you'll also need to add "_UNICODE" to the Preprocessor Definitions in Project->Project Options->Parameters and do a Rebuild All.

Sorry for the mix up.

-Tony
Everybody's got something to hide except for me and my monkey.
Post Reply