DevC++ Recompile Engine

A forum to store posts deemed exceptionally wise and useful
Post Reply
soconne
Posts: 87
Joined: Fri Mar 05, 2004 2:00 pm

DevC++ Recompile Engine

Post by soconne »

I'm now sure if this has already been asked in the forums, I've looked and searched but did not find a thread on it.

But here's my question, I'm trying to recompile the engine in DevC++ and it's giving me the following errors:


5 D:\Irrlicht0.6\irrlicht-0.6\source\source\CAnimatedMeshMD2.cpp
In file included from CAnimatedMeshMD2.cpp
30 D:\Irrlicht0.6\irrlicht-0.6\source\source\CAnimatedMeshMD2.h:8
IAnimatedMeshMD2.h: No such file or directory.
23 D:\Irrlicht0.6\irrlicht-0.6\source\source\CAnimatedMeshMD2.h:9
IReadFile.h: No such file or directory.
23 D:\Irrlicht0.6\irrlicht-0.6\source\source\CAnimatedMeshMD2.h:10
S3DVertex.h: No such file or directory.
23 D:\Irrlicht0.6\irrlicht-0.6\source\source\CAnimatedMeshMD2.h:10
S3DVertex.h: No such file or directory.
19 D:\Irrlicht0.6\irrlicht-0.6\source\source\CAnimatedMeshMD2.h:11
array.h: No such file or directory.
23 D:\Irrlicht0.6\irrlicht-0.6\source\source\CAnimatedMeshMD2.h:12
irrString.h: No such file or directory.


And a bunch more just like it. I don't know why it's not seeing these files, I opened the DevC++ project file from the source directory. Anybody know how to solve this ?
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

No idea. It works for me and for most other users. Maybe it helps you to try out the DevCpp Devpack?
soconne
Posts: 87
Joined: Fri Mar 05, 2004 2:00 pm

Post by soconne »

I'm such an idiot. I just needed to go to Project Settings and add the source/include dir to my list of DevC++ Include Directories.

But now I'm getting the following errors:

[Linker error] undefined reference to `inflateInit2_'

[Linker error] undefined reference to `inflate'

[Linker error] undefined reference to `inflateEnd'


And some others relating to the JPEG library. I've used DevC++ 4 and 5, and all I did was open the project file included with the Irrlicht source, and I didn't change anything, and I'm getting these errors. Any ideas?
guest1

Post by guest1 »

Go to Project Options (Alt-P I think) and make sure your linker parameters look something like this:

--no-export-all-symbols
--add-stdcall-alias
-lgdi32
-lglu32
-lopengl32
-lz
-ljpeg
-ld3dx9d
guest1

Post by guest1 »

sorry for extra post.. I figure I should explain what that means.

The irrlicht source uses zlib and jpeglib, so it references functions in those library files. You must tell the linker that you're going to be using those libraries. the actual file is called "libjpeg.a" and "libz.a" but the linker knows to take the "lib" part off of the front and the ".a" part off of the back. the "-l" option tells the linker to link that library into the executable as well.

BTW, it's possible to link tons of libraries you will never use into the executable, inflating the size considerably. If you're linker happy, just turn on "strip executable" in the linker options and it'll remove all the stuff you never used in the code.
soconne
Posts: 87
Joined: Fri Mar 05, 2004 2:00 pm

Post by soconne »

This is really really wierd !! I get the same error after pasting those linker statements into my project settings.......arrgghh :-(

I guess I'll just have to mess around with it more
guest1

Post by guest1 »

no idea man... those are linker errors, so the linker options should clear them up. More info? Perhaps it's a different error this time.
etcaptor
Posts: 871
Joined: Fri Apr 09, 2004 10:32 pm
Location: Valhalla
Contact:

Post by etcaptor »

I have no roubles with compiling with DevCPP,
but, when I use compiled irrlicht dll, i get this error:
This application has fail to start because libjpeg6b.dll was not found
Any Idea?
Must I to make additional compile for jpeglib and zlib libraries?
Monkey
Posts: 6
Joined: Mon Jan 12, 2004 10:22 pm

Post by Monkey »

@etcaptor:

I'd got the same trouble after updating the packages within dev-cpp. This was caused by different versions of libjpeg und libz in the lib-directory of dev-cpp. I have replaced them with the ones from the irrlicht-source-directory and everything is ok ...

Greetings, Thomas
etcaptor
Posts: 871
Joined: Fri Apr 09, 2004 10:32 pm
Location: Valhalla
Contact:

Post by etcaptor »

Thanks, I solved problem 3 days after my post here, but already forgotte what was the reason. It was related with project options.
soconne
Posts: 87
Joined: Fri Mar 05, 2004 2:00 pm

Post by soconne »

How did you fix it, I'm still getting errors.
Pentium M Centrino 2.2Ghz
1.5GB DDR2
6800 Ultra Go 256MB
80GB 5400 rpm
17"
etcaptor
Posts: 871
Joined: Fri Apr 09, 2004 10:32 pm
Location: Valhalla
Contact:

Post by etcaptor »

Don't remember - now all works well and I can only post project options ok?

Include directories:
C:\3d Engines\irrlicht-0.6\INCLUDE

Library directories:
C:\Development\Irrlicht\gppjpeglib
C:\3d Engines\irrlicht-0.6\SOURCE\ZLIB

Parameters:
Compiler:
-DIRRLICHT_EXPORTS=1
C++Compiler:
-DIRRLICHT_EXPORTS=1
Linker
--no-export-all-symbols --add-stdcall-alias -lgdi32 -lglu32 -lopengl32 -ljpeg -lz


Maybe this help you.

Take a look that dll files are only for MS compiler. DevCPP uses files with .a extension.
Guest

Post by Guest »

For anyone having problems with this too (I was:)

I think the issue is that the libs in the source\zlib and source\jpeglib aren't compiled for dev c++, so won't link properly.

I changed the lib directory to \irrlicht\lib\DevCpp and that fixed it. It would be better to get the libs compiling for dev c++ too, but I went for the quick option.
Post Reply