You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
disanti
Posts: 367 Joined: Sat Jan 17, 2004 1:36 am
Location: California, US
Contact:
Post
by disanti » Mon Jan 17, 2005 12:48 am
Hello, been a while since I've used Irrlicht. I was working on an app under linux with it and I've been getting an exotic error with createDevice. I searched the forums and couldn't find any information on it. I will post my make file and the effected line of code.
Makefile:
Code: Select all
objfiles = tldedit.o tldedit_eventreceiver.o
libfiles = -I"./irrlicht" -I"/usr/X11R6/include" -L"./irrlicht" -L"/usr/X11R6/lib" -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lz -ljpeg
all: $(objfiles)
g++ -o ../tldedit -O2 $(libfiles) $(objfiles)
tldedit.o: tldedit.cpp tldedit_eventreceiver.h tldedit_eventreceiver.cpp
g++ -c tldedit.cpp
tldedit_eventreceiver.o: tldedit_eventreceiver.cpp tldedit_eventreceiver.h
g++ -c tldedit_eventreceiver.cpp
clean:
rm *.o
rm *.*~
rm *~
Error message:
Code: Select all
g++ -o ../tldedit -O2 -I"./irrlicht" -I"/usr/X11R6/include" -L"./irrlicht" -L"/usr/X11R6/lib" -lIrrlicht -lGL -lXxf86vm -lXext -lX11 -lz -ljpeg tldedit.o tldedit_eventreceiver.o
tldedit.o(.text+0x148): In function `main':
: undefined reference to `createDevice'
collect2: ld returned 1 exit status
make: *** [all] Error 1
Effected line of code:
Code: Select all
tldedit_device = irr::createDevice(irr::video::EDT_OPENGL, irr::core::dimension2d<irr::s32>(800, 600)); //create the device
Thanks~ John DiSanti
________
Teen Vid
Last edited by
disanti on Thu Feb 24, 2011 10:27 am, edited 1 time in total.
Munku
Posts: 66 Joined: Tue Nov 30, 2004 4:04 pm
Post
by Munku » Mon Jan 17, 2005 12:52 am
check your makefile settings, it looks like irrlicht.a isn't being included thus the undifined reference.
Umm, don't look at me that way. I'M not the dead one here.
--The One True Marshmellow
disanti
Posts: 367 Joined: Sat Jan 17, 2004 1:36 am
Location: California, US
Contact:
Post
by disanti » Mon Jan 17, 2005 1:01 am
My settings are fine, the folder irrlicht contains all of the include and library files. I just double checked.
________
JUSTIN BIEBER
Last edited by
disanti on Thu Feb 24, 2011 10:27 am, edited 1 time in total.
disanti
Posts: 367 Joined: Sat Jan 17, 2004 1:36 am
Location: California, US
Contact:
Post
by disanti » Mon Jan 17, 2005 1:05 am
Ok, I fixed it by swapping $(libfiles) and $(objfiles) in the line:
g++ -o ../tldedit -O2 $(libfiles) $(objfiles)
Thanks again.
________
NEVADA MEDICAL MARIJUANA DISPENSARY