steinbergmedia / vst3sdk

VST 3 Plug-In SDK
Other
1.57k stars 162 forks source link

Fatal error LNK1104: cannot open file '..\..\..\..\lib\Debug\vstgui_uidescription.lib' #96

Closed bhaskar-c closed 1 year ago

bhaskar-c commented 1 year ago

VST SDK Version 3.7.6_build-18_2022-09-05 OS : Windows 10

I am trying to build VST samples. I generated .sln with default flags using command:

cmake.exe -G "Visual Studio 17 2022" -A x64 ../vst3sdk

However, building all samples that have GUI fails with the following error:

fatal error LNK1104: cannot open file '..\..\..\..\lib\Debug\vstgui_uidescription.lib'

Samples without GUI build successfully.

There is no vstgui_uidescription.lib in the lib folder. Apparently this is related to missing header file expat.h which is referenced in:

/// @cond ignore

if VSTGUI_USE_SYSTEM_EXPAT

include

else

.....

in file xmlparser.cpp in vstgui4 > vstgui > uidescription folder.

\xmlparser.cpp(14,10): fatal error C1083: Cannot open include file: 'expat.h': No such file or directory

ygrabit commented 1 year ago

Hi Can you provide the full output of your command cmake.exe.... ? Thanks

ygrabit commented 1 year ago

@bhaskar-c it seems an issue with installed perl (expact) please check this potential fix: https://github.com/steinbergmedia/vstgui/commit/7123ab67b431dd62f8bd1b8e9f02c0efbb7084da

bhaskar-c commented 1 year ago

@ygrabit

It was using Expat Library from msys64/mingw64/lib/libexpat.a Here's the output from command cmake.exe..

C:\Users\me\VSTPROGRAMMING\build>cmake.exe -G "Visual Studio 17 2022" -A x64 ../vst3sdk
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19045.
-- The C compiler identification is MSVC 19.33.31630.0
-- The CXX compiler identification is MSVC 19.33.31630.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.33.31629/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.33.31629/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- [SMTG] CMAKE_SOURCE_DIR is set to: C:/Users/me/VSTPROGRAMMING/vst3sdk
-- [SMTG] CMAKE_CURRENT_LIST_DIR is set to: C:/Users/me/VSTPROGRAMMING/vst3sdk
-- [SMTG] SMTG_VSTGUI_SOURCE_DIR is set to: C:/Users/me/VSTPROGRAMMING/vst3sdk/vstgui4
-- Found EXPAT: C:/msys64/mingw64/lib/libexpat.a (found version "2.4.9")
-- VSTGUI will use the Expat library at C:/msys64/mingw64/lib/libexpat.a
-- VSTGUI will use the Expat header found in C:/msys64/mingw64/include
-- [SMTG] SMTG_AAX_SDK_PATH is not set. If you need it, please download the AAX SDK!
-- Performing Test SMTG_USE_STDATOMIC_H
-- Performing Test SMTG_USE_STDATOMIC_H - Failed
.... some more unrelated stuff here.

I modified CMAKE as suggested by you above and used it instead but it still fails . Also If I switch to use the embedded expat package, I can see that the expat.h header is located in uidescription\expat directory and not in uidescription/ folder. So I get this error.

C:\Users\me\vst3sdk\vstgui4\vstgui\uidescription\xmlparser.cpp(14,10): fatal error C1083: Cannot open include file: 'expat.h': No such file or directory

scheffle commented 1 year ago

Can you check if there is an expat.h file in C:/msys64/mingw64/include? And if it is can you check that this folder is in the header search path of the vstgui_uidescription project?

bhaskar-c commented 1 year ago

A clean and fresh build of vstgui_uidescription project after your suggested changes solved the issue. Thanks a lot.