• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
Aluthreney

Getting an error when I compile Irrlicht

7 posts in this topic

I just started using Irrlicht and when I compile the program it gives me this error: [b]cannot find -lirrlicht[/b].
Theres no point in posting the code because I all have are the [b]iostream and irrlicht.h includes[/b] and the main function returning 0.

IDE: Code::Blocks
Irrlicht: 1.7.3
OS: Ubuntu 10.11

I've searched online, but I couldn't find an answer.
0

Share this post


Link to post
Share on other sites
Where is libirrlicht(.a/.so/...)? You need to point the linker to it. Pass "-L <path-to-your-libs>" on the command line to do this. There's probably something in one of the Code::Blocks dialogs to set this via a GUI.

I said this in the other thread, but I'll say it again here for you in bold: [b]Now's a really good time to read up on the C and C++ compilation model. Once you have a good understanding of that, fixing problems such these becomes very easy.[/b]
0

Share this post


Link to post
Share on other sites
Thanks for the answer, I was able to solve the problem. And thank you for your advice, I'll look into it.
0

Share this post


Link to post
Share on other sites
I just started following a tutorial and this is the code I added to my program:

[b]IrrlichtDevice *device=createDevice(EDT_OPENGL, dimension2d<u32> (640, 480), 16, false, false, false, 0);

if(!device)
{
return 1;
}[/b]

and for the past two hours I've been looking for some way to solve these errors:

[b]/usr/lib/libIrrlicht.a(CIrrDeviceLinux.o)||In function `~CIrrDeviceLinux':|
/home/michael/irrlicht-1.7.3/source/Irrlicht/CIrrDeviceLinux.cpp|131|undefined reference to `XFree'|
/home/michael/irrlicht-1.7.3/source/Irrlicht/CIrrDeviceLinux.cpp|141|undefined reference to `glXMakeContextCurrent'|
/home/michael/irrlicht-1.7.3/source/Irrlicht/CIrrDeviceLinux.cpp|146|undefined reference to `glXMakeCurrent'|
/home/michael/irrlicht-1.7.3/source/Irrlicht/CIrrDeviceLinux.cpp|149|undefined reference to `glXDestroyContext'|
/home/michael/irrlicht-1.7.3/source/Irrlicht/CIrrDeviceLinux.cpp|151|undefined reference to `glXDestroyWindow'|
/home/michael/irrlicht-1.7.3/source/Irrlicht/CIrrDeviceLinux.cpp|163|undefined reference to `XDestroyWindow'|
/home/michael/irrlicht-1.7.3/source/Irrlicht/CIrrDeviceLinux.cpp|164|undefined reference to `XCloseDisplay'|
/home/michael/irrlicht-1.7.3/source/Irrlicht/CIrrDeviceLinux.cpp|168|undefined reference to `XFree'|
/home/michael/irrlicht-1.7.3/source/Irrlicht/CIrrDeviceLinux.cpp|131|undefined reference to `XFree'|
/home/michael/irrlicht-1.7.3/source/Irrlicht/CIrrDeviceLinux.cpp|141|undefined reference to `glXMakeContextCurrent'|
/home/michael/irrlicht-1.7.3/source/Irrlicht/CIrrDeviceLinux.cpp|146|undefined reference to `glXMakeCurrent'|
/home/michael/irrlicht-1.7.3/source/Irrlicht/CIrrDeviceLinux.cpp|149|undefined reference to `glXDestroyContext'|
/home/michael/irrlicht-1.7.3/source/Irrlicht/CIrrDeviceLinux.cpp|151|undefined reference to `glXDestroyWindow'|
/home/michael/irrlicht-1.7.3/source/Irrlicht/CIrrDeviceLinux.cpp|163|undefined reference to `XDestroyWindow'|
/home/michael/irrlicht-1.7.3/source/Irrlicht/CIrrDeviceLinux.cpp|164|undefined reference to `XCloseDisplay'|
/home/michael/irrlicht-1.7.3/source/Irrlicht/CIrrDeviceLinux.cpp|168|undefined reference to `XFree'|
/usr/lib/libIrrlicht.a(CIrrDeviceLinux.o)||In function `irr::IrrPrintXError(_XDisplay*, XErrorEvent*)':|
/home/michael/irrlicht-1.7.3/source/Irrlicht/CIrrDeviceLinux.cpp|191|undefined reference to `XGetErrorDatabaseText'|
/home/michael/irrlicht-1.7.3/source/Irrlicht/CIrrDeviceLinux.cpp|192|undefined reference to `XGetErrorText'|
/usr/lib/libIrrlicht.a(CIrrDeviceLinux.o)||In function `irr::CIrrDeviceLinux::switchToFullscreen(bool)':|
/home/michael/irrlicht-1.7.3/source/Irrlicht/CIrrDeviceLinux.cpp|209|undefined reference to `XF86VidModeSwitchToMode'|
/home/michael/irrlicht-1.7.3/source/Irrlicht/CIrrDeviceLinux.cpp|210|undefined reference to `XF86VidModeSetViewPort'|
/home/michael/irrlicht-1.7.3/source/Irrlicht/CIrrDeviceLinux.cpp|231|undefined reference to `XF86VidModeQueryExtension'|
/home/michael/irrlicht-1.7.3/source/Irrlicht/CIrrDeviceLinux.cpp|237|undefined reference to `XF86VidModeGetAllModeLines'|
/home/michael/irrlicht-1.7.3/source/Irrlicht/CIrrDeviceLinux.cpp|257|undefined reference to `XF86VidModeSwitchToMode'|
/home/michael/irrlicht-1.7.3/source/Irrlicht/CIrrDeviceLinux.cpp|258|undefined reference to `XF86VidModeSetViewPort'|
/home/michael/irrlicht-1.7.3/source/Irrlicht/CIrrDeviceLinux.cpp|267|undefined reference to `XFree'|
/usr/lib/libIrrlicht.a(CIrrDeviceLinux.o)||In function `irr::CIrrDeviceLinux::createWindow()':|
/home/michael/irrlicht-1.7.3/source/Irrlicht/CIrrDeviceLinux.cpp|346|undefined reference to `XSetErrorHandler'|
/home/michael/irrlicht-1.7.3/source/Irrlicht/CIrrDeviceLinux.cpp|349|undefined reference to `XOpenDisplay'|
/home/michael/irrlicht-1.7.3/source/Irrlicht/CIrrDeviceLinux.cpp|353|undefined reference to `XDisplayName'|
/home/michael/irrlicht-1.7.3/source/Irrlicht/CIrrDeviceLinux.cpp|354|undefined reference to `XDisplayName'|
/home/michael/irrlicht-1.7.3/source/Irrlicht/CIrrDeviceLinux.cpp|371|undefined reference to `glXQueryExtension'|
/home/michael/irrlicht-1.7.3/source/Irrlicht/CIrrDeviceLinux.cpp|372|undefined reference to `glXQueryVersion'|
/home/michael/irrlicht-1.7.3/source/Irrlicht/CIrrDeviceLinux.cpp|378|undefined reference to `glXGetProcAddress'|
/home/michael/irrlicht-1.7.3/source/Irrlicht/CIrrDeviceLinux.cpp|521|undefined reference to `XFree'|
/home/michael/irrlicht-1.7.3/source/Irrlicht/CIrrDeviceLinux.cpp|525|undefined reference to `glXGetProcAddress'|
/home/michael/irrlicht-1.7.3/source/Irrlicht/CIrrDeviceLinux.cpp|554|undefined reference to `glXChooseVisual'|
/home/michael/irrlicht-1.7.3/source/Irrlicht/CIrrDeviceLinux.cpp|562|undefined reference to `glXChooseVisual'|
/home/michael/irrlicht-1.7.3/source/Irrlicht/CIrrDeviceLinux.cpp|568|undefined reference to `glXChooseVisual'|
/home/michael/irrlicht-1.7.3/source/Irrlicht/CIrrDeviceLinux.cpp|593|undefined reference to `XGetVisualInfo'|
/home/michael/irrlicht-1.7.3/source/Irrlicht/CIrrDeviceLinux.cpp|601|undefined reference to `XCloseDisplay'|
/home/michael/irrlicht-1.7.3/source/Irrlicht/CIrrDeviceLinux.cpp|614|undefined reference to `XCreateColormap'|
/home/michael/irrlicht-1.7.3/source/Irrlicht/CIrrDeviceLinux.cpp|634|undefined reference to `XCreateWindow'|
/home/michael/irrlicht-1.7.3/source/Irrlicht/CIrrDeviceLinux.cpp|635|undefined reference to `XMapRaised'|
/home/michael/irrlicht-1.7.3/source/Irrlicht/CIrrDeviceLinux.cpp|638|undefined reference to `XInternAtom'|
/home/michael/irrlicht-1.7.3/source/Irrlicht/CIrrDeviceLinux.cpp|639|undefined reference to `XSetWMProtocols'|
/home/michael/irrlicht-1.7.3/source/Irrlicht/CIrrDeviceLinux.cpp|642|undefined reference to `XSetInputFocus'|
/home/michael/irrlicht-1.7.3/source/Irrlicht/CIrrDeviceLinux.cpp|644|undefined reference to `XGrabKeyboard'|
/home/michael/irrlicht-1.7.3/source/Irrlicht/CIrrDeviceLinux.cpp|647|undefined reference to `XGrabPointer'|
/home/michael/irrlicht-1.7.3/source/Irrlicht/CIrrDeviceLinux.cpp|649|undefined reference to `XWarpPointer'|
/home/michael/irrlicht-1.7.3/source/Irrlicht/CIrrDeviceLinux.cpp|663|undefined reference to `XCreateWindow'|
/home/michael/irrlicht-1.7.3/source/Irrlicht/CIrrDeviceLinux.cpp|666|undefined reference to `XGetWindowAttributes'|
||More errors follow but not being shown.|
||Edit the max errors limit in compiler options...|
||=== Build finished: 50 errors, 0 warnings ===|[/b]

From what I've read online it doesn't seem to be an error related to irrlicht itself. I'll keep looking, but if anybody knows anything about this I'd appreciate the help.[img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img]
0

Share this post


Link to post
Share on other sites
Did you add the irrlicht lib?
A fast way :
[source]
#pragma comment(lib, "irrlicht.lib") // Or irr.lib can't remember
[/source]
-1

Share this post


Link to post
Share on other sites
Which libraries contain those symbols? You will need to tell your linker about them, either by adding them on the command line, or by setting the appropriate option in the Code::Blocks GUI.

I guess you might need something like libx11 and libglx, but I don't have a Linux system handy to check their names.

This is another very common, easily solvable linker error. You will encounter this problem time and time again. They are very easy to fix with a little bit of knowledge. So, one last time, after which I give up: [b]Now's a really good time to read up on the C and C++ compilation model. Once you have a good understanding of that, fixing problems such these becomes very easy.[/b]
0

Share this post


Link to post
Share on other sites
[quote name='Jeffreyp' timestamp='1330545123' post='4917921']
[source]
#pragma comment(lib, "irrlicht.lib") // Or irr.lib can't remember
[/source]
[/quote]

That line of code is only used if your using Microsoft Visual Studio. I'm using Code::Blocks.

[quote name='edd²' timestamp='1330570450' post='4918065']
So, one last time, after which I give up: [b]Now's a really good time to read up on the C and C++ compilation model. Once you have a good understanding of that, fixing problems such these becomes very easy.[/b]
[/quote]

Well, could you please give me a book title that talks about this or maybe a website name...
0

Share this post


Link to post
Share on other sites
[quote name='Aluthreney' timestamp='1330594025' post='4918120']
Well, could you please give me a book title that talks about this or maybe a website name...
[/quote]
[url="http://www.lurklurk.org/linkers/linkers.html"]http://www.lurklurk.org/linkers/linkers.html[/url]
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0