linux examples make

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
sbin
Posts: 5
Joined: Sat Nov 22, 2003 12:22 pm
Contact:

linux examples make

Post by sbin »

hey,
i want to start with irrlicht.
surfer@sbin:~/04/examples/1.HelloWorld$ make
g++ main.cpp -o example -I"../../include" -I"/usr/X11R6/include"
-L"/usr/X11R6/lib" -L"../../lib/Linux" -lIrrlicht -lGL -lXxf86vm -lXext
-lX11 -lz -ljpeg
/usr/bin/ld: cannot find -lGL
collect2: ld returned 1 exit status
make: *** [all] Error 1

I don't now what's wrong.
Maybe the path from the lib. big confused.
I use debian 3.0 (g++3.3)
joorce
Posts: 15
Joined: Tue Oct 14, 2003 9:48 am

Post by joorce »

Looks like the compiler is not finding the libraries for openGL.
You would have to find out where are they located in your system and their location to the makefile.
sbin
Posts: 5
Joined: Sat Nov 22, 2003 12:22 pm
Contact:

Post by sbin »

[quote="joorce"]Looks like the compiler is not finding the libraries for openGL.

ok ihave instal some opengl cl-sdl-opengl ...
Makefile
----------------------------------
.CPP = g++
OPTS = -I"../../include" -I"/usr/X11R6/include" -L"/usr/X11R6/lib" -L"../../lib
/Linux" -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lz -ljpeg

all:
$(CPP) main.cpp -o example $(OPTS)

clean:
rm example

-----------------------------------

surfer@sbin:~/04/examples/1.HelloWorld$ ./example
Creating X window...
Starting windowed mode...
Connecting glx context to window...
Window created.
Warning: This driver is not available in Linux. Trying OpenGL.
Loaded mesh:../../media/sydney.md2


:D

but why come this Warning message i think glx is a Open GL
Soldier of infortune
Posts: 29
Joined: Fri Sep 19, 2003 8:36 am

Post by Soldier of infortune »

Hello !

I updated my Linux (Mandrake 8.2 -> Mandrake 9.2)
Under Mdk 8.2, there is no problem to compiling examples, but now ...
And I got the same problem. :(

any idea ?
Soldier of infortune
Posts: 29
Joined: Fri Sep 19, 2003 8:36 am

Post by Soldier of infortune »

I modify this line to remplacing DT_DIRECTX8 by DT_OPENGL in examples.

Code: Select all

device = createDevice(	video::DT_DIRECTX8, core::dimension2d<s32>(800,600), 16, false, true, &receiver);
And i got a seg fault :-(
Before my update, there is no error.
Guest

Post by Guest »

sbin wrote:
joorce wrote:
but why come this Warning message i think glx is a Open GL
The warning means that the DirectX driver is not available in Linux and therefor OpenGL is used. So, ignore this warning, the examples work fine.
Soldier of infortune
Posts: 29
Joined: Fri Sep 19, 2003 8:36 am

Post by Soldier of infortune »

I got the solution ! We must compile Irrlicht Engine with the latest version of mesa. And all examples run perfectly !
sbin
Posts: 5
Joined: Sat Nov 22, 2003 12:22 pm
Contact:

Post by sbin »

new linux new problem:

surfer@xbox:~/04/examples/1.HelloWorld$ make
g++ main.cpp -o example -I"../../include" -I"/usr/X11R6/include" -L"/usr/X11R6/lib" -L"../../lib/Linux" -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lz -ljpeg
In file included from ../../include/IMeshBuffer.h:9,
from ../../include/IMesh.h:9,
from ../../include/IAnimatedMesh.h:9,
from ../../include/irrlicht.h:32,
from main.cpp:28:
../../include/SMaterial.h:161: anonymous class type not used to declare any objects
../../include/SMaterial.h:202: anonymous class type not used to declare any objects
../../include/SMaterial.h: In method `irr::video::SMaterial::SMaterial()':
../../include/SMaterial.h:121: class `irr::video::SMaterial' does not have any field named `Texture1'
../../include/SMaterial.h:121: class `irr::video::SMaterial' does not have any field named `Texture2'
../../include/SMaterial.h:122: class `irr::video::SMaterial' does not have any field named `Wireframe'
../../include/SMaterial.h:122: class `irr::video::SMaterial' does not have any field named `Lighting'
../../include/SMaterial.h:123: class `irr::video::SMaterial' does not have any field named `ZBuffer'
../../include/SMaterial.h:123: class `irr::video::SMaterial' does not have any field named `ZWriteEnable'
../../include/SMaterial.h:123: class `irr::video::SMaterial' does not have any field named `BackfaceCulling'
../../include/SMaterial.h:124: class `irr::video::SMaterial' does not have any field named `GouraudShading'
../../include/SMaterial.h:124: class `irr::video::SMaterial' does not have any field named `BilinearFilter'
../../include/SMaterial.h:125: class `irr::video::SMaterial' does not have any field named `TrilinearFilter'
../../include/SMaterial.h:125: class `irr::video::SMaterial' does not have any field named `ClampTextureCooridnates'
make: *** [all] Error 1

This linux is a xbox debian nVidia GeForce 3MX it's use gcc 3.2.2 and xlibmesa3-gl 4.2.1
glxinfo:
name of display: :0.0
Xlib: extension "GLX" missing on display ":0.0".
Xlib: extension "GLX" missing on display ":0.0".
Xlib: extension "GLX" missing on display ":0.0".
Error: couldn't find RGB GLX visual

visual x bf lv rg d st colorbuffer ax dp st accumbuffer ms cav
id dep cl sp sz l ci b ro r g b a bf th cl r g b a ns b eat
----------------------------------------------------------------------
Xlib: extension "GLX" missing on display ":0.0".
Xlib: extension "GLX" missing on display ":0.0".
0x21 24 tc 0 0 0 c . . 0 0 0 0 0 0 0 0 0 0 0 0 0 None
Xlib: extension "GLX" missing on display ":0.0".
Xlib: extension "GLX" missing on display ":0.0".
0x22 24 dc 0 0 0 c . . 0 0 0 0 0 0 0 0 0 0 0 0 0 None

I hope someone writing back with help
under the thread "problems with 2 examples with linux" i have just read other guys
have problems too with nvidia :cry:
dbu
Posts: 7
Joined: Mon Dec 01, 2003 4:36 pm
Contact:

Post by dbu »

well, this output looks just as i had when trying to compile with gcc-2.95
are you shure you are using 3.3.2?
try g++ --version and see what you get
sbin
Posts: 5
Joined: Sat Nov 22, 2003 12:22 pm
Contact:

Post by sbin »

Well I have link to 3.22
now i can make the example.
xbox:~/04/examples/1.HelloWorld# ./example
Creating X window...
Xlib: extension "GLX" missing on display ":0.0".
Warning: No doublebuffering available.
Xlib: extension "GLX" missing on display ":0.0".
Warning: Fatal error, could not get visual.
Warning: This driver is not available in Linux. Trying OpenGL.
Segmentation fault

:?:
Soldier of infortune
Posts: 29
Joined: Fri Sep 19, 2003 8:36 am

Post by Soldier of infortune »

Do you have Opengl support in your Linux ?
Which version of Linux do you use ?
coffeefrombrazil
Posts: 4
Joined: Wed Nov 19, 2003 7:10 pm

Post by coffeefrombrazil »

Sounds like you need to install drivers for your video card. If it's a nvidia card which for me gave similar errors just go here: http://www.nvidia.com/object/linux_disp ... -4496.html
sbin
Posts: 5
Joined: Sat Nov 22, 2003 12:22 pm
Contact:

Post by sbin »

hey,
this is a debian 3.0 stable with i think not the real opengl support on a xbox
I have install xlibmesa3 -gl-dev, xlibmesa3 -glu-dev, xlibosmesa3 -dgb,xlibosmesa3 -dgb-dev
I can do a make
surfer@xbox:~/04/examples/2.Quake3Map$ ./example
Creating X window...
Xlib: extension "GLX" missing on display ":0.0".
Warning: No doublebuffering available.
Xlib: extension "GLX" missing on display ":0.0".
Warning: Fatal error, could not get visual.
Warning: This driver is not available in Linux. Trying OpenGL.
Warning: Could not find texture in Q3 .bsp:textures/common/caulk
Warning: Could not find texture in Q3 .bsp:noshader
Warning: Could not find texture in Q3 .bsp:textures/common/clip
Warning: Could not find texture in Q3 .bsp:textures/liquids/lavahell
Warning: Could not find texture in Q3
.bsp:textures/gothic_trim/metalblackwave01
Warning: Could not find texture in Q3 .bsp:textures/stone/pjrock1
Warning: Could not find texture in Q3 .bsp:textures/skies/tim_hell
Warning: Could not find texture in Q3 .bsp:textures/common/hint
Warning: Could not find texture in Q3 .bsp:models/mapobjects/timlamp/timlamp
Warning: Could not find texture in Q3 .bsp:textures/sfx/flame1side
Warning: Could not find texture in Q3 .bsp:textures/sfx/flame2
Warning: Could not find texture in Q3
.bsp:models/mapobjects/gratelamp/gratetorc
h2
Warning: Could not find texture in Q3
.bsp:models/mapobjects/gratelamp/gratetorc
h2b
Loaded mesh:20kdm2.bsp
Needed 235ms to create OctTree SceneNode.(297 nodes, 7306 polys)
Segmentation fault

when i edit /etc/X11/XF86Config-4
Section "Module"
# Load "GLcore"
Load "glx"
can I not use X
:?:
15 min later:
i edit /etc/X11/XF86Config-4
Section "Module"
# Load "GLcore"
Load "glx"
Load "dri"
now irrlicht run
:D
Post Reply