0

I need to compile boost 1.39.0 library which on this version, don't provide installer in order to run a Visual Studio 2008 solution. The Cmake throw this exception.

-- Building for: Visual Studio 9 2008
 -- The C compiler identification is unknown
 -- The CXX compiler identification is unknown

 CMake Error at CMakeLists.txt: 28 (project):
  No CMAKE_C_COMPILER could be found.
  No CMAKE_CXX_COMPILER could be found.

I couldn't figure out how could i specify where it could find visual studio compiler.

I'm using boost 1.39.0 with CMake 3.0.0

Kind regards.

Peter Petrik
  • 9,701
  • 5
  • 41
  • 65
Wiist
  • 25
  • 8
  • 1
    This question appears to be off-topic because it is not in english – Steve Jul 10 '14 at 12:18
  • You can also set the `CC` and `CXX` environment variables to point to VS2008's `cl.exe` before calling `cmake`. [See this](http://www.cmake.org/Wiki/CMake_FAQ#How_do_I_use_a_different_compiler.3F). – Cameron Jul 10 '14 at 13:39
  • Thks for your help Peter but how could i do it with command line in Windows, i see that it refere to Linux for this instructions. – Wiist Jul 10 '14 at 14:13
  • Open Visual Studio command prompt (Start->VisualStudio->VisualStudio Tools->...) - all the relevant environment vars will be set automatically. Run `cmake` there. – Igor R. Jul 10 '14 at 15:30

1 Answers1

1

I usually build Boost with the bjam:

  1. Run bootstrap.bat (it's the root directory of boost sources). This creates a bjam.exe.
  2. Run bjam. Use this parameters (for 64 bit):
    bjam toolset=msvc-9.0 --build-type=complete address-model=64 stage

You will find all built binaries in the stage directory. See this for more info.

Tomas
  • 2,170
  • 10
  • 14
  • Hi Tomas, thanks for your help, how could i see all the warnings that bjam throw during compilation, I am concerned that this could lead to my application. – Wiist Jul 10 '14 at 14:23