Can't compile first tutorial on Linux
Can't compile first tutorial on Linux
Hi all,
I'm trying to get started with Irrlicht on a linux box I just can't seem to get the hellow world program to compile.
I've got the Irrlicht library installed, as well as OpenGL, GlX and GLUT.
I'm using this command line to compile the program, t.c++
g++ ./t.c++ -lIrrlicht -lGL -I/usr/include/irrlicht/
I'm getting a slew of linker errors so it seems like I'm missing a library.
Here are the errors. Can someone help me get started?
TIA,
Mike.
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CIrrDeviceLinux.o): In function `irr::CIrrDeviceLinux::createWindow(irr::core::dimension2d<int> const&, unsigned int)':
(.text+0xae8): undefined reference to `XF86VidModeQueryExtension'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CIrrDeviceLinux.o): In function `irr::CIrrDeviceLinux::createWindow(irr::core::dimension2d<int> const&, unsigned int)':
(.text+0xb10): undefined reference to `XF86VidModeGetAllModeLines'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CIrrDeviceLinux.o): In function `irr::CIrrDeviceLinux::createWindow(irr::core::dimension2d<int> const&, unsigned int)':
(.text+0xf28): undefined reference to `XF86VidModeSwitchToMode'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CIrrDeviceLinux.o): In function `irr::CIrrDeviceLinux::createWindow(irr::core::dimension2d<int> const&, unsigned int)':
(.text+0xf4a): undefined reference to `XF86VidModeSetViewPort'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CIrrDeviceLinux.o): In function `irr::CIrrDeviceLinux::getVideoModeList()':
(.text+0x14f2): undefined reference to `XF86VidModeQueryExtension'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CIrrDeviceLinux.o): In function `irr::CIrrDeviceLinux::getVideoModeList()':
(.text+0x1549): undefined reference to `XF86VidModeGetAllModeLines'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CIrrDeviceLinux.o): In function `irr::CIrrDeviceLinux::~CIrrDeviceLinux()':
(.text+0x1ef3): undefined reference to `XF86VidModeSwitchToMode'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CIrrDeviceLinux.o): In function `irr::CIrrDeviceLinux::~CIrrDeviceLinux()':
(.text+0x1f15): undefined reference to `XF86VidModeSetViewPort'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CIrrDeviceLinux.o): In function `irr::CIrrDeviceLinux::~CIrrDeviceLinux()':
(.text+0x215c): undefined reference to `XF86VidModeSwitchToMode'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CIrrDeviceLinux.o): In function `irr::CIrrDeviceLinux::~CIrrDeviceLinux()':
(.text+0x217e): undefined reference to `XF86VidModeSetViewPort'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CIrrDeviceLinux.o): In function `irr::CIrrDeviceLinux::~CIrrDeviceLinux()':
(.text+0x23a3): undefined reference to `XF86VidModeSwitchToMode'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CIrrDeviceLinux.o): In function `irr::CIrrDeviceLinux::~CIrrDeviceLinux()':
(.text+0x23c5): undefined reference to `XF86VidModeSetViewPort'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderJPG.o): In function `irr::video::CImageLoaderJPG::loadImage(irr::io::IReadFile*) const':
(.text+0x1b9): undefined reference to `jpeg_std_error'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderJPG.o): In function `irr::video::CImageLoaderJPG::loadImage(irr::io::IReadFile*) const':
(.text+0x200): undefined reference to `jpeg_CreateDecompress'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderJPG.o): In function `irr::video::CImageLoaderJPG::loadImage(irr::io::IReadFile*) const':
(.text+0x23f): undefined reference to `jpeg_resync_to_restart'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderJPG.o): In function `irr::video::CImageLoaderJPG::loadImage(irr::io::IReadFile*) const':
(.text+0x253): undefined reference to `jpeg_read_header'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderJPG.o): In function `irr::video::CImageLoaderJPG::loadImage(irr::io::IReadFile*) const':
(.text+0x279): undefined reference to `jpeg_start_decompress'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderJPG.o): In function `irr::video::CImageLoaderJPG::loadImage(irr::io::IReadFile*) const':
(.text+0x309): undefined reference to `jpeg_read_scanlines'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderJPG.o): In function `irr::video::CImageLoaderJPG::loadImage(irr::io::IReadFile*) const':
(.text+0x339): undefined reference to `jpeg_finish_decompress'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderJPG.o): In function `irr::video::CImageLoaderJPG::loadImage(irr::io::IReadFile*) const':
(.text+0x341): undefined reference to `jpeg_destroy_decompress'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderJPG.o): In function `irr::video::CImageLoaderJPG::loadImage(irr::io::IReadFile*) const':
(.text+0x3c3): undefined reference to `jpeg_destroy_decompress'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderPNG.o): In function `irr::video::CImageLoaderPng::isALoadableFileFormat(irr::io::IReadFile*) const':
(.text+0x96): undefined reference to `png_sig_cmp'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderPNG.o): In function `irr::video::CImageLoaderPng::loadImage(irr::io::IReadFile*) const':
(.text+0x212): undefined reference to `png_sig_cmp'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderPNG.o): In function `irr::video::CImageLoaderPng::loadImage(irr::io::IReadFile*) const':
(.text+0x23e): undefined reference to `png_create_read_struct'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderPNG.o): In function `irr::video::CImageLoaderPng::loadImage(irr::io::IReadFile*) const':
(.text+0x251): undefined reference to `png_create_info_struct'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderPNG.o): In function `irr::video::CImageLoaderPng::loadImage(irr::io::IReadFile*) const':
(.text+0x289): undefined reference to `png_set_read_fn'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderPNG.o): In function `irr::video::CImageLoaderPng::loadImage(irr::io::IReadFile*) const':
(.text+0x29c): undefined reference to `png_set_sig_bytes'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderPNG.o): In function `irr::video::CImageLoaderPng::loadImage(irr::io::IReadFile*) const':
(.text+0x2ae): undefined reference to `png_read_info'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderPNG.o): In function `irr::video::CImageLoaderPng::loadImage(irr::io::IReadFile*) const':
(.text+0x2f4): undefined reference to `png_get_IHDR'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderPNG.o): In function `irr::video::CImageLoaderPng::loadImage(irr::io::IReadFile*) const':
(.text+0x32f): undefined reference to `png_set_packing'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderPNG.o): In function `irr::video::CImageLoaderPng::loadImage(irr::io::IReadFile*) const':
(.text+0x349): undefined reference to `png_get_valid'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderPNG.o): In function `irr::video::CImageLoaderPng::loadImage(irr::io::IReadFile*) const':
(.text+0x371): undefined reference to `png_set_gray_to_rgb'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderPNG.o): In function `irr::video::CImageLoaderPng::loadImage(irr::io::IReadFile*) const':
(.text+0x38c): undefined reference to `png_read_update_info'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderPNG.o): In function `irr::video::CImageLoaderPng::loadImage(irr::io::IReadFile*) const':
(.text+0x3c9): undefined reference to `png_get_IHDR'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderPNG.o): In function `irr::video::CImageLoaderPng::loadImage(irr::io::IReadFile*) const':
(.text+0x410): undefined reference to `png_get_IHDR'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderPNG.o): In function `irr::video::CImageLoaderPng::loadImage(irr::io::IReadFile*) const':
(.text+0x4c9): undefined reference to `png_read_image'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderPNG.o): In function `irr::video::CImageLoaderPng::loadImage(irr::io::IReadFile*) const':
(.text+0x4dc): undefined reference to `png_read_end'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderPNG.o): In function `irr::video::CImageLoaderPng::loadImage(irr::io::IReadFile*) const':
(.text+0x50c): undefined reference to `png_destroy_read_struct'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderPNG.o): In function `irr::video::CImageLoaderPng::loadImage(irr::io::IReadFile*) const':
(.text+0x531): undefined reference to `png_set_gray_1_2_4_to_8'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderPNG.o): In function `irr::video::CImageLoaderPng::loadImage(irr::io::IReadFile*) const':
(.text+0x550): undefined reference to `png_destroy_read_struct'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderPNG.o): In function `irr::video::CImageLoaderPng::loadImage(irr::io::IReadFile*) const':
(.text+0x599): undefined reference to `png_set_tRNS_to_alpha'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderPNG.o): In function `irr::video::CImageLoaderPng::loadImage(irr::io::IReadFile*) const':
(.text+0x5df): undefined reference to `png_set_palette_to_rgb'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderPNG.o): In function `irr::video::CImageLoaderPng::loadImage(irr::io::IReadFile*) const':
(.text+0x5ef): undefined reference to `png_set_bgr'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderPNG.o): In function `irr::video::CImageLoaderPng::loadImage(irr::io::IReadFile*) const':
(.text+0x5ff): undefined reference to `png_set_strip_16'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderPNG.o): In function `irr::video::CImageLoaderPng::loadImage(irr::io::IReadFile*) const':
(.text+0x64d): undefined reference to `png_destroy_read_struct'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderPNG.o): In function `irr::video::CImageLoaderPng::loadImage(irr::io::IReadFile*) const':
(.text+0x709): undefined reference to `png_destroy_read_struct'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderPNG.o): In function `irr::video::CImageLoaderPng::loadImage(irr::io::IReadFile*) const':
(.text+0x753): undefined reference to `png_destroy_read_struct'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderPNG.o): In function `irr::video::CImageLoaderPng::loadImage(irr::io::IReadFile*) const':
(.text+0x796): undefined reference to `png_destroy_read_struct'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderPNG.o): In function `irr::video::user_read_data_fcn(png_struct_def*, unsigned char*, unsigned int)':
(.text+0x1a3): undefined reference to `png_error'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageWriterJPG.o): In function `irr::video::write_JPEG_memory(void*, int, int, unsigned int, unsigned int, unsigned char*, unsigned int, int, unsigned int*)':
(.text+0x18f): undefined reference to `jpeg_std_error'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageWriterJPG.o): In function `irr::video::write_JPEG_memory(void*, int, int, unsigned int, unsigned int, unsigned char*, unsigned int, int, unsigned int*)':
(.text+0x1ad): undefined reference to `jpeg_CreateCompress'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageWriterJPG.o): In function `irr::video::write_JPEG_memory(void*, int, int, unsigned int, unsigned int, unsigned char*, unsigned int, int, unsigned int*)':
(.text+0x1f0): undefined reference to `jpeg_set_defaults'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageWriterJPG.o): In function `irr::video::write_JPEG_memory(void*, int, int, unsigned int, unsigned int, unsigned char*, unsigned int, int, unsigned int*)':
(.text+0x207): undefined reference to `jpeg_set_quality'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageWriterJPG.o): In function `irr::video::write_JPEG_memory(void*, int, int, unsigned int, unsigned int, unsigned char*, unsigned int, int, unsigned int*)':
(.text+0x217): undefined reference to `jpeg_start_compress'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageWriterJPG.o): In function `irr::video::write_JPEG_memory(void*, int, int, unsigned int, unsigned int, unsigned char*, unsigned int, int, unsigned int*)':
(.text+0x249): undefined reference to `jpeg_write_scanlines'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageWriterJPG.o): In function `irr::video::write_JPEG_memory(void*, int, int, unsigned int, unsigned int, unsigned char*, unsigned int, int, unsigned int*)':
(.text+0x25f): undefined reference to `jpeg_finish_compress'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageWriterJPG.o): In function `irr::video::write_JPEG_memory(void*, int, int, unsigned int, unsigned int, unsigned char*, unsigned int, int, unsigned int*)':
(.text+0x278): undefined reference to `jpeg_destroy_compress'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageWriterPNG.o): In function `irr::video::CImageWriterPNG::writeImage(irr::io::IWriteFile*, irr::video::IImage*, unsigned int) const':
(.text+0x7f): undefined reference to `png_create_write_struct'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageWriterPNG.o): In function `irr::video::CImageWriterPNG::writeImage(irr::io::IWriteFile*, irr::video::IImage*, unsigned int) const':
(.text+0x92): undefined reference to `png_create_info_struct'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageWriterPNG.o): In function `irr::video::CImageWriterPNG::writeImage(irr::io::IWriteFile*, irr::video::IImage*, unsigned int) const':
(.text+0xd2): undefined reference to `png_set_write_fn'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageWriterPNG.o): In function `irr::video::CImageWriterPNG::writeImage(irr::io::IWriteFile*, irr::video::IImage*, unsigned int) const':
(.text+0x14b): undefined reference to `png_set_IHDR'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageWriterPNG.o): In function `irr::video::CImageWriterPNG::writeImage(irr::io::IWriteFile*, irr::video::IImage*, unsigned int) const':
(.text+0x282): undefined reference to `png_destroy_write_struct'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageWriterPNG.o): In function `irr::video::CImageWriterPNG::writeImage(irr::io::IWriteFile*, irr::video::IImage*, unsigned int) const':
(.text+0x2de): undefined reference to `png_destroy_write_struct'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageWriterPNG.o): In function `irr::video::CImageWriterPNG::writeImage(irr::io::IWriteFile*, irr::video::IImage*, unsigned int) const':
(.text+0x38d): undefined reference to `png_destroy_write_struct'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageWriterPNG.o): In function `irr::video::CImageWriterPNG::writeImage(irr::io::IWriteFile*, irr::video::IImage*, unsigned int) const':
(.text+0x3e1): undefined reference to `png_set_rows'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageWriterPNG.o): In function `irr::video::CImageWriterPNG::writeImage(irr::io::IWriteFile*, irr::video::IImage*, unsigned int) const':
(.text+0x426): undefined reference to `png_write_png'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageWriterPNG.o): In function `irr::video::CImageWriterPNG::writeImage(irr::io::IWriteFile*, irr::video::IImage*, unsigned int) const':
(.text+0x44e): undefined reference to `png_destroy_write_struct'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageWriterPNG.o): In function `irr::video::CImageWriterPNG::writeImage(irr::io::IWriteFile*, irr::video::IImage*, unsigned int) const':
(.text+0x4c1): undefined reference to `png_destroy_write_struct'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageWriterPNG.o): In function `irr::video::user_write_data_fcn(png_struct_def*, unsigned char*, unsigned int)':
(.text+0x5f3): undefined reference to `png_error'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CZipReader.o): In function `irr::io::CZipReader::openFile(int)':
(.text+0x16a): undefined reference to `inflateInit2_'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CZipReader.o): In function `irr::io::CZipReader::openFile(int)':
(.text+0x17e): undefined reference to `inflate'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CZipReader.o): In function `irr::io::CZipReader::openFile(int)':
(.text+0x186): undefined reference to `inflateEnd'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CZipReader.o): In function `irr::io::CZipReader::openFile(int)':
(.text+0x18e): undefined reference to `inflateEnd'
collect2: ld returned 1 exit status
I'm trying to get started with Irrlicht on a linux box I just can't seem to get the hellow world program to compile.
I've got the Irrlicht library installed, as well as OpenGL, GlX and GLUT.
I'm using this command line to compile the program, t.c++
g++ ./t.c++ -lIrrlicht -lGL -I/usr/include/irrlicht/
I'm getting a slew of linker errors so it seems like I'm missing a library.
Here are the errors. Can someone help me get started?
TIA,
Mike.
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CIrrDeviceLinux.o): In function `irr::CIrrDeviceLinux::createWindow(irr::core::dimension2d<int> const&, unsigned int)':
(.text+0xae8): undefined reference to `XF86VidModeQueryExtension'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CIrrDeviceLinux.o): In function `irr::CIrrDeviceLinux::createWindow(irr::core::dimension2d<int> const&, unsigned int)':
(.text+0xb10): undefined reference to `XF86VidModeGetAllModeLines'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CIrrDeviceLinux.o): In function `irr::CIrrDeviceLinux::createWindow(irr::core::dimension2d<int> const&, unsigned int)':
(.text+0xf28): undefined reference to `XF86VidModeSwitchToMode'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CIrrDeviceLinux.o): In function `irr::CIrrDeviceLinux::createWindow(irr::core::dimension2d<int> const&, unsigned int)':
(.text+0xf4a): undefined reference to `XF86VidModeSetViewPort'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CIrrDeviceLinux.o): In function `irr::CIrrDeviceLinux::getVideoModeList()':
(.text+0x14f2): undefined reference to `XF86VidModeQueryExtension'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CIrrDeviceLinux.o): In function `irr::CIrrDeviceLinux::getVideoModeList()':
(.text+0x1549): undefined reference to `XF86VidModeGetAllModeLines'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CIrrDeviceLinux.o): In function `irr::CIrrDeviceLinux::~CIrrDeviceLinux()':
(.text+0x1ef3): undefined reference to `XF86VidModeSwitchToMode'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CIrrDeviceLinux.o): In function `irr::CIrrDeviceLinux::~CIrrDeviceLinux()':
(.text+0x1f15): undefined reference to `XF86VidModeSetViewPort'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CIrrDeviceLinux.o): In function `irr::CIrrDeviceLinux::~CIrrDeviceLinux()':
(.text+0x215c): undefined reference to `XF86VidModeSwitchToMode'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CIrrDeviceLinux.o): In function `irr::CIrrDeviceLinux::~CIrrDeviceLinux()':
(.text+0x217e): undefined reference to `XF86VidModeSetViewPort'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CIrrDeviceLinux.o): In function `irr::CIrrDeviceLinux::~CIrrDeviceLinux()':
(.text+0x23a3): undefined reference to `XF86VidModeSwitchToMode'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CIrrDeviceLinux.o): In function `irr::CIrrDeviceLinux::~CIrrDeviceLinux()':
(.text+0x23c5): undefined reference to `XF86VidModeSetViewPort'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderJPG.o): In function `irr::video::CImageLoaderJPG::loadImage(irr::io::IReadFile*) const':
(.text+0x1b9): undefined reference to `jpeg_std_error'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderJPG.o): In function `irr::video::CImageLoaderJPG::loadImage(irr::io::IReadFile*) const':
(.text+0x200): undefined reference to `jpeg_CreateDecompress'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderJPG.o): In function `irr::video::CImageLoaderJPG::loadImage(irr::io::IReadFile*) const':
(.text+0x23f): undefined reference to `jpeg_resync_to_restart'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderJPG.o): In function `irr::video::CImageLoaderJPG::loadImage(irr::io::IReadFile*) const':
(.text+0x253): undefined reference to `jpeg_read_header'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderJPG.o): In function `irr::video::CImageLoaderJPG::loadImage(irr::io::IReadFile*) const':
(.text+0x279): undefined reference to `jpeg_start_decompress'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderJPG.o): In function `irr::video::CImageLoaderJPG::loadImage(irr::io::IReadFile*) const':
(.text+0x309): undefined reference to `jpeg_read_scanlines'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderJPG.o): In function `irr::video::CImageLoaderJPG::loadImage(irr::io::IReadFile*) const':
(.text+0x339): undefined reference to `jpeg_finish_decompress'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderJPG.o): In function `irr::video::CImageLoaderJPG::loadImage(irr::io::IReadFile*) const':
(.text+0x341): undefined reference to `jpeg_destroy_decompress'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderJPG.o): In function `irr::video::CImageLoaderJPG::loadImage(irr::io::IReadFile*) const':
(.text+0x3c3): undefined reference to `jpeg_destroy_decompress'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderPNG.o): In function `irr::video::CImageLoaderPng::isALoadableFileFormat(irr::io::IReadFile*) const':
(.text+0x96): undefined reference to `png_sig_cmp'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderPNG.o): In function `irr::video::CImageLoaderPng::loadImage(irr::io::IReadFile*) const':
(.text+0x212): undefined reference to `png_sig_cmp'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderPNG.o): In function `irr::video::CImageLoaderPng::loadImage(irr::io::IReadFile*) const':
(.text+0x23e): undefined reference to `png_create_read_struct'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderPNG.o): In function `irr::video::CImageLoaderPng::loadImage(irr::io::IReadFile*) const':
(.text+0x251): undefined reference to `png_create_info_struct'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderPNG.o): In function `irr::video::CImageLoaderPng::loadImage(irr::io::IReadFile*) const':
(.text+0x289): undefined reference to `png_set_read_fn'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderPNG.o): In function `irr::video::CImageLoaderPng::loadImage(irr::io::IReadFile*) const':
(.text+0x29c): undefined reference to `png_set_sig_bytes'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderPNG.o): In function `irr::video::CImageLoaderPng::loadImage(irr::io::IReadFile*) const':
(.text+0x2ae): undefined reference to `png_read_info'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderPNG.o): In function `irr::video::CImageLoaderPng::loadImage(irr::io::IReadFile*) const':
(.text+0x2f4): undefined reference to `png_get_IHDR'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderPNG.o): In function `irr::video::CImageLoaderPng::loadImage(irr::io::IReadFile*) const':
(.text+0x32f): undefined reference to `png_set_packing'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderPNG.o): In function `irr::video::CImageLoaderPng::loadImage(irr::io::IReadFile*) const':
(.text+0x349): undefined reference to `png_get_valid'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderPNG.o): In function `irr::video::CImageLoaderPng::loadImage(irr::io::IReadFile*) const':
(.text+0x371): undefined reference to `png_set_gray_to_rgb'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderPNG.o): In function `irr::video::CImageLoaderPng::loadImage(irr::io::IReadFile*) const':
(.text+0x38c): undefined reference to `png_read_update_info'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderPNG.o): In function `irr::video::CImageLoaderPng::loadImage(irr::io::IReadFile*) const':
(.text+0x3c9): undefined reference to `png_get_IHDR'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderPNG.o): In function `irr::video::CImageLoaderPng::loadImage(irr::io::IReadFile*) const':
(.text+0x410): undefined reference to `png_get_IHDR'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderPNG.o): In function `irr::video::CImageLoaderPng::loadImage(irr::io::IReadFile*) const':
(.text+0x4c9): undefined reference to `png_read_image'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderPNG.o): In function `irr::video::CImageLoaderPng::loadImage(irr::io::IReadFile*) const':
(.text+0x4dc): undefined reference to `png_read_end'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderPNG.o): In function `irr::video::CImageLoaderPng::loadImage(irr::io::IReadFile*) const':
(.text+0x50c): undefined reference to `png_destroy_read_struct'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderPNG.o): In function `irr::video::CImageLoaderPng::loadImage(irr::io::IReadFile*) const':
(.text+0x531): undefined reference to `png_set_gray_1_2_4_to_8'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderPNG.o): In function `irr::video::CImageLoaderPng::loadImage(irr::io::IReadFile*) const':
(.text+0x550): undefined reference to `png_destroy_read_struct'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderPNG.o): In function `irr::video::CImageLoaderPng::loadImage(irr::io::IReadFile*) const':
(.text+0x599): undefined reference to `png_set_tRNS_to_alpha'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderPNG.o): In function `irr::video::CImageLoaderPng::loadImage(irr::io::IReadFile*) const':
(.text+0x5df): undefined reference to `png_set_palette_to_rgb'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderPNG.o): In function `irr::video::CImageLoaderPng::loadImage(irr::io::IReadFile*) const':
(.text+0x5ef): undefined reference to `png_set_bgr'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderPNG.o): In function `irr::video::CImageLoaderPng::loadImage(irr::io::IReadFile*) const':
(.text+0x5ff): undefined reference to `png_set_strip_16'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderPNG.o): In function `irr::video::CImageLoaderPng::loadImage(irr::io::IReadFile*) const':
(.text+0x64d): undefined reference to `png_destroy_read_struct'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderPNG.o): In function `irr::video::CImageLoaderPng::loadImage(irr::io::IReadFile*) const':
(.text+0x709): undefined reference to `png_destroy_read_struct'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderPNG.o): In function `irr::video::CImageLoaderPng::loadImage(irr::io::IReadFile*) const':
(.text+0x753): undefined reference to `png_destroy_read_struct'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderPNG.o): In function `irr::video::CImageLoaderPng::loadImage(irr::io::IReadFile*) const':
(.text+0x796): undefined reference to `png_destroy_read_struct'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageLoaderPNG.o): In function `irr::video::user_read_data_fcn(png_struct_def*, unsigned char*, unsigned int)':
(.text+0x1a3): undefined reference to `png_error'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageWriterJPG.o): In function `irr::video::write_JPEG_memory(void*, int, int, unsigned int, unsigned int, unsigned char*, unsigned int, int, unsigned int*)':
(.text+0x18f): undefined reference to `jpeg_std_error'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageWriterJPG.o): In function `irr::video::write_JPEG_memory(void*, int, int, unsigned int, unsigned int, unsigned char*, unsigned int, int, unsigned int*)':
(.text+0x1ad): undefined reference to `jpeg_CreateCompress'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageWriterJPG.o): In function `irr::video::write_JPEG_memory(void*, int, int, unsigned int, unsigned int, unsigned char*, unsigned int, int, unsigned int*)':
(.text+0x1f0): undefined reference to `jpeg_set_defaults'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageWriterJPG.o): In function `irr::video::write_JPEG_memory(void*, int, int, unsigned int, unsigned int, unsigned char*, unsigned int, int, unsigned int*)':
(.text+0x207): undefined reference to `jpeg_set_quality'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageWriterJPG.o): In function `irr::video::write_JPEG_memory(void*, int, int, unsigned int, unsigned int, unsigned char*, unsigned int, int, unsigned int*)':
(.text+0x217): undefined reference to `jpeg_start_compress'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageWriterJPG.o): In function `irr::video::write_JPEG_memory(void*, int, int, unsigned int, unsigned int, unsigned char*, unsigned int, int, unsigned int*)':
(.text+0x249): undefined reference to `jpeg_write_scanlines'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageWriterJPG.o): In function `irr::video::write_JPEG_memory(void*, int, int, unsigned int, unsigned int, unsigned char*, unsigned int, int, unsigned int*)':
(.text+0x25f): undefined reference to `jpeg_finish_compress'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageWriterJPG.o): In function `irr::video::write_JPEG_memory(void*, int, int, unsigned int, unsigned int, unsigned char*, unsigned int, int, unsigned int*)':
(.text+0x278): undefined reference to `jpeg_destroy_compress'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageWriterPNG.o): In function `irr::video::CImageWriterPNG::writeImage(irr::io::IWriteFile*, irr::video::IImage*, unsigned int) const':
(.text+0x7f): undefined reference to `png_create_write_struct'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageWriterPNG.o): In function `irr::video::CImageWriterPNG::writeImage(irr::io::IWriteFile*, irr::video::IImage*, unsigned int) const':
(.text+0x92): undefined reference to `png_create_info_struct'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageWriterPNG.o): In function `irr::video::CImageWriterPNG::writeImage(irr::io::IWriteFile*, irr::video::IImage*, unsigned int) const':
(.text+0xd2): undefined reference to `png_set_write_fn'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageWriterPNG.o): In function `irr::video::CImageWriterPNG::writeImage(irr::io::IWriteFile*, irr::video::IImage*, unsigned int) const':
(.text+0x14b): undefined reference to `png_set_IHDR'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageWriterPNG.o): In function `irr::video::CImageWriterPNG::writeImage(irr::io::IWriteFile*, irr::video::IImage*, unsigned int) const':
(.text+0x282): undefined reference to `png_destroy_write_struct'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageWriterPNG.o): In function `irr::video::CImageWriterPNG::writeImage(irr::io::IWriteFile*, irr::video::IImage*, unsigned int) const':
(.text+0x2de): undefined reference to `png_destroy_write_struct'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageWriterPNG.o): In function `irr::video::CImageWriterPNG::writeImage(irr::io::IWriteFile*, irr::video::IImage*, unsigned int) const':
(.text+0x38d): undefined reference to `png_destroy_write_struct'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageWriterPNG.o): In function `irr::video::CImageWriterPNG::writeImage(irr::io::IWriteFile*, irr::video::IImage*, unsigned int) const':
(.text+0x3e1): undefined reference to `png_set_rows'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageWriterPNG.o): In function `irr::video::CImageWriterPNG::writeImage(irr::io::IWriteFile*, irr::video::IImage*, unsigned int) const':
(.text+0x426): undefined reference to `png_write_png'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageWriterPNG.o): In function `irr::video::CImageWriterPNG::writeImage(irr::io::IWriteFile*, irr::video::IImage*, unsigned int) const':
(.text+0x44e): undefined reference to `png_destroy_write_struct'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageWriterPNG.o): In function `irr::video::CImageWriterPNG::writeImage(irr::io::IWriteFile*, irr::video::IImage*, unsigned int) const':
(.text+0x4c1): undefined reference to `png_destroy_write_struct'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CImageWriterPNG.o): In function `irr::video::user_write_data_fcn(png_struct_def*, unsigned char*, unsigned int)':
(.text+0x5f3): undefined reference to `png_error'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CZipReader.o): In function `irr::io::CZipReader::openFile(int)':
(.text+0x16a): undefined reference to `inflateInit2_'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CZipReader.o): In function `irr::io::CZipReader::openFile(int)':
(.text+0x17e): undefined reference to `inflate'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CZipReader.o): In function `irr::io::CZipReader::openFile(int)':
(.text+0x186): undefined reference to `inflateEnd'
/usr/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../libIrrlicht.a(CZipReader.o): In function `irr::io::CZipReader::openFile(int)':
(.text+0x18e): undefined reference to `inflateEnd'
collect2: ld returned 1 exit status
Hi Uberbot,
i had to add several system libraries to get the tutorials compiled. For me (gentoo) something like this works:
i had to add several system libraries to get the tutorials compiled. For me (gentoo) something like this works:
Code: Select all
g++ -Wall -I../../irrlicht/include -I../../irrklang/include *.cpp -o my_game -L../../irrlicht/lib/Linux -lIrrlicht -L/usr/X11R6/lib -lX11 -lXxf86vm -ljpeg -lz -lGL -lGLU -lpthread ../lib/irrKlang.so
Can't you just use the Makefile? Try typing "make" within the hello-world folder. It should at least find the png lib afterwards.
If you still get the XF86VidModeQueryExtension then you are probably missing the xxf86 library. In debian I suppose you need to install package libxxf86vm-dev. But it should be part of xlibs-dev and xorg-dev.
If you still get the XF86VidModeQueryExtension then you are probably missing the xxf86 library. In debian I suppose you need to install package libxxf86vm-dev. But it should be part of xlibs-dev and xorg-dev.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
I didn't find a makefile. I just copied/pasted from the web page. Where can I get the full distribution?CuteAlien wrote:Can't you just use the Makefile? Try typing "make" within the hello-world folder. It should at least find the png lib afterwards.
If you still get the XF86VidModeQueryExtension then you are probably missing the xxf86 library. In debian I suppose you need to install package libxxf86vm-dev. But it should be part of xlibs-dev and xorg-dev.
Got it working
Well,
I downloaded the distribution and found the examples directory. Thanx for the pointer.
The Gentoo installer for the Irrlicht library seems to be broken. I had to compile the library by hand to get the examples to compile.
Now I can start having fun.
Thank you all for your help.
Mike.
I downloaded the distribution and found the examples directory. Thanx for the pointer.
The Gentoo installer for the Irrlicht library seems to be broken. I had to compile the library by hand to get the examples to compile.
Now I can start having fun.
Thank you all for your help.
Mike.
Ok. I've looked through at least 20 different pages concerning the undefined reference to createDevice issue. I am also having this issue, but I didn't think the forum needed yet another thread started.
I'm using:
Gentoo Linux
Irrlicht 1.4 (emerged from portage)
gcc (GCC) 4.1.2 (Gentoo 4.1.2 p1.1)
emacs22
The emerge did not, as far as I can tell, install any of the examples. (Some of the threads on this issue say to use the make files in the examples.)
I copied/pasted the first tutorial into emacs, saved it as irrlicht-test.cpp in my home directory.
Here is the gcc command I'm running:
g++ -otest -I/usr/include/irrlicht/ -L/usr/lib -lIrrlicht irrlicht-test.cpp
libIrrlicht.a exists in /usr/lib.
I only have one version of the lib. (Some threads say to use the gcc version, not the VC version. I only have the one.)
Finally, here is the linker error I'm getting after running the command above:
/tmp/cc0Nhamk.o: In function `main':
irrlicht-test.cpp:(.text+0x106): undefined reference to `irr::createDevice(irr::video::E_DRIVER_TYPE, irr::core::dimension2d<int> const&, unsigned int, bool, bool, bool, irr::IEventReceiver*, char const*)'
collect2: ld returned 1 exit status
I've not seen anything in all the posts I've read that helps.
My question: is the Gentoo ebuild, indeed, broken? The previous post seems to think so, but that was last year, and for all I know, the poster was using Irrlicht 1.3. (I'm not sure what version of Irrlicht was out at the time). Or is my problem elsewhere? I should note that I've removed the #pragma line in the code, since I'm not using VC++ (or any dll's for that matter).
I'm using:
Gentoo Linux
Irrlicht 1.4 (emerged from portage)
gcc (GCC) 4.1.2 (Gentoo 4.1.2 p1.1)
emacs22
The emerge did not, as far as I can tell, install any of the examples. (Some of the threads on this issue say to use the make files in the examples.)
I copied/pasted the first tutorial into emacs, saved it as irrlicht-test.cpp in my home directory.
Here is the gcc command I'm running:
g++ -otest -I/usr/include/irrlicht/ -L/usr/lib -lIrrlicht irrlicht-test.cpp
libIrrlicht.a exists in /usr/lib.
I only have one version of the lib. (Some threads say to use the gcc version, not the VC version. I only have the one.)
Finally, here is the linker error I'm getting after running the command above:
/tmp/cc0Nhamk.o: In function `main':
irrlicht-test.cpp:(.text+0x106): undefined reference to `irr::createDevice(irr::video::E_DRIVER_TYPE, irr::core::dimension2d<int> const&, unsigned int, bool, bool, bool, irr::IEventReceiver*, char const*)'
collect2: ld returned 1 exit status
I've not seen anything in all the posts I've read that helps.
My question: is the Gentoo ebuild, indeed, broken? The previous post seems to think so, but that was last year, and for all I know, the poster was using Irrlicht 1.3. (I'm not sure what version of Irrlicht was out at the time). Or is my problem elsewhere? I should note that I've removed the #pragma line in the code, since I'm not using VC++ (or any dll's for that matter).
Isn't 1.4 the most recent version of Irrlicht? That is the version that emerge installed. As for not having the examples, like I said, I installed this through emerge.
If you aren't familiar with emerge, it's Gentoo's package management system, sort of like aptitude for Ubuntu, YaST for SuSE, etc. It seems to have installed the all the headers, objects, and libraries, just not the examples (which should be extraneous anyway, as I prefer to manually type in the examples into a blank file).
Also, I shouldn't have to use the makefiles. Sure, they are great and all for the examples, but what about when I move on to my own code? Perhaps, eventually, I will move to using a makefile, but I should be able to compile on the command-line with g++ as well.
If you aren't familiar with emerge, it's Gentoo's package management system, sort of like aptitude for Ubuntu, YaST for SuSE, etc. It seems to have installed the all the headers, objects, and libraries, just not the examples (which should be extraneous anyway, as I prefer to manually type in the examples into a blank file).
Also, I shouldn't have to use the makefiles. Sure, they are great and all for the examples, but what about when I move on to my own code? Perhaps, eventually, I will move to using a makefile, but I should be able to compile on the command-line with g++ as well.
1.4.1 is the most recent version. I'd recommend downloading the sdk from this site anyways, because if emerge didn't include the examples its possible it didn't include some other relevant stuff.
Gentoo users note this!
Currently, the Gentoo emerge build of Irrlicht 1.4 does not work. You need to manually download the SDK from the Irrlicht site (currently version 1.4.1) and use that instead.