Why won't this ClanLib "Hello World" project build in Eclipse CDT?

  • Why won't this ClanLib "Hello World" project build in Eclipse CDT? Fault

    I've been trying to get a simple Hello World working with ClanLib using CDT (Eclipse), but I'm just not getting it configured properly.

    First, from the command line, I'm able to get it to run using this command:

    g++ -o mygame mygame.cpp `pkg-config --cflags --libs clanCore-2.3 clanDisplay-2.3 clanGL-2.3 clanGL1-2.3 clanApp-2.3` -lpthread

    So no problems there.

    Anyways, I tried setting up the correct build settings in Eclipse, but I just don't know where I'm supposed to add the info for the libraries. I tried adding it in the linker section, that didn't work. I tried a bunch of other things, nothing seemed to work...

    Help would be appreciated, possibly as comprehensive as possible... I'm open to alternatives to Eclipse too. And the only reason this is such a problem is because this is the first time I'm trying to start a bigger C++ project, and I decided perhaps it's best to use some tools to make it a little easier, rather than a basic text editor (especially for debugging).

    Oh, and I'm running Ubuntu, if that makes a difference. I'm really surprised there aren't any tutorials for setting up ClanLib in a development environment as popular as Eclipse...

  • There are two places you need to do this to be sure that things will work, both of them are under Project->Properties->C/C++ Build->Settings->(MinGW) C++ Linker (assuming you're using MinGW):

    1. ->Libraries: add name of each lib you need without -l.
    2. ->Miscellaneous->Linker flags: add name of each lib you need in this textfield with -l prepended in every instance.

    And of course under Libraries, make sure you have set up your library search paths (usually "yourlib/lib" -- I would use absolute paths here, and make sure they're enclosed in double quotes.

    PS. Check the Console window to see what Eclipse is outputting for the g++ command.

c++ eclipse
Related questions and answers
  • Language 1.0 Several sites have mentioned that this should be "easy" to do in a GLSL vert shader. But I just can not get it to work. My hunch is that I'm not setting the planes up correctly, or I'm missing... I don't get how coord (a UV vec2 in my mind) is equal to the dot product (a scalar value)? Same problem I had before with "g". What do I set the plane to be? In my opengl c++ 3.0 code, I set...I also posted this on the main StackExchange, but this seems like a better place, but for give me for the double post if it shows up twice. I have been trying for several hours to implement a GLSL

  • I'm trying to implement a basic scene graph in DirectX using C++. I am using a left child-right sibling binary tree to do this. I'm having trouble updating each node's world transformation relative to its parent (and its parent's parent etc.). I'm struggling to get it to work recursively, though I can get it to work like this: for(int i = 0; i < NUM_OBJECTS; i++) { // Initialize...; } } toWorldXForm is the object's world transform and toParentXForm is the object's transform relative to the parent. I want to do this using a method within my object class (the code above

  • I am trying to build and run Doom 3 from the open source release in order to better understand how the engine works. Unfortunately I am not able to run the game from the binary I built. I just get... Steam Open the solution in the new folder using VS2010 SP1 Built the project Ran it The doom solution by default on the debug settings sets the command line to refer to the default steam doom3 installation path. This is the default command line arguments used to run the project from vstudio. +set fs_basepath "C:\Program Files (x86)\Steam\steamapps\common\doom 3" +set com_allowConsole 1 +set si

  • I enter the "gamestate" I call some functions such as setting up a basic scene, creating the physics simulation. I am doing that as follows. void GameState::enter() { ... // Setup Physics... code shows the changes I made to get accurate physics. void GameState::createScene() { m_pSceneMgr->createLight("Light")->setPosition(75,75,75); // Physics // As a test we want a floor plane...I have been playing around with Ogre3d and trying to integrate bullet physics. I have previously somewhat successfully got this functionality working with irrlicht and bullet and I am trying to base

  • them to be attached to the node in most cases, even if I allow setting global lights to the scene. @Nicol: Yes that's what I'm trying to figure out. You can see the code doesn't rely on any hardware... animation I would end up storing a lot of data that I don't really need, even if I'm indexing node and frame data when saving and then store the hierarchy with the indices to the actual data. I don't know if my speculations are ok, as I don't have much experience with 3d animations yet. I want to make a well decision as any option I choose would require a lot of work to get it to render and I

  • in order to get a texture that is CPU readable, I tried setting the D3DX10_IMAGE_LOAD_INFO structure to include D3D10_CPU_ACCESS_READ. This fails on D3DX10CreateShaderResourceViewFromFile() with E... as an atlas. To do so, the first thing I want to do is to call ID3D10Texture2D::Map() in order to get at the texels and parse them (to determine where my tiles are). The following call fails with E... file into my dynamic texture, so I can use the dynamic texture as a source to read texel data from. Will this approach work? Am I barking up the wrong tree and missing an obvious simpler route? I'm

  • I am studying entity indexed components and came up with a naive C++ implementation which just iterates over all entity "hash tables" and applies update/delete/insert functions in place. I'm having trouble maintaining a logical view of the game world (i.e. updates shouldn't be visible while iterating) and there is no attempt at maintaining spatial or temporal coherence of data. I wonder whether... components total. Or is this even feasible? How much I can accomplish with this approach? In essence I want to be able to do something like this with reasonable efficiency: moving_update(DB

  • code in them... Right now for testing purposes, I just have the main loop call Level1 level1; and use the functions, but when I run the game I get a segmentation fault. This is the first time I've tried writing inherited classes, so I know I'm doing something wrong, but I can't seem to figure out what exactly. ... that'll have the inherited level classes pushed onto it...This is what my code looks like at the moment, I've tried various things and get the same result (segmentation fault). //level.h class Level

  • I'm trying to get a 2 pass post-processing system going in OpenGL in a cross-platform manor using FBOs. I'm starting the dev on mac OSX (since in the past I've found it the most finicky to get...); glDrawArrays(GL_TRIANGLES, 0, 6); glBindTexture(GL_TEXTURE_2D, 0); } Tried everything I can think of or find in a FBO tutorial or have read about. I don't get any errors and it returns as complete... after I just get it working to begin with^^)

Data information