If you're compiling the project through the Visual Studio IDE, the Visual Studio IDE silently uses a 32-bit compiler. To change this behavior, use the command:
msbuild {solution-name}.sln /property:Configuration=Release"
To find the path to the msbuild
command on your system, use the command below:
where msbuild
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe
If the where msbuild
command does not return a path like C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe
, but your system has msbuild
installed, go to the system variables and add the MSBuild.exe
path to the system path in the file structure where Microsoft Visual Studio is installed. Remove other msbuild
path variable from system variables (like C:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe
). Otherwise, this change may not work.
In another graphics library (solution, issue) it is reported how to solve a similar problem and its solution is reported as solved as above.
When installing OpenGV under Window it is stated in the documentation that the msbuild
configuration should be changed as follows:
msbuild opengv.sln /p:Configuration=Release
In addition, if the cmake
build tool will be used in the project, the following declaration should be made using the -G
option to compile for x64 target machine:
cmake -G "Visual Studio 16 2019" -A x64 ../
# cmake -G "Visual Studio 16 2019" -A Win32 ../
# cmake -G "Visual Studio 16 2019" -A ARM ../
# cmake -G "Visual Studio 16 2019" -A ARM64 ../