Irrlicht on Linux
-
- Posts: 32
- Joined: Fri Jan 21, 2005 9:32 pm
- Location: Genoa (Italy)
Irrlicht on Linux
Hello guys,
can someone tell me how to configure the libraries for working with Irrlicht on Linux?
I tried to pass to g++ the .a files as options:
g++ mysource.cpp -libIrrlicht.a .....
but /usr/bin/ld doesn't find them (I've placed them in my app's same directory)
any suggestion?
can someone tell me how to configure the libraries for working with Irrlicht on Linux?
I tried to pass to g++ the .a files as options:
g++ mysource.cpp -libIrrlicht.a .....
but /usr/bin/ld doesn't find them (I've placed them in my app's same directory)
any suggestion?
Hi there,
i had some trouble compilling the first tutorial, this is what finally worked for me:
Of course you have to change the pathname according to your installation...
If i misunderstood your problem, please ignore my post.
so long
andreas
i had some trouble compilling the first tutorial, this is what finally worked for me:
Code: Select all
g++ -I/usr/include/irrlicht/ -o main main.c -lIrrlicht
If i misunderstood your problem, please ignore my post.
so long
andreas
-
- Posts: 32
- Joined: Fri Jan 21, 2005 9:32 pm
- Location: Genoa (Italy)
-
- Posts: 62
- Joined: Fri Jan 07, 2005 4:37 pm
- Location: California
Code: Select all
g++ main.cpp -o main -I"[path to IRR include]/include" -I"/usr/X11R6/include" -L"/usr/X11R6/lib" -L"[path to irr lib]/lib/Linux" -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lz -ljpeg
-L where the irrlich lib is located.
The other libs use ld to fine em...
I keep my libs / includes in the Irrlicht dir, so that i can have multiple versions of the engine without having to keep more than a makefile up-to-date.
(note.. if you untar source and end up modifying it, remove old include dir and make a sybolic link from ./Irrlicht/include --- to ---> ./Irrlicht/source/Irrlicht/include)
-
- Posts: 32
- Joined: Fri Jan 21, 2005 9:32 pm
- Location: Genoa (Italy)
here's what happens
pinkfloyd@pinkfloyd:~/Desktop/programmazione/3d/progs $ g++ model.cpp -o model -I"/h*/p*/D*/pro*/3d/irr*/inc*/" -I"/usr/X11R6/include" -L"/h*/p*/D*/pro*/3d/irr*/lib/" -L"/usr/X11R6/lib" -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lz -ljpeg /usr/bin/ld: cannot find -lIrrlicht
collect2: ld returned 1 exit status
I'm sure that the include and lib directories are true
I've also tried to keep them in an easier path (simply "/include/" and "/lib/") but I always get that error:
cannot find lIrrlicht
pinkfloyd@pinkfloyd:~/Desktop/programmazione/3d/progs $ g++ model.cpp -o model -I"/h*/p*/D*/pro*/3d/irr*/inc*/" -I"/usr/X11R6/include" -L"/h*/p*/D*/pro*/3d/irr*/lib/" -L"/usr/X11R6/lib" -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lz -ljpeg /usr/bin/ld: cannot find -lIrrlicht
collect2: ld returned 1 exit status
I'm sure that the include and lib directories are true
I've also tried to keep them in an easier path (simply "/include/" and "/lib/") but I always get that error:
cannot find lIrrlicht
-
- Posts: 32
- Joined: Fri Jan 21, 2005 9:32 pm
- Location: Genoa (Italy)
Hi again.
OK, i'll explain how it works on my system, but in short, i guess the problem is that you don't specify the path to libIrrlicht.a correctly (I think it needs a "-L")...
so, my system:
-Gentoo Linux with kernel 2.6.10,
-Irrlicht version 0.7 (extracted zip, not the ebuild)
the important paths:
the code from tutorial1 copy & pasted, see http://irrlicht.sourceforge.net/tut001.html
the location where i unziped the irrlicht.zip
this is the path of needed X libraries
Now to compile main.cpp while in the directory /home/sensen/Coden i simply run:
I hope this helps, a short notice of success would be nice
so long,
Andreas
OK, i'll explain how it works on my system, but in short, i guess the problem is that you don't specify the path to libIrrlicht.a correctly (I think it needs a "-L")...
so, my system:
-Gentoo Linux with kernel 2.6.10,
-Irrlicht version 0.7 (extracted zip, not the ebuild)
the important paths:
Code: Select all
/home/sensen/Coden/main.cpp
the code from tutorial1 copy & pasted, see http://irrlicht.sourceforge.net/tut001.html
Code: Select all
/opt/noebuild/irrlicht
Code: Select all
/usr/X11R6
Now to compile main.cpp while in the directory /home/sensen/Coden i simply run:
Code: Select all
g++ -I/opt/noebuild/irrlicht/include/ -o main main.cpp -L/opt/noebuild/irrlicht/lib/Linux/ -lIrrlicht -L/usr/X11R6 -lX11 -lXxf86vm -ljpeg -lz -lGL
so long,
Andreas
-
- Posts: 32
- Joined: Fri Jan 21, 2005 9:32 pm
- Location: Genoa (Italy)