openscenegraph/osgQt

Build problem: cannot find optimized.lib and debug.lib in release build

tqjxlm opened this issue · 4 comments

I used the default cmake configuration to configure the project. Debug version builds OK, but release version gets error like "cannot find optimized.lib and debug.lib".

I'll have to manually remove the link target in Visual Studio or XCode in order to build. But it is not viable when building with automatic building tools like vcpkg.

The problem exists on both windows and osx. I haven't tested linux yet.

The generated link target is like (in Visual Studio)

I:\Development\vcpkg\installed\x64-windows\lib\Qt5OpenGL.lib
optimized.lib
I:\Development\vcpkg\installed\x64-windows\lib\osg.lib
debug.lib
I:\Development\vcpkg\installed\x64-windows\debug\lib\osgd.lib
I:\Development\vcpkg\installed\x64-windows\lib\osgUtil.lib
I:\Development\vcpkg\installed\x64-windows\debug\lib\osgUtild.lib
I:\Development\vcpkg\installed\x64-windows\lib\osgViewer.lib
I:\Development\vcpkg\installed\x64-windows\debug\lib\osgViewerd.lib
I:\Development\vcpkg\installed\x64-windows\lib\osgGA.lib
I:\Development\vcpkg\installed\x64-windows\debug\lib\osgGAd.lib
I:\Development\vcpkg\installed\x64-windows\lib\osgDB.lib
I:\Development\vcpkg\installed\x64-windows\debug\lib\osgDBd.lib
I:\Development\vcpkg\installed\x64-windows\lib\OpenThreads.lib
I:\Development\vcpkg\installed\x64-windows\debug\lib\OpenThreadsd.lib
opengl32.lib
I:\Development\vcpkg\installed\x64-windows\lib\Qt5Widgets.lib
I:\Development\vcpkg\installed\x64-windows\lib\Qt5Gui.lib
I:\Development\vcpkg\installed\x64-windows\lib\Qt5Core.lib
kernel32.lib
user32.lib
gdi32.lib
winspool.lib
shell32.lib
ole32.lib
oleaut32.lib
uuid.lib
comdlg32.lib
advapi32.lib


osgQt: master version
osg: 3.6.3
CMake : 3.14
env: Windows 10 with vs 2017 and OSX Mohave with Xcode

This problem is reproduced and on Windows 7 with vs 2017

I've got this problem also.
I found that after run CMake-variable 'osgQt5_LIB_DEPENDS:STATIC' contains wrong value in CMakeCache.txt. This variable contains two words 'optimized;optimized' in a row. Please, help me for this problem. I reproduced this problem on Win7, MSVS2017.

I've got this problem also.Then I deleted the "optimized.lib" and "debug.lib" under the release of the project osgQt5 ,Examples osgviewerQt5 and Examples osgqfontQt5. The problem didn`t come up again.
osgQt: 3.5.7
osg: 3.6.4
CMake : 3.15
env: Windows 10 with vs 2017

thanks for the correction