Unresolved Reference on first Attempt to build Topic is solved

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
kbmatson
In need of some credit
In need of some credit
Posts: 7
Joined: Tue Apr 24, 2018 8:44 pm

Unresolved Reference on first Attempt to build

Post by kbmatson » Tue Apr 24, 2018 8:55 pm

Hi - new to C++ and brand new to wxWidgets.

building wxSmith frame form in CodeBlocks.
I followed all instructions for installs and compiling and seemed to have everything going well. Created new wxWidgets project and sure enough a blank form comes up along with all the toolbars and stuff to build my form - GREAT!

Now - I do a build and run before adding anything or changing any code just to see my blank form come up, and here's the problem. I get a ton of errors along the line of:

||=== Build: Debug in VSP (compiler: GNU GCC Compiler) ===|
C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u.a(monolib_window.o):window.cpp|| undefined reference to `[email protected]'|
C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u.a(monolib_window.o):window.cpp|| undefined reference to `[email protected]'|
C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u.a(monolib_window.o):window.cpp|| undefined reference to `[email protected]'|
C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u.a(monolib_window.o):window.cpp|| undefined reference to `[email protected]'|
C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u.a(monolib_window.o):window.cpp|| undefined reference to `[email protected]'|
C:\wxWidgets-3.1.1\lib\gcc_lib\libwxmsw31u.a(monolib_window.o):window.cpp|| undefined reference to `[email protected]'|
.....
and a bunch more similar.

Any help appreciated - feeling a bit overwhelmed at the moment.

User avatar
doublemax
Moderator
Moderator
Posts: 14078
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Unresolved Reference on first Attempt to build

Post by doublemax » Tue Apr 24, 2018 9:22 pm

These missing functions are inside Windows libraries that you need to add in the linker settings.
viewtopic.php?p=183294#p183294
Use the source, Luke!

kbmatson
In need of some credit
In need of some credit
Posts: 7
Joined: Tue Apr 24, 2018 8:44 pm

Re: Unresolved Reference on first Attempt to build

Post by kbmatson » Tue Apr 24, 2018 10:41 pm

thanks - and soory for being a newbie, but how would I know where the library is?

User avatar
doublemax
Moderator
Moderator
Posts: 14078
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Unresolved Reference on first Attempt to build

Post by doublemax » Wed Apr 25, 2018 5:35 am

kbmatson wrote:thanks - and soory for being a newbie, but how would I know where the library is?
It should have come with the compiler, you just have to add the name to the list of libraries in the linker settings.
Use the source, Luke!

New Pagodi
Super wx Problem Solver
Super wx Problem Solver
Posts: 307
Joined: Tue Jun 20, 2006 6:47 pm
Contact:

Re: Unresolved Reference on first Attempt to build

Post by New Pagodi » Wed Apr 25, 2018 6:11 am

I just answered a similar question on stack overflow. Here's a screenshot that shows where to add the 2 extra libraries in codeblocks:

Image

kbmatson
In need of some credit
In need of some credit
Posts: 7
Joined: Tue Apr 24, 2018 8:44 pm

Re: Unresolved Reference on first Attempt to build

Post by kbmatson » Wed Apr 25, 2018 10:10 pm

cool - that worked. now my form wont close when i click the x - I'll start figuring that out!

THANKS!

Post Reply