How to use MCLIB with Eclipse

Project Properties configuration

This is a step by step guide to configure a Visual Studio Project to use MCLIB.

  1. Create a new empty project in Visual Studio.
  2. Open the project properties (Toolbar -> Project -> Properties).
  3. Select the C/C++ Build Settings from the left panel (C/C++ Build -> Settings).
  4. Now we need to add the MCLIB Headers:
    • Go to GCC C++ Compiler -> Includes and add the directory where the MCLIB headers are located (MCLIB/includes folder is located in the MCLIB Package).

  5. Now we need to specify to Eclipse that we need to use the MCLIB library.
    • Go to GCC C++ Linker -> Libraries and add MCLIB (or MCLIBD if you are configuring with Debug)
    • Also add the library search path (MCLIB/lib-linux-x86) 
  6. If we are compiling on a 64bits environment, we should specify that the binaries should be generated in 32bits architecture.
    • Go to GCC C++ Compiler -> Miscellaneous and append "-m32" to the Other flags section.

    • Go to GCC C++ Linker -> Miscellaneous and append "-m32" to the Other flags section.

  7. Now we are able to compile and run MCLIB projects in Eclipse.