Question

I am trying to build a given a precompiled header to create a static library. I do not use the eclipse ide (I use VC++10) and I need help understanding these instructions:

How to build GLUS:

  1. Install Eclipse IDE for C/C++ Developers and a GNU Compiler Collection for your operating system.
  2. Extract this ZIP file and set the workspace-cpp folder as your Eclipse workspace.
  3. Import each folder as a separate, existing project.
  4. Set the build configuration in Eclipse to your operating system.
  5. Build GLUS.

I have all the files for GLUS, but I have not yet linked GLEW and GFLW with eclipse (did it for vc++10 but dont know how in eclipse). So Id need help on that too.

Alternative: why dont I just compile it on VC++10? Well, I tried and keep getting error C1853 and cant solve it. So im trying to solve the problem by the instructions. >.>

otherwise, if it helps, all the sources are in .c. Any thoughts

Was it helpful?

Solution

It seems that the source code archive for GLUS supports CMake so why not just use that? Download the most recent GLUS source available here, unzip the source to any directory, and open a terminal / command prompt. Navigate to the directory you extracted the source code to and type cmake . (assuming cmake is installed in your system path)

In Windows:

CMake will generate a visual studio solution file which you can open with VS and build with F5. If the build is successful, this will generate a glus.lib file in GLUS/Debug. Add this library file to your lib path, and add the src files in /src to your include path.

Now, if your still getting precompiled header errors (error C1853), select the project node in Solution Explorer, right click, select "Properties->Configuration Properties->C/C++->Advanced->Compile As". Select "Compile as C Code (/TC)". Additionally you may want to navigate to "Properties->Configuration Properties->C/C++->Precompiled Headers". You can see the option settings here for precompiled headers, which you may want to play with;

In Unix / Linux / MAC:

After running cmake type make all to build and sudo make install to push the generated files into your system path.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top