hi, i've just compiled the demo i've been making on linux (mandriva) and when i run my app the window just flashes and dissapears, yes before you ask i have got a main loop. I get this output in the console:
Irrlicht Engine version 0.6
Linux
Creating X window...
Starting fullscreen mode...
Connecting glx context to window...
Window created.
OpenGL Renderer.
OpenGL driver version is 1.2 or better.
Multitexturing disabled.
Loaded texture: #DefaultFont
JPEG parameter struct mismatch: library thinks size is 464, caller expects 428
i think the last line is an error message, but i have know idea what it means.
Can anyone help?
Signatures suck cos i can never think wot to write!
The one Irrlicht library was compiled with. If you just link against -ljpeg you will usually get the one installed in /usr/lib or somewhere else in your system. But you will need the one provided with Irrlicht (or the one you used during compilation of Irrlicht). You can use an absolute path to the Irrlicht jpeg lib instead of using the -ljpeg switch by adding /path/to/irrlicht/Libs/libjpeg.a as an additional object file if you cannot figure out how to set library search paths.
You have three possibilities:
1. the easy one - delete irrlicht/lib/Linux/libjpeg.a
1. the bad one - add directory irrlicht/lib/Linux to your /etc/ld.so.conf (before /usr/lib) and execute ldconfig (can break other apps)
3. the best one - change your Makefile
from
Don't worry about the difference in Makefile including from /usr/X11R6/lib and executing from /usr/lib. Standard linuxes have libjpeg on both places; usually hardlinked.
Sorry, but this is nonsense. You're thinking about shared libraries, whereas libjpeg is built as an object archive for Irrlicht. If you're linking with -ljpeg this does not make any difference, i.e. both versions can be used for linking. During run-time it makes a difference, though. If you linked against libjpeg.a this link is done statically, i.e. all objects from libjpeg are included in the executable. If you're using shared libs, final linking is done during execution time. But you may even mix these two forms as long as the header files used during compiling Irrlicht and the ones delivered with your version of libjpeg are the same.
In the case mentioned n this thread the structs do not match, i.e. headers were different. Fortunately the programmers of libjpeg cared for this, otherwise this would have been a possible security problem.
Anyway, if you're using Irrlicht as available from the SDK, or you compiled it using unaltered sources, you are best off using a static binding with the libjpeg version that comes with Irrlicht.
Otherwise you can set your linker search path with -L/path/to/libs. But since libjpeg is in a standard search path you will have to change Irrlicht linking against the local libjpeg to the one on your system. Note that you also have to change include paths which are set by -I/path/to/incs
If you did not recompile Irrlicht itself you have to use the libraries coming with the distribution. In order to link with these files use -L/your/path/to/Irrlicht/Libs -lIrrlicht -ljpeg -lz
You should only be sure to have no other link directory between -lIrrlicht and -ljpeg
In case you recompiled Irrlicht library you have to use the very same include and link parameters as used at that time to include the same headers and libraries.
If nothing helps you may want to post your Makefile to get some hints on it.
Open a console and type glxinfo. Look for the word Mesa in the output. If you see it, you're running OpenGL in software, without hardware acceleration. Turn to Google to find information on how to remedy this for your card.