wxGLCanvas constructor [RESOLVED]

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
ionstream
Earned a small fee
Earned a small fee
Posts: 23
Joined: Wed Jan 05, 2005 6:49 pm

wxGLCanvas constructor [RESOLVED]

Post by ionstream » Sat Apr 09, 2005 9:41 pm

Please note that I do know this topic has come up alot, and I have extensively searched the wxWidgets forum with no avail. I'm using the free MS VC++ 2003 toolkit and wxWidgets 2.5.5.

I am trying to use wxGLCanvas to make a cross platform 3D editor. When I first tried to write "wxGLCanvas *canvas = new wxGlCanvas(blah)", I got 1 unresolved external symbol. I soon found that I needed to build wxWidgets with wxUSE_GLCANVAS being 1. On my computer, "wx\setup.h" is located in:

Code: Select all

C:\wxWidgets-2.5.5\lib\vc_lib\msw
Is this where it should be, or should it be in the normal include directory?
Anyways, I need to include this directory in my IDE (CodeBlocks) in order for anything to compile, otherwise I get the error "Unable to open file "wx\setup.h".

I changed wxUSE_GLCANVAS to 1 and rebuilt the libraries. I get the same error!

The wxWidgets libraries I have included are wxmsw25_core.lib, wxbase25_net.lib, wxbase25.lib, wxmsw25_adv.lib, and wxmsw25_media.lib. Are these all that I need for wxGLCanvas (besides opengl32.lib and glu32.lib)?
Last edited by ionstream on Sun Apr 10, 2005 11:33 pm, edited 1 time in total.

User avatar
T-Rex
Moderator
Moderator
Posts: 1195
Joined: Sat Oct 23, 2004 9:58 am
Location: Zaporizhzhya, Ukraine
Contact:

Post by T-Rex » Sun Apr 10, 2005 8:28 am

setup.h must be copied from inculde/wx/msw to include/wx after changing wxUSE_GLCANVAS parameter.

ionstream
Earned a small fee
Earned a small fee
Posts: 23
Joined: Wed Jan 05, 2005 6:49 pm

Post by ionstream » Sun Apr 10, 2005 10:15 pm

Thank you! I soon realized that the library wxmsw25_gl.lib was created, and linked with that. It works! Thanks!

Post Reply