hello world in linux

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.
Post Reply
roninmagus
Posts: 91
Joined: Fri Oct 31, 2003 5:03 am

hello world in linux

Post by roninmagus »

I followed the hello world tutorial, using the exact code and files, under Red Hat Linux 9.0.

The code compiles fine, but when I run it, it creates a window very fast and then destroys it, with this output:

[davida@maincomp irrlicht2]$ ./a.out
Creating X window...
Starting windowed mode...
Connecting glx context to window...
Window created.
Warning: Could not find texture in Q3 .bsp:textures/common/caulk
JPEG parameter struct mismatch: library thinks size is 464, caller expects 428

I'm using the exact .pk3 file that came with the techdemo. Any ideas what the problem is? Is this a bug? I've found that the last line, "JPEG parameter struct ..." is an error that occurs elsewhere, from a google search. I could not find a solution for it.
daveandrews.org - A Christian Programmer's Weblog | Dusty Engine - A Task Engine for Irrlicht
Guest

Post by Guest »

"Warning: Could not find texture in Q3 .bsp:textures/common/caulk " up to here is fine, the engine doesn't support shaders which im expecting this is, as I get the same when loading this map. It looks more like its a problem with the jpeg libraries, you could try getting the latest version and recompiling the engine - http://www.ijg.org/

I'll give it a go in the morning on my mandrake 9.0 drive, sadly im running windows right now and it's 2:18 in the morning, I've just got back from a night out and I'm in one of my rare non coding (drunk) moods :)

Good night all![/url]
Toasty
Posts: 3
Joined: Fri Nov 14, 2003 3:20 pm

Post by Toasty »

errr ^^ that was me, no idea how I ended up with the url tag on the end :/
/me rotates
darkliquid
Posts: 41
Joined: Sun Nov 09, 2003 10:12 am
Location: UK
Contact:

Post by darkliquid »

I had this exact problem when I first started using irrlicht.
I deleted the premade libraries and recompiled, then everything worked for me.
Also, I made some shared libaries aswell, which I built using my system libraries, not the pre-packaged libz and libjpeg libs. I think my make file went something like this...

Code: Select all

#install prefix, change to wherever you wanna install Irrlicht to
PREFIX=/usr
CPP  = g++
LINKOBJ  = CAnimatedMeshMD2.o CAnimatedMeshMS3D.o CAnimatedMeshSceneNode.o CBillboardSceneNode.o CBspTree.o CBspTreeSceneNode.o CCameraMayaSceneNode.o CCameraSceneNode.o CColorConverter.o CDirectX8Texture.o CFileList.o CFileSystem.o CFPSCounter.o CGUIButton.o CGUICheckBox.o CGUIEnvironment.o CGUIFileOpenDialog.o CGUIFont.o CGUIImage.o CGUIListBox.o CGUIMeshViewer.o CGUIScrollBar.o CGUISkin.o CGUIStaticText.o CGUIWindow.o CIrrDeviceWin32.o CLightSceneNode.o CLimitReadFile.o CMemoryReadFile.o CMeshSceneNode.o COctTreeSceneNode.o COpenGLTexture.o CQ3LevelMesh.o CReadFile.o CSceneManager.o CSceneNodeAnimatorFlyCircle.o CSceneNodeAnimatorRotation.o CSoftwareTexture.o CStaticMeshOBJ.o CSurface.o CSurfaceLoaderBmp.o CSurfaceLoaderJPG.o CSurfaceLoaderPSD.o CSurfaceLoaderTGA.o CTestSceneNode.o CTRFlat.o CTRFlatWire.o CTRGouraud.o CTRGouraudWire.o CTRTextureFlat.o CTRTextureFlatWire.o CTRTextureGouraud.o CTRTextureGouraudWire.o CVideoDirectX8.o CVideoNull.o CVideoOpenGL.o CVideoSoftware.o CZBuffer.o CZipReader.o Irrlicht.o os.o CCameraFPSSceneNode.o CGeometryCreator.o CSceneNodeAnimatorFlyStraight.o CSceneNodeAnimatorTexture.o CDefaultMeshFormatLoader.o CSkyBoxSceneNode.o CShadowVolumeSceneNode.o C3DSMeshFileLoader.o CSceneCollisionManager.o CIrrDeviceStub.o CParticleSystemSceneNode.o CParticleFadeOutAffector.o CParticleBoxEmitter.o CParticlePointEmitter.o CParticleGravityAffector.o CDummyTransformationSceneNode.o CGUIInOutFader.o CIrrDeviceLinux.o CMeshManipulator.o CMetaTriangleSelector.o COctTreeTriangleSelector.o CSceneNodeAnimatorCollisionResponse.o CSceneNodeAnimatorDelete.o CTriangleBBSelector.o CTriangleSelector.o CVideoModeList.o CWaterSurfaceSceneNode.o CGUIMessageBox.o CGUIModalScreen.o

LIBS =  -L/usr/X11R6/lib -lGL -lXxf86vm -lz -ljpeg

CXXINCS = -I"include/"

# you can also try adding optimisation flags like -O3 here
CXXFLAGS = $(CXXINCS) -DIRRLICHT_EXPORTS=1

all: $(LINKOBJ)
	$(CPP) -shared -fPIC $(LINKOBJ) -o libIrrlicht-0.4.1.so
	echo "Library generated, now run make install as root"

install: all
	cp libIrrlicht-0.4.1.so $(PREFIX)/lib
	ln -s $(PREFIX)/lib/libIrrlicht-0.4.1.so $(PREFIX)/lib/libIrrlicht.so
	mkdir -p $(PREFIX)/include/Irrlicht
	cp -R include/* $(PREFIX)/include/Irrlicht/
	ldconfig
	echo "All done! Whoopee!"

clean:
	rm -f libIrrlicht-0.4.1.so
	rm -f *.o

CAnimatedMeshMD2.o: CAnimatedMeshMD2.cpp
	$(CPP) -c CAnimatedMeshMD2.cpp -o CAnimatedMeshMD2.o $(CXXFLAGS)

CAnimatedMeshMS3D.o: CAnimatedMeshMS3D.cpp
	$(CPP) -c CAnimatedMeshMS3D.cpp -o CAnimatedMeshMS3D.o $(CXXFLAGS)

CAnimatedMeshSceneNode.o: CAnimatedMeshSceneNode.cpp
	$(CPP) -c CAnimatedMeshSceneNode.cpp -o CAnimatedMeshSceneNode.o $(CXXFLAGS)

CBillboardSceneNode.o: CBillboardSceneNode.cpp
	$(CPP) -c CBillboardSceneNode.cpp -o CBillboardSceneNode.o $(CXXFLAGS)

CBspTree.o: CBspTree.cpp
	$(CPP) -c CBspTree.cpp -o CBspTree.o $(CXXFLAGS)

CBspTreeSceneNode.o: CBspTreeSceneNode.cpp
	$(CPP) -c CBspTreeSceneNode.cpp -o CBspTreeSceneNode.o $(CXXFLAGS)

CCameraMayaSceneNode.o: CCameraMayaSceneNode.cpp
	$(CPP) -c CCameraMayaSceneNode.cpp -o CCameraMayaSceneNode.o $(CXXFLAGS)

CCameraSceneNode.o: CCameraSceneNode.cpp
	$(CPP) -c CCameraSceneNode.cpp -o CCameraSceneNode.o $(CXXFLAGS)

CColorConverter.o: CColorConverter.cpp
	$(CPP) -c CColorConverter.cpp -o CColorConverter.o $(CXXFLAGS)

CDirectX8Texture.o: CDirectX8Texture.cpp
	$(CPP) -c CDirectX8Texture.cpp -o CDirectX8Texture.o $(CXXFLAGS)

CFileList.o: CFileList.cpp
	$(CPP) -c CFileList.cpp -o CFileList.o $(CXXFLAGS)

CFileSystem.o: CFileSystem.cpp
	$(CPP) -c CFileSystem.cpp -o CFileSystem.o $(CXXFLAGS)

CFPSCounter.o: CFPSCounter.cpp
	$(CPP) -c CFPSCounter.cpp -o CFPSCounter.o $(CXXFLAGS)

CGUIButton.o: CGUIButton.cpp
	$(CPP) -c CGUIButton.cpp -o CGUIButton.o $(CXXFLAGS)

CGUICheckbox.o: CGUICheckBox.cpp
	$(CPP) -c CGUICheckBox.cpp -o CGUICheckBox.o $(CXXFLAGS)

CGUIEnvironment.o: CGUIEnvironment.cpp
	$(CPP) -c CGUIEnvironment.cpp -o CGUIEnvironment.o $(CXXFLAGS)

CGUIFileOpenDialog.o: CGUIFileOpenDialog.cpp
	$(CPP) -c CGUIFileOpenDialog.cpp -o CGUIFileOpenDialog.o $(CXXFLAGS)

CGUIFont.o: CGUIFont.cpp
	$(CPP) -c CGUIFont.cpp -o CGUIFont.o $(CXXFLAGS)

CGUIImage.o: CGUIImage.cpp
	$(CPP) -c CGUIImage.cpp -o CGUIImage.o $(CXXFLAGS)

CGUIListBox.o: CGUIListBox.cpp
	$(CPP) -c CGUIListBox.cpp -o CGUIListBox.o $(CXXFLAGS)

CGUIMeshViewer.o: CGUIMeshViewer.cpp
	$(CPP) -c CGUIMeshViewer.cpp -o CGUIMeshViewer.o $(CXXFLAGS)

CGUIScrollBar.o: CGUIScrollBar.cpp
	$(CPP) -c CGUIScrollBar.cpp -o CGUIScrollBar.o $(CXXFLAGS)

CGUISkin.o: CGUISkin.cpp
	$(CPP) -c CGUISkin.cpp -o CGUISkin.o $(CXXFLAGS)

CGUIStaticText.o: CGUIStaticText.cpp
	$(CPP) -c CGUIStaticText.cpp -o CGUIStaticText.o $(CXXFLAGS)

CGUIWindow.o: CGUIWindow.cpp
	$(CPP) -c CGUIWindow.cpp -o CGUIWindow.o $(CXXFLAGS)

CIrrDeviceWin32.o: CIrrDeviceWin32.cpp
	$(CPP) -c CIrrDeviceWin32.cpp -o CIrrDeviceWin32.o $(CXXFLAGS)

CLightSceneNode.o: CLightSceneNode.cpp
	$(CPP) -c CLightSceneNode.cpp -o CLightSceneNode.o $(CXXFLAGS)

CLimitReadFile.o: CLimitReadFile.cpp
	$(CPP) -c CLimitReadFile.cpp -o CLimitReadFile.o $(CXXFLAGS)

CMemoryReadFile.o: CMemoryReadFile.cpp
	$(CPP) -c CMemoryReadFile.cpp -o CMemoryReadFile.o $(CXXFLAGS)

CMeshSceneNode.o: CMeshSceneNode.cpp
	$(CPP) -c CMeshSceneNode.cpp -o CMeshSceneNode.o $(CXXFLAGS)

COctTreeSceneNode.o: COctTreeSceneNode.cpp
	$(CPP) -c COctTreeSceneNode.cpp -o COctTreeSceneNode.o $(CXXFLAGS)

COpenGLTexture.o: COpenGLTexture.cpp
	$(CPP) -c COpenGLTexture.cpp -o COpenGLTexture.o $(CXXFLAGS)

CQ3LevelMesh.o: CQ3LevelMesh.cpp
	$(CPP) -c CQ3LevelMesh.cpp -o CQ3LevelMesh.o $(CXXFLAGS)

CReadFile.o: CReadFile.cpp
	$(CPP) -c CReadFile.cpp -o CReadFile.o $(CXXFLAGS)

CSceneManager.o: CSceneManager.cpp
	$(CPP) -c CSceneManager.cpp -o CSceneManager.o $(CXXFLAGS)

CSceneNodeAnimatorFlyCircle.o: CSceneNodeAnimatorFlyCircle.cpp
	$(CPP) -c CSceneNodeAnimatorFlyCircle.cpp -o CSceneNodeAnimatorFlyCircle.o $(CXXFLAGS)

CSceneNodeAnimatorRotation.o: CSceneNodeAnimatorRotation.cpp
	$(CPP) -c CSceneNodeAnimatorRotation.cpp -o CSceneNodeAnimatorRotation.o $(CXXFLAGS)

CSoftwareTexture.o: CSoftwareTexture.cpp
	$(CPP) -c CSoftwareTexture.cpp -o CSoftwareTexture.o $(CXXFLAGS)

CStaticMeshOBJ.o: CStaticMeshOBJ.cpp
	$(CPP) -c CStaticMeshOBJ.cpp -o CStaticMeshOBJ.o $(CXXFLAGS)

CSurface.o: CSurface.cpp
	$(CPP) -c CSurface.cpp -o CSurface.o $(CXXFLAGS)

CSurfaceLoaderBmp.o: CSurfaceLoaderBmp.cpp
	$(CPP) -c CSurfaceLoaderBmp.cpp -o CSurfaceLoaderBmp.o $(CXXFLAGS)

CSurfaceLoaderJPG.o: CSurfaceLoaderJPG.cpp
	$(CPP) -c CSurfaceLoaderJPG.cpp -o CSurfaceLoaderJPG.o $(CXXFLAGS)

CSurfaceLoaderPSD.o: CSurfaceLoaderPSD.cpp
	$(CPP) -c CSurfaceLoaderPSD.cpp -o CSurfaceLoaderPSD.o $(CXXFLAGS)

CSurfaceLoaderTGA.o: CSurfaceLoaderTGA.cpp
	$(CPP) -c CSurfaceLoaderTGA.cpp -o CSurfaceLoaderTGA.o $(CXXFLAGS)

CTestSceneNode.o: CTestSceneNode.cpp
	$(CPP) -c CTestSceneNode.cpp -o CTestSceneNode.o $(CXXFLAGS)

CTRFlat.o: CTRFlat.cpp
	$(CPP) -c CTRFlat.cpp -o CTRFlat.o $(CXXFLAGS)

CTRFlatWire.o: CTRFlatWire.cpp
	$(CPP) -c CTRFlatWire.cpp -o CTRFlatWire.o $(CXXFLAGS)

CTRGouraud.o: CTRGouraud.cpp
	$(CPP) -c CTRGouraud.cpp -o CTRGouraud.o $(CXXFLAGS)

CTRGouraudWire.o: CTRGouraudWire.cpp
	$(CPP) -c CTRGouraudWire.cpp -o CTRGouraudWire.o $(CXXFLAGS)

CTRTextureFlat.o: CTRTextureFlat.cpp
	$(CPP) -c CTRTextureFlat.cpp -o CTRTextureFlat.o $(CXXFLAGS)

CTRTextureFlatWire.o: CTRTextureFlatWire.cpp
	$(CPP) -c CTRTextureFlatWire.cpp -o CTRTextureFlatWire.o $(CXXFLAGS)

CTRTextureGouraud.o: CTRTextureGouraud.cpp
	$(CPP) -c CTRTextureGouraud.cpp -o CTRTextureGouraud.o $(CXXFLAGS)

CTRTextureGouraudWire.o: CTRTextureGouraudWire.cpp
	$(CPP) -c CTRTextureGouraudWire.cpp -o CTRTextureGouraudWire.o $(CXXFLAGS)

CVideoDirectX8.o: CVideoDirectX8.cpp
	$(CPP) -c CVideoDirectX8.cpp -o CVideoDirectX8.o $(CXXFLAGS)

CVideoNull.o: CVideoNull.cpp
	$(CPP) -c CVideoNull.cpp -o CVideoNull.o $(CXXFLAGS)

CVideoOpenGL.o: CVideoOpenGL.cpp
	$(CPP) -c CVideoOpenGL.cpp -o CVideoOpenGL.o $(CXXFLAGS)

CVideoSoftware.o: CVideoSoftware.cpp
	$(CPP) -c CVideoSoftware.cpp -o CVideoSoftware.o $(CXXFLAGS)

CZBuffer.o: CZBuffer.cpp
	$(CPP) -c CZBuffer.cpp -o CZBuffer.o $(CXXFLAGS)

CZipReader.o: CZipReader.cpp
	$(CPP) -c CZipReader.cpp -o CZipReader.o $(CXXFLAGS)

Irrlicht.o: Irrlicht.cpp
	$(CPP) -c Irrlicht.cpp -o Irrlicht.o $(CXXFLAGS)

os.o: os.cpp
	$(CPP) -c os.cpp -o os.o $(CXXFLAGS)

CCameraFPSSceneNode.o: CCameraFPSSceneNode.cpp
	$(CPP) -c CCameraFPSSceneNode.cpp -o CCameraFPSSceneNode.o $(CXXFLAGS)

CGeometryCreator.o: CGeometryCreator.cpp
	$(CPP) -c CGeometryCreator.cpp -o CGeometryCreator.o $(CXXFLAGS)

CSceneNodeAnimatorFlyStraight.o: CSceneNodeAnimatorFlyStraight.cpp
	$(CPP) -c CSceneNodeAnimatorFlyStraight.cpp -o CSceneNodeAnimatorFlyStraight.o $(CXXFLAGS)

CSceneNodeAnimatorTexture.o: CSceneNodeAnimatorTexture.cpp
	$(CPP) -c CSceneNodeAnimatorTexture.cpp -o CSceneNodeAnimatorTexture.o $(CXXFLAGS)

CDefaultMeshFormatLoader.o: CDefaultMeshFormatLoader.cpp
	$(CPP) -c CDefaultMeshFormatLoader.cpp -o CDefaultMeshFormatLoader.o $(CXXFLAGS)

CSkyBoxSceneNode.o: CSkyBoxSceneNode.cpp
	$(CPP) -c CSkyBoxSceneNode.cpp -o CSkyBoxSceneNode.o $(CXXFLAGS)

CShadowVolumeSceneNode.o: CShadowVolumeSceneNode.cpp
	$(CPP) -c CShadowVolumeSceneNode.cpp -o CShadowVolumeSceneNode.o $(CXXFLAGS)

C3DSMeshFileLoader.o: C3DSMeshFileLoader.cpp
	$(CPP) -c C3DSMeshFileLoader.cpp -o C3DSMeshFileLoader.o $(CXXFLAGS)

CSceneCollisionManager.o: CSceneCollisionManager.cpp
	$(CPP) -c CSceneCollisionManager.cpp -o CSceneCollisionManager.o $(CXXFLAGS)

CIrrDeviceStub.o: CIrrDeviceStub.cpp
	$(CPP) -c CIrrDeviceStub.cpp -o CIrrDeviceStub.o $(CXXFLAGS)

CParticleSystemSceneNode.o: CParticleSystemSceneNode.cpp
	$(CPP) -c CParticleSystemSceneNode.cpp -o CParticleSystemSceneNode.o $(CXXFLAGS)

CParticleFadeOutAffector.o: CParticleFadeOutAffector.cpp
	$(CPP) -c CParticleFadeOutAffector.cpp -o CParticleFadeOutAffector.o $(CXXFLAGS)

CParticleBoxEmitter.o: CParticleBoxEmitter.cpp
	$(CPP) -c CParticleBoxEmitter.cpp -o CParticleBoxEmitter.o $(CXXFLAGS)

CParticlePointEmitter.o: CParticlePointEmitter.cpp
	$(CPP) -c CParticlePointEmitter.cpp -o CParticlePointEmitter.o $(CXXFLAGS)

CParticleGravityAffector.o: CParticleGravityAffector.cpp
	$(CPP) -c CParticleGravityAffector.cpp -o CParticleGravityAffector.o $(CXXFLAGS)

CDummyTransformationSceneNode.o: CDummyTransformationSceneNode.cpp
	$(CPP) -c CDummyTransformationSceneNode.cpp -o CDummyTransformationSceneNode.o $(CXXFLAGS)

CGUIInOutFader.o: CGUIInOutFader.cpp
	$(CPP) -c CGUIInOutFader.cpp -o CGUIInOutFader.o $(CXXFLAGS)

CIrrDeviceLinux.o: CIrrDeviceLinux.cpp
	$(CPP) -c CIrrDeviceLinux.cpp -o CIrrDeviceLinux.o $(CXXFLAGS)

CMeshManipulator.o: CMeshManipulator.cpp
	$(CPP) -c CMeshManipulator.cpp -o CMeshManipulator.o $(CXXFLAGS)

CMetaTriangleSelector.o: CMetaTriangleSelector.cpp
	$(CPP) -c CMetaTriangleSelector.cpp -o CMetaTriangleSelector.o $(CXXFLAGS)

COctTreeTriangleSelector.o: COctTreeTriangleSelector.cpp
	$(CPP) -c COctTreeTriangleSelector.cpp -o COctTreeTriangleSelector.o $(CXXFLAGS)

CSceneNodeAnimatorCollisionResponse.o: CSceneNodeAnimatorCollisionResponse.cpp
	$(CPP) -c CSceneNodeAnimatorCollisionResponse.cpp -o CSceneNodeAnimatorCollisionResponse.o $(CXXFLAGS)

CSceneNodeAnimatorDelete.o: CSceneNodeAnimatorDelete.cpp
	$(CPP) -c CSceneNodeAnimatorDelete.cpp -o CSceneNodeAnimatorDelete.o $(CXXFLAGS)

CTriangleBBSelector.o: CTriangleBBSelector.cpp
	$(CPP) -c CTriangleBBSelector.cpp -o CTriangleBBSelector.o $(CXXFLAGS)

CTriangleSelector.o: CTriangleSelector.cpp
	$(CPP) -c CTriangleSelector.cpp -o CTriangleSelector.o $(CXXFLAGS)

CVideoModeList.o: CVideoModeList.cpp
	$(CPP) -c CVideoModeList.cpp -o CVideoModeList.o $(CXXFLAGS)

CWaterSurfaceSceneNode.o: CWaterSurfaceSceneNode.cpp
	$(CPP) -c CWaterSurfaceSceneNode.cpp -o CWaterSurfaceSceneNode.o $(CXXFLAGS)

CGUIMessageBox.o: CGUIMessageBox.cpp
	$(CPP) -c CGUIMessageBox.cpp -o CGUIMessageBox.o $(CXXFLAGS)

CGUIModalScreen.o: CGUIModalScreen.cpp
	$(CPP) -c CGUIModalScreen.cpp -o CGUIModalScreen.o $(CXXFLAGS)


Sorry if this doesn't work, I don't have my makefile with me so this is kinda off the top of my head, I'm on my girlfriends computer at the moment as I don't have an internet connection at home
http://www.darkliquid.net - Blog, art, poetry
Post Reply