Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: jhcook1999 on April 15, 2006, 09:25:15 am

Title: G3D and Widgets shouldn't mix right?
Post by: jhcook1999 on April 15, 2006, 09:25:15 am
I'm trying to create a new project with the G3D Graphics Library, and whenever I try and compile something with it, Code::Blocks gives me an error stating that it can't find <cstdarg> or other such files. And even after I add the directory with those headers in them I get an error stating that it doesn't understand things like "std". This is on my 98 machine.

When I try and compile anything on my XP machine I get a page fault in wxmsw26_gcc_cd.dll my only problem with that is I'm not using any of the widgets libraries or functions, why is it even needed if I'm not using it.
Title: Re: G3D and Widgets shouldn't mix right?
Post by: squizzz on April 15, 2006, 12:49:28 pm
Hi,

Coud you provide informations like

1) Compiler you use
2) Version of Code::Blocks you use. RC2 or nightly build (which revision)?
3) Does simple console application compile?
4) Which template did you use for G3D library?


EDIT:

I found your post at G3D forum (http://sourceforge.net/forum/forum.php?thread_id=1466944&forum_id=262426), which tells more details.
So, did you finally managed to compile library under MinGW? I think it's somehow possible to compile G3D without linking it to wxWidgets (site says it's optional) - so when you import *.dev project file for library, make sure you remove wxWidgets dependencies (Project->Build options->Linker). It may require some headers tweaking...
Title: Re: G3D and Widgets shouldn't mix right?
Post by: thomas on April 15, 2006, 03:56:24 pm
Quote
G3D and Widgets shouldn't mix right?
Actually, G3D is meant to be used with wxWidgets (besides other possibilities).

If you get crashes from inside the wxmsw*  library, then most likely you have managed to produce dll hell on your machine. The DLL that is actually used by the OS is not compatible to the import library you used.

The very same thing happens for example, if you install a nightly build of Code::Blocks over the RC2 version. The wxWidgets libraries were built by different people using different versions and/or build flags and are not binary-compatible. Therefore, if you launch the application: booooom.
Title: Re: G3D and Widgets shouldn't mix right?
Post by: jhcook1999 on April 17, 2006, 06:49:01 pm
@squizzz
Yes it does compile, somewhat, I get alot of little warnings, (conversion from float to int, and other such warnings) but nothing that will stop it from compiling.

And I can do simple "Hello World" consol apps with my XP, my 98 barfs out some error that it doesn't understand "std" and some other error that I can't remember, but is really really simple (I think it had to do something with C++ linking, well it needed the C++ include folder in the compiler options). When I get it back up and running I'll give more details.

@thomas
I'm not sure how I'm in DLL hell when it's a fresh install of C::B and I'd never heard of the widgets library until now (course I'm not sure how I've done alot of the things I've done up until now).

And my Code::Blocks crashes when I try to compile with the #include <G3Dall.h> and library files linked to it (without the include line it compiles fine on my XP machine), I haven't been able to run a program that I've made with G3D yet.

Title: Re: G3D and Widgets shouldn't mix right?
Post by: jhcook1999 on April 22, 2006, 06:08:31 am
Ok, I now have discovered a bug that seems somewhat similar to this.

I was trying to get some very simple programs to compile earlier, and I was messing around basically when I created a completely blank project, and then I compiled it cause I wasn't paying attention, and it started to compile like normal (instead of griping at me for trying to compile an empty project), and then the widgets dll crashed it with the same basic message that happened when I tried to compile a program with G3D. Codeblocks shouldn't be compiling empty projects should it? Also why would an empty project crash the Codeblocks program?