bjornblissing / osg-3rdparty-cmake

CMake scripts for building OpenSceneGraph third party libraries.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Having a weird issue

loopless opened this issue · comments

I am trying to build for VS 2015. I followed the readme , but when I hit configure I get all sorts of errors.

CMake Warning (dev) at freetype/CMakeLists.txt:200 (ADD_LIBRARY):
Syntax error in cmake code when parsing string

D:\VAOne2017\OSG\freetype-2.3.9/include/ft2build.h

Invalid escape sequence \V

Policy CMP0010 is not set: Bad variable reference syntax is an error. Run
"cmake --help-policy CMP0010" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.
This warning is for project developers. Use -Wno-dev to suppress it.

Ok, it looks like the above were just warnings. The real reason why CMake failed is below...
Looks like fseeko is missing from VS2015

ClCompile:

C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\x86_amd64\CL.exe /c /Zi /W3 /WX- /Od /Ob0 /D WIN32 /D _WINDOWS /D CHECK_FUNCTION_EXISTS=fseeko /D _DEBUG /D "CMAKE_INTDIR="Debug"" /D _MBCS /Gm- /RTC1 /MDd /GS /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_91f65.dir\Debug" /Fd"cmTC_91f65.dir\Debug\vc140.pdb" /Gd /TC /errorReport:queue "C:\Program Files\CMake\share\cmake-3.7\Modules\CheckFunctionExists.c"

Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24213.1 for x64

Copyright (C) Microsoft Corporation. All rights reserved.

cl /c /Zi /W3 /WX- /Od /Ob0 /D WIN32 /D _WINDOWS /D CHECK_FUNCTION_EXISTS=fseeko /D _DEBUG /D "CMAKE_INTDIR="Debug"" /D _MBCS /Gm- /RTC1 /MDd /GS /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_91f65.dir\Debug" /Fd"cmTC_91f65.dir\Debug\vc140.pdb" /Gd /TC /errorReport:queue "C:\Program Files\CMake\share\cmake-3.7\Modules\CheckFunctionExists.c"

CheckFunctionExists.c

Link:

C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\x86_amd64\link.exe /ERRORREPORT:QUEUE /OUT:"D:\VAOne2017\OSG\OSGThirdPartyBuildVS2015\CMakeFiles\CMakeTmp\Debug\cmTC_91f65.exe" /INCREMENTAL /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"D:/VAOne2017/OSG/OSGThirdPartyBuildVS2015/CMakeFiles/CMakeTmp/Debug/cmTC_91f65.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"D:/VAOne2017/OSG/OSGThirdPartyBuildVS2015/CMakeFiles/CMakeTmp/Debug/cmTC_91f65.lib" /MACHINE:X64 /machine:x64 cmTC_91f65.dir\Debug\CheckFunctionExists.obj

CheckFunctionExists.obj : error LNK2019: unresolved external symbol fseeko referenced in function main [D:\VAOne2017\OSG\OSGThirdPartyBuildVS2015\CMakeFiles\CMakeTmp\cmTC_91f65.vcxproj]

D:\VAOne2017\OSG\OSGThirdPartyBuildVS2015\CMakeFiles\CMakeTmp\Debug\cmTC_91f65.exe : fatal error LNK1120: 1 unresolved externals [D:\VAOne2017\OSG\OSGThirdPartyBuildVS2015\CMakeFiles\CMakeTmp\cmTC_91f65.vcxproj]

Done Building Project "D:\VAOne2017\OSG\OSGThirdPartyBuildVS2015\CMakeFiles\CMakeTmp\cmTC_91f65.vcxproj" (default targets) -- FAILED.

Build FAILED.

Or more to the point, the function fseeko does not exist in Visual Studio 2015, and CMake should not be compiling a test program that looks for it.

I didn't have any problem using vs2015.

On Oct 27, 2016 9:05 AM, "loopless" notifications@github.com wrote:

Ok, it looks like the above were just warnings. The real reason why CMake
failed is below...
Looks like fseeko is missing from VS2015

ClCompile:

C:\Program Files (x86)\Microsoft Visual Studio
14.0\VC\bin\x86_amd64\CL.exe /c /Zi /W3 /WX- /Od /Ob0 /D WIN32 /D _WINDOWS
/D CHECK_FUNCTION_EXISTS=fseeko /D _DEBUG /D "CMAKE_INTDIR="Debug"" /D
_MBCS /Gm- /RTC1 /MDd /GS /Zc:wchar_t /Zc:forScope /Zc:inline
/Fo"cmTC_91f65.dir\Debug" /Fd"cmTC_91f65.dir\Debug\vc140.pdb" /Gd /TC
/errorReport:queue "C:\Program Files\CMake\share\cmake-3.7
Modules\CheckFunctionExists.c"

Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24213.1 for x64

Copyright (C) Microsoft Corporation. All rights reserved.

cl /c /Zi /W3 /WX- /Od /Ob0 /D WIN32 /D _WINDOWS /D
CHECK_FUNCTION_EXISTS=fseeko /D _DEBUG /D "CMAKE_INTDIR="Debug"" /D _MBCS
/Gm- /RTC1 /MDd /GS /Zc:wchar_t /Zc:forScope /Zc:inline
/Fo"cmTC_91f65.dir\Debug" /Fd"cmTC_91f65.dir\Debug\vc140.pdb" /Gd /TC
/errorReport:queue "C:\Program Files\CMake\share\cmake-3.7
Modules\CheckFunctionExists.c"

CheckFunctionExists.c

Link:

C:\Program Files (x86)\Microsoft Visual Studio
14.0\VC\bin\x86_amd64\link.exe /ERRORREPORT:QUEUE /OUT:"D:\VAOne2017\OSG
OSGThirdPartyBuildVS2015\CMakeFiles\CMakeTmp\Debug\cmTC_91f65.exe"
/INCREMENTAL /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib
shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib
/MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'"
/manifest:embed /DEBUG /PDB:"D:/VAOne2017/OSG/OSGThirdPartyBuildVS2015/
CMakeFiles/CMakeTmp/Debug/cmTC_91f65.pdb" /SUBSYSTEM:CONSOLE /TLBID:1
/DYNAMICBASE /NXCOMPAT /IMPLIB:"D:/VAOne2017/OSG/OSGThirdPartyBuildVS2015/
CMakeFiles/CMakeTmp/Debug/cmTC_91f65.lib" /MACHINE:X64 /machine:x64
cmTC_91f65.dir\Debug\CheckFunctionExists.obj

CheckFunctionExists.obj : error LNK2019: unresolved external symbol fseeko
referenced in function main [D:\VAOne2017\OSG\OSGThirdPartyBuildVS2015
CMakeFiles\CMakeTmp\cmTC_91f65.vcxproj]

D:\VAOne2017\OSG\OSGThirdPartyBuildVS2015\CMakeFiles\CMakeTmp\Debug\cmTC_91f65.exe
: fatal error LNK1120: 1 unresolved externals [D:\VAOne2017\OSG
OSGThirdPartyBuildVS2015\CMakeFiles\CMakeTmp\cmTC_91f65.vcxproj]

Done Building Project "D:\VAOne2017\OSG\OSGThirdPartyBuildVS2015
CMakeFiles\CMakeTmp\cmTC_91f65.vcxproj" (default targets) -- FAILED.

Build FAILED.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#38 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAqXF1eR9VtjOX5wF4sVJ8laewbZ4Uvvks5q4MvcgaJpZM4KigGM
.

The problem 1 is being caused by this line in the osg-3rdparty-cmake-master\zlib\CMakeLists.txt. This causes my CMake step to fail.

Check for fseeko

check_function_exists(fseeko HAVE_FSEEKO)
IF(NOT HAVE_FSEEKO)
ADD_DEFINITIONS(-DNO_FSEEKO)
ENDIF()

After removing that, the next problem I hit was caused by
ENABLE_LANGUAGE(ASM_MASM)
"Checking whether the ASM_MASM compiler is..."
Did not succeed, as none of the options passed to MASM to detect the version return a string CMake is happy with.

Ah, I found the source of all my issues, I was pasting Windows Paths with '' directly into CMake. My mistake.