AcademySoftwareFoundation / OpenColorIO

A color management framework for visual effects and animation.
https://opencolorio.org
BSD 3-Clause "New" or "Revised" License
1.78k stars 455 forks source link

Building OCIO 2.4 on Windows gave a Linker errors to OpenColorIO_v2_4::OglApp #2081

Open ssh4net opened 5 days ago

ssh4net commented 5 days ago

cmake command:

cmake -D BUILD_SHARED_LIBS=ON -D OCIO_VERBOSE=ON -D ENABLE_SHARED=ON ^
-D OCIO_INSTALL_EXT_PACKAGES=NONE -D OCIO_BUILD_PYTHON=OFF -D OCIO_BUILD_APPS=ON ^
-D OCIO_BUILD_GPU_TESTS=OFF -D OCIO_BUILD_DOCS=OFF -D OCIO_BUILD_TESTS=OFF ^
-D Imath_LIBRARY=e:/DVR/lib/Imath-3_2.lib ^
-D expat_LIBRARY=e:/DVR/lib/libexpat.lib ^
-D GLEW_INCLUDE_DIRS=e:/DVR/include/GL ^
-D lcms2_ROOT=e:/GH/Little-CMS ^
-D lcms2_INCLUDE_DIR=e:/GH/Little-CMS/include ^
-D lcms2_LIBRARY=e:/GH/Little-CMS/bin/lcms2.lib ^
-D minizip-ng_LIBRARY=e:/DVR/lib/libminizip-ng.lib ^
-D yaml-cpp_LIBRARY=e:/DVR/lib/yaml-cpp.lib ^
-D yaml-cpp_INCLUDE_DIR=e:/DVR/include/yaml-cpp ^
-D pystring_LIBRARY=e:/DVR/lib/pystring.lib ^
-D DOXYGEN_EXECUTABLE="c:/Program Files/doxygen/bin/doxygen.exe" ^
-D CMAKE_BUILD_TYPE=Release ^
-D CMAKE_DEBUG_POSTFIX=_d ^
-D CMAKE_PREFIX_PATH=e:/DVR ^
-D CMAKE_INSTALL_PREFIX=e:/DVR ..

building:

cmake --build . --config Release --target install -j32
cmake --build . --config Release --target install -j32
MSBuild version 17.11.9+a69bbaaf5 for .NET Framework

  1>Checking Build System
  ociocpuinfo.vcxproj -> E:\GH\OpenColorIO\build\src\apps\ociocpuinfo\Release\ociocpuinfo.exe
  OpenColorIO.vcxproj -> E:\GH\OpenColorIO\build\src\OpenColorIO\Release\OpenColorIO_2_4.dll
  imageioapphelpers.vcxproj -> E:\GH\OpenColorIO\build\src\libutils\imageioapphelpers\Release\OpenColorIOimageioapphelpers.lib
  oglapphelpers.vcxproj -> E:\GH\OpenColorIO\build\src\libutils\oglapphelpers\Release\OpenColorIOoglapphelpers.lib
  apputils.vcxproj -> E:\GH\OpenColorIO\build\src\apputils\Release\apputils.lib
  ociomakeclf.vcxproj -> E:\GH\OpenColorIO\build\src\apps\ociomakeclf\Release\ociomakeclf.exe
  ociocheck.vcxproj -> E:\GH\OpenColorIO\build\src\apps\ociocheck\Release\ociocheck.exe
  ocioarchive.vcxproj -> E:\GH\OpenColorIO\build\src\apps\ocioarchive\Release\ocioarchive.exe
  ociobakelut.vcxproj -> E:\GH\OpenColorIO\build\src\apps\ociobakelut\Release\ociobakelut.exe
  ociolutimage.vcxproj -> E:\GH\OpenColorIO\build\src\apps\ociolutimage\Release\ociolutimage.exe
  ocioperf.vcxproj -> E:\GH\OpenColorIO\build\src\apps\ocioperf\Release\ocioperf.exe
  ociowrite.vcxproj -> E:\GH\OpenColorIO\build\src\apps\ociowrite\Release\ociowrite.exe
main.obj : error LNK2019: unresolved external symbol "public: void __cdecl OpenColorIO_v2_4::OglApp::createGLBuffers(void)" (?createGLBuffers@OglApp@OpenColorIO_v2_4@@QEAAXXZ) referenced in function main [E:\GH\OpenColorIO\build\src\apps\ocioconvert\ocioconvert.vcxproj]
main.obj : error LNK2019: unresolved external symbol "public: void __cdecl OpenColorIO_v2_4::OglApp::reshape(int,int)" (?reshape@OglApp@OpenColorIO_v2_4@@QEAAXHH@Z) referenced in function main [E:\GH\OpenColorIO\build\src\apps\ocioconvert\ocioconvert.vcxproj]
main.obj : error LNK2019: unresolved external symbol "public: static class std::shared_ptr<class OpenColorIO_v2_4::OglApp> __cdecl OpenColorIO_v2_4::OglApp::CreateOglApp(char const *,int,int)" (?CreateOglApp@OglApp@OpenColorIO_v2_4@@SA?AV?$shared_ptr@VOglApp@OpenColorIO_v2_4@@@std@@PEBDHH@Z) referenced in function
 main [E:\GH\OpenColorIO\build\src\apps\ocioconvert\ocioconvert.vcxproj]
E:\GH\OpenColorIO\build\src\apps\ocioconvert\Release\ocioconvert.exe : fatal error LNK1120: 3 unresolved externals [E:\GH\OpenColorIO\build\src\apps\ocioconvert\ocioconvert.vcxproj]
main.obj : error LNK2019: unresolved external symbol "public: void __cdecl OpenColorIO_v2_4::OglApp::reshape(int,int)" (?reshape@OglApp@OpenColorIO_v2_4@@QEAAXHH@Z) referenced in function "void __cdecl Reshape(int,int)" (?Reshape@@YAXHH@Z) [E:\GH\OpenColorIO\build\src\apps\ociodisplay\ociodisplay.vcxproj]
main.obj : error LNK2019: unresolved external symbol "public: void __cdecl OpenColorIO_v2_4::OglApp::createGLBuffers(void)" (?createGLBuffers@OglApp@OpenColorIO_v2_4@@QEAAXXZ) referenced in function "public: void __cdecl `anonymous namespace'::ProcessorWrapper::setGPU(class std::shared_ptr<class OpenColorIO_v2_4::
GPUProcessor const >)" (?setGPU@ProcessorWrapper@?A0x6d82f1bc@@QEAAXV?$shared_ptr@$$CBVGPUProcessor@OpenColorIO_v2_4@@@std@@@Z) [E:\GH\OpenColorIO\build\src\apps\ociochecklut\ociochecklut.vcxproj]
main.obj : error LNK2019: unresolved external symbol "public: __cdecl OpenColorIO_v2_4::ScreenApp::ScreenApp(char const *,int,int)" (??0ScreenApp@OpenColorIO_v2_4@@QEAA@PEBDHH@Z) referenced in function main [E:\GH\OpenColorIO\build\src\apps\ociodisplay\ociodisplay.vcxproj]
main.obj : error LNK2019: unresolved external symbol "public: void __cdecl OpenColorIO_v2_4::OglApp::reshape(int,int)" (?reshape@OglApp@OpenColorIO_v2_4@@QEAAXHH@Z) referenced in function main [E:\GH\OpenColorIO\build\src\apps\ociochecklut\ociochecklut.vcxproj]
E:\GH\OpenColorIO\build\src\apps\ociodisplay\Release\ociodisplay.exe : fatal error LNK1120: 2 unresolved externals [E:\GH\OpenColorIO\build\src\apps\ociodisplay\ociodisplay.vcxproj]
main.obj : error LNK2019: unresolved external symbol "public: static class std::shared_ptr<class OpenColorIO_v2_4::OglApp> __cdecl OpenColorIO_v2_4::OglApp::CreateOglApp(char const *,int,int)" (?CreateOglApp@OglApp@OpenColorIO_v2_4@@SA?AV?$shared_ptr@VOglApp@OpenColorIO_v2_4@@@std@@PEBDHH@Z) referenced in function
 "public: void __cdecl `anonymous namespace'::ProcessorWrapper::setGPU(class std::shared_ptr<class OpenColorIO_v2_4::GPUProcessor const >)" (?setGPU@ProcessorWrapper@?A0x6d82f1bc@@QEAAXV?$shared_ptr@$$CBVGPUProcessor@OpenColorIO_v2_4@@@std@@@Z) [E:\GH\OpenColorIO\build\src\apps\ociochecklut\ociochecklut.vcxproj]
E:\GH\OpenColorIO\build\src\apps\ociochecklut\Release\ociochecklut.exe : fatal error LNK1120: 3 unresolved externals [E:\GH\OpenColorIO\build\src\apps\ociochecklut\ociochecklut.vcxproj]
ssh4net commented 5 days ago

Probably the problem is that on windows freeglut is always building as freeglut but on linux as glut?

FREEGLUT_REPLACE_GLUT       [ON, OFF] For non-Windows platforms,
                            freeglut is by default built as -lglut. if
                            off, built as -lfreeglut. On Windows,
                            libraries are always built as freeglut.