Instead of adding all the .cpp files...

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
monkeycracks
Posts: 1029
Joined: Thu Apr 06, 2006 12:45 am
Location: Tennesee, USA
Contact:

Post by monkeycracks »

One more little addon...

I can easily just add Rawloader.cpp to the main project where its actually used but due to all the functions i'll be implementing, doing a Build All would be very very lengthy and inappropriate, so a .a sounds like the best thing to do but its not working either =(
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

I had a similar problem...
If you compile the project the compiler creates an .o file for each cpp file...
you can simply copy the .o file of the cpp you want and rename it to .a (not really necessary)...
Then you remove the cpp file from the project and link to the .a (.o) file !!!
But you still have to include the .h that belongs to the cpp file, so don't do any public declarations inside the cpp, do it only in the .h file or you don't have access to them !!!
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
monkeycracks
Posts: 1029
Joined: Thu Apr 06, 2006 12:45 am
Location: Tennesee, USA
Contact:

Post by monkeycracks »

but you'll have to link to each .a seperately? (its no problem, just wondering)
monkeycracks
Posts: 1029
Joined: Thu Apr 06, 2006 12:45 am
Location: Tennesee, USA
Contact:

Post by monkeycracks »

Nevermind, it doesn't matter because it also gets the same linker errors as if I used my own made .a...
monkeycracks
Posts: 1029
Joined: Thu Apr 06, 2006 12:45 am
Location: Tennesee, USA
Contact:

Post by monkeycracks »

You'll never guess how I fixed it..
:D

I put the opengl libs after the lib that contained my raw loader. Now I'm contemplating how bad its going to hurt to crush my monitor with my face -.-
Post Reply