I am having trouble getting the Irrlicht examples (v1.5) to correctly compile and run with the Irrlicht library statically linked in Dev-C++ (in Windows Vista).
As an example of this problem, if I open the Collision example (#7) by loading its "example.dev", I can compile and run successfully using the Irrlicht.dll. However, I haven't had much success with the static library and this example.
To show how I attempted this:
I downloaded the latest build containing the static library from http://irrlicht.convextech.ca/ , then changed the linker options to the correct static .a file (around 11 MB), and added -D_IRR_STATIC_LIB_ to the C++ compiler options. I also added -lgdi32 -lopengl32 -lglu32 -lm -lwinmm to the linker options (after the Irrlicht library, on separate lines).
It compiled fine with no warnings, but crashed on run.
The debugger reported an error in the setMaterialTexture() function in the ISceneNode.h file on line 405:
getMaterial(i).MaterialType = newType;
It also gave an error: "Could not watch this variable".
I tried various linker configurations after googling, including various orders. Still no luck.
What am I missing?
Problems with Static Linking and Dev-C++
-
- Admin
- Posts: 3590
- Joined: Mon Oct 09, 2006 9:36 am
- Location: Scotland - gonnae no slag aff mah Engleesh
- Contact:
1) Dev-C++ is just using mingw, so it should be able link against a static lib.
2) I don't use Dev-C++ so I don't know why it doesn't link, and I (personally) won't be supporting the .dev projects. It would be great if those users who want to keep using it submit patches to keep them up to date.
2) I don't use Dev-C++ so I don't know why it doesn't link, and I (personally) won't be supporting the .dev projects. It would be great if those users who want to keep using it submit patches to keep them up to date.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way