Hi everyone I am gonna show you to build CLHEP in Windows platform using Mingw-w64.
- Mingw-w64 (check Mingw & CMake installation in Windows)
- CMake (check Mingw & CMake installation in Windows)
- The official Release of CLHEP does not work but I created my own patch for that.
- You can download from there : link
- After download extract it and create a folder named build next to it.
- Open a command prompt, go to your build folder and type;
- This will open an CMake-gui window, press configure couple times.
- Now you should have something like this;
- I changed CMAKE_INSTALL_PREFIX to “C:\Dev\CLHEP” you can change it to wherever you want.
- After you sure about your configurations pres configure couple times and and generate.
- Close the CMake-Gui window and open a command prompt again and go to your build folder. Now type;
- This will build CLHEP after everything is done type to your command prompt;
- This will copy files to the CMAKE_INSTALL_PREFIX.
Configure your System for CLHEP
Now we have to add CLHEP binaries to our system’s Path variable
- Open a command prompt and type;
- That should open a System Properties window from Advanced tab click Environment Variables.
- After that select Path from System Variables (Table in bottom) and click Edit;
- After that click new and browse and add your CLHEP installation’s bin folder (mine is C:\Dev\CLHEP\bin)
- Now close the every window by clicking okey (don’t close with X at top tight otherwise it doesn’t save lol :)).
- You installed CLHEP successfully congratulations