I recently purchased the OpenGL SuperBible 6th Edition to learn about OpenGL 4, which comes with a load of example code. The authors made a best-effort attempt to make the code buildable on Windows/Linux by providing a Visual Studio 2010 project and a CMake file.
That being said, I would like to use this example code in Eclipse, as that is my preferred IDE. I've got Eclipse CDT, Visual Studio 2012 Professional, MinGW and CMake on my machine. I thought that it would be simple enough to port the project into an Eclipse project, but so far, my attempts have been fruitless. Here's what I've done:
First, I tried to make an Eclipse project from the CMake file. Apparently, in CMake (which I'm not familiar with), you can run a command to generate Eclipse project files. From the description, I got the idea that the CMake file was intended for Linux, So I ran the below command from within the base directory of the project:
cmake -G "Eclipse CDT4 - Unix Makefiles" ./
Which on first inspection, seemed to work. However, when I imported the generated project into Eclipse and subsequently built it, I got a bunch of undefined reference errors; perhaps it's a Linux/Windows problem?
Second, after that failed, I thought I might be able to convert the Visual Studio project to an Eclipse project. I Googled that, and got this tutorial from IBM, which described exporting a makefile from VS and then using that. However, it is horribly outdated (the tutorial is from 2006; apparently VS dropped the "export makefile" option a while ago). I can run the project just fine from VS, so I know that the code is all good.
So now, I'm at a loss. Can anyone offer any insight on porting this project to Eclipse? I suppose I could import the code by hand, but as I'm not really familiar with this code yet (that's why I bought the book!) I'd prefer to use the simplest method to avoid screwing something up.