This has been frustrating me for the longest time and no one seems able to answer my question. Why can't I declare Irrlicht devices to be global?
The code: IrrlichtDevice* device;
returns the error: [Linker Error] undefined reference to '_imp_createDevice' [Build Error]
but no one can explain why or how to fix it. I just want to be able to access the device, driver, and environment in my outlying functions through main(). Can anyone help cuz this defies the syntax of C++?
Why can't devices be global?
-
freetimecoder
- Posts: 226
- Joined: Fri Aug 22, 2008 8:50 pm
- Contact:
right, but to be more precise: it doesn't seem to be a linker error, it is a linker error:freetimecoder wrote:This seems to be a linking error.
also it's not related to the global IrrlichtDevice, it tells you that it's related to createDevice !!![Linker Error] undefined reference to '_imp_createDevice'
like freetimecoder said, check if you linked against the right lib (or against the lib at all) !!!
while(!asleep) sheep++;
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:

http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Thank you all for the help!
Thank you all for the help...I am using Dev-C++ and I was including the "lib" folder in the directory but not including the linker to libirrlicht.a. I have corrected it and everything seems to be working now.