build CGAL using visual studio , cmake - visual-studio

I'm trying to compile CGAL Library using visual studio on windows. I'm following the steps of this tutorial :
https://www.cgal.org/download/windows.html#BuildingCGAL
I finished configuration and generation using cmake
I stopped at the following step : *Run Visual Studio and compile ALL_BUILD project both in Debug and Release.
when I open CGAL.sln and rebuild "Allbuild" project or "install" project , it shows the following errors:
I appreciate any help , thanks in advance

You must install GMP and MPFR. If you install CGAL with the installer it is an option to download the precompiled versions of these two libraries.

right click on project-> properties -> linker
add C:\dev\CGAL-4.9\build\bin\Debug manually
right click on project-> properties ->c\c++
C:\dev\CGAL-4.9\auxiliary\mpfr\include

Related

CMake project target issue in Visual Studio 2017

I'm trying to run a cmake project (openmvg, for now) in Visual Studio 2017.
I believe I've installed it correctly following the instructions.
Now, when I try to run it (Release / Win32), I get the following error message:
"Unable to start program "D:\openMVG\build\Release\ALL_BUILD"
I've checked the CMakePredefinedTargets, but I can't find a project target except ALL_BUILD, INSTALL, and `ZERO_CHECK.
Can anyone help with this problem? I'll appreciate any answer to it. Thanks.
By default a newly generated MSVC project will always set "ALL_BUILD" as its Startup Project. To run the project you need you have to set it manually by clicking (right button) on the project and choosing "Set as StartUp Project".
CMake predefined targets are there for, well, predefined CMake targets. Those exist for rebuilding, test running, installing etc. Usually they aren't candidates to be startup projects but some of your projects are.

LLVM Visual Studio Integration Failed

I'm trying to integrate LLVM with Visual Studio 15 2017, however I seem to be unable to get it to work. When running the LLVM installer after Visual Studio has been installed, I get a command prompt with the following error:
Installing MSVC integration...
Failed to find MSBuild toolsets directory.
MSVC integration install failed.
Press any key to continue . . .
After some research online, I found this SO link which has lead me to believe that the LLVM installer does not know how to install for VS15. As such, I tried installing the toolset found here manually. Now, I can see LLVM listed as a toolset in Visual Studio:
However, when I choose it as an option and try to compile a simple "Hello World" program, I get the following error:
error MSB8020: The build tools for LLVM-vs2017 (Platform Toolset = 'LLVM-vs2017') cannot be found.
To build using the LLVM-vs2017 build tools, please install LLVM-vs2017 build tools.
Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution".
Is there something I am doing wrong here, or some step I missed when trying to get these two tools integrated?
LLVM Visual Studio Integration Failed
After the test, you should execute the AutoSetup.bat to install the LLVM 6.0.0 automatically.
Plasmacel provided a fork which is updated for LLVM 6.0.0 and provides better integration by providing include and library paths of LLVM/clang. In the file README.MD, you can find the some more details, like Automatic Installation:
Automatic Installation
Open a command prompt with Administrator rights
(DO NOT OPEN AutoSetup.bat with admin rights it won't load the files)
Go to the folder where AutoSetup.bat exists and type "AutoSetup"
If Automatic doesn't work, you can also go to the Manual Installation.
Hope this helps.

FreeGLUT 3.0.0 Visual Studio solution?

Where is the Visual Studio solution for FreeGLUT 3.0.0? I know the 2.8.1 has one, but 3.0.0 does not. I would really like to use the latest version.
Use the included CMakeLists.txt to create a Visual Studio solution:
How to build freeglut with CMake on Windows (MS Visual Studio)
Download CMake (http://www.cmake.org/cmake/resources/software.html).
Get one of the releases from the binary distribution section.
Run the CMake installer, install wherever you like.
Launch CMake via Start > Program Files > CMake 2.8 > CMake (GUI)
(note that the shortcut put by the installer on your desktop does NOT
point to the CMake GUI program!)
In the "Where is the source code" box, type or browse to the root
directory of your freeglut source (so that's /freeglut, not
/freeglut/src).
In the "Where to build the binaries" box, type or browse to any
folder you like - this will be where the Visual Studio solution will be
generated. This folder does not have to exist yet.
Hit the Configure button near the bottom of the window.
Pick your target compiler, make sure that its installed on your
system of course!
Answer Ok when asked if you want to create the build directory.
Wait for the configure process to finish.
The screen will now have some configuration options on it, for
instance specifying whether you want to build static and/or shared
libraries (see below for a complete list). When you've selected your
options, click the Configure button again.
The Generate button at the bottom will now be enabled. Click Generate.
The build files will now be generated in the location you picked.
You can now navigate to the build directory you specified in step 5.
Open the freeglut.sln file that was generated in your build directory,
and compile as usual

Static build of Assimp using Cmake & VS2013: cannot find assimpd.pdb

I am trying to statically build Assimp on Windows to later make a standalone executable. Here is what I did:
I downloaded the 3.1.1 version and used Cmake GUI.
I unchecked BUILD_SHARED_LIBS and checked ASSIMP_BUILD_STATIC_LIB
Clicked on configure and Generate
Opened the solution with Visual Studio 2013 in administrator mode
Right cliked on ALL_BUILD and build
At this point everything worked fine. Then I tried to build INSTALL (right click > build) and it failed with:
file INSTALL cannot find
"C:/Users/.../assimp-3.1.1/build/code/Debug/assimpd.pdb"
I have two questions:
Should I actually build INSTALL as I only want a static build?
If yes, what did I do wrong/what should I do to fix this?
Thank you very much for your time!
PS: I checked the directory Debug and there is only a assimpd.lib

Compiling FFTW source in Visual studio

Recently I am trying to compile the source code of FFTW in Visual studio 2010. I followed the instruction from the FFTW website. I downloaded the source code fftw-3.3.2.zip and corresponding vs 2010 package fftw-3.3-libs-visual-studio-2010.zip.
I got four projects from the solution, bench, benchf, libfftw-3.3, libfftwf-3.3
But on compiling I got following errors on each of the project:
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\x64\Microsoft.Cpp.x64.Targets(514,5): error MSB8008: Specified platform toolset (Windows7.1SDK) is not installed or invalid. Please make sure that a supported PlatformToolset value is selected.
which points to the following content
I have tried the debug/release build for both x64 and win32, none of them worked.
Could anyone please help me on this?
It seems that it can be solved without installing the Windows 7.1 SDK
Right click on the 'libfftw-3.3' project and selected properties
Go to Configuration Properties -> General
Switch 'Platfrom Toolset' from 'Windows7.1SDK' to 'v100'
Recompile
Works for the projects 'libfftwf-3.3' and 'libfftw-3.3'
The project 'bench' and 'benchf' are failing to build:
fatal error C1083: Cannot open source file: '....\libbench2\aligned-main.c': No such file or directory
Can be solved by removing the aligned-main.c from both projects.
You can also use CMake - I created this CMake file for fftw-3.3.2 which I tested with Visual Studio 2010 x64:
https://bitbucket.org/Vertexwahn/cmakedemos/src/670f189321d89dbd61ddc8c446c91578305f9da2/fftw-3.3.2/CMakeLists.txt?at=default
You also need this config.h file:
https://bitbucket.org/Vertexwahn/cmakedemos/src/670f189321d89dbd61ddc8c446c91578305f9da2/fftw-3.3.2/config.h?at=default
It looks like you need to install the Windows 7.1 SDK, if you have already installed it, try reinstalling it incase it is corrupted.
You can download the 7.1 SDK from http://www.microsoft.com/en-us/download/details.aspx?id=8279

Resources