<div dir="ltr"><div>Hello,</div><div><br></div><div>I have troubles getting an example work on Windows 10.</div><div><br></div><div>I built the library with `cmake CMakeLists.txt` + `msbuild INSTALL.vcxproj` with x86_64 command prompt of Visual Studio.<br></div><div><br></div><div>Build files got installed under `C:\Program Files (x86)` although I examined the lib using dumpbin.exe and found it's 64-bit.</div><div><br></div><div>Also I know there shouldn't be any space in the library path, but this does not seem to be the problem when building with Visual Studio.</div><div><br></div><div>So I setup a project in Visual Studio, added all the necessary information to the project (Include-Dir, Lib-Dir + Lib) and then I build the project without success.</div><div><br></div><div>I'm getting unresolved external symbol errors as if the Lib got not linked. But it is:<br></div><div><br></div><div><span style="font-family:monospace">1>    C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\bin\HostX86\x64\link.exe /ERRORREPORT:PROMPT /OUT:"C:\Users\\eigenartig\source\repos\exercise\x64\Debug\exercise.exe" /INCREMENTAL /NOLOGO tag.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG:FASTLINK /PDB:"C:\Users\\eigenartig\source\repos\exercise\x64\Debug\exercise.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"C:\Users\\eigenartig\source\repos\exercise\x64\Debug\exercise.lib" /MACHINE:X64 x64\Debug\main.obj</span></div><div><span style="font-family:monospace"><br></span></div><div><span style="font-family:monospace"><font face="arial,sans-serif">Building with 32-bit gives me architecture mismatch warnings.</font></span></div><div><span style="font-family:monospace"><font face="arial,sans-serif"><br></font></span></div><div><span style="font-family:monospace"><font face="arial,sans-serif">I found this behavior on both TagLib 1.11 and TagLib 1.11.1 releases and I'm getting unresolved external symbols for everything, not just for TagLib::String.</font></span></div><div><span style="font-family:monospace"><font face="arial,sans-serif"><br></font></span></div><div><span style="font-family:monospace"><font face="arial,sans-serif">I tried two build systems, MSVC and Qt.<br></font></span></div><div><span style="font-family:monospace"><font face="arial,sans-serif"><br></font></span></div><div><span style="font-family:monospace"><font face="arial,sans-serif">Can you help me making this work?</font><br></span></div><div><span style="font-family:monospace"><br></span></div><div><span style="font-family:monospace">1>------ Build started: Project: exercise, Configuration: Debug x64 ------<br>1>main.cpp<br>1>C:\Program Files (x86)\taglib\include\taglib\tiostream.h(53,30): warning C4251: 'TagLib::FileName::m_name': class 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>' needs to have dll-interface to be used by clients of class 'TagLib::FileName'<br>1>D:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\include\xstring(4564): message : see declaration of 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>'<br>1>C:\Program Files (x86)\taglib\include\taglib\tiostream.h(54,31): warning C4251: 'TagLib::FileName::m_wname': class 'std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>' needs to have dll-interface to be used by clients of class 'TagLib::FileName'<br>1>D:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\include\xstring(4565): message : see declaration of 'std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t>>'<br>1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl TagLib::String::String(char const *,enum TagLib::String::Type)" (__imp_??0String@TagLib@@QEAA@PEBDW4Type@01@@Z) referenced in function main<br>1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __cdecl TagLib::String::~String(void)" (__imp_??1String@TagLib@@UEAA@XZ) referenced in function main<br>1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl TagLib::FileRef::FileRef(void)" (__imp_??0FileRef@TagLib@@QEAA@XZ) referenced in function main<br>1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __cdecl TagLib::FileRef::~FileRef(void)" (__imp_??1FileRef@TagLib@@UEAA@XZ) referenced in function main<br>1>C:\Users\eigenartig\source\repos\exercise\x64\Debug\exercise.exe : fatal error LNK1120: 4 unresolved externals<br>1>Done building project "exercise.vcxproj" -- FAILED.<br>========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========</span></div><div><span style="font-family:monospace"><br></span></div><div><span style="font-family:arial,sans-serif">Trying to successfully compile the following code:</span></div><div><span style="font-family:monospace"><br></span></div><div><span style="font-family:monospace">#include <taglib/taglib.h><br>#include <taglib/tstring.h><br><br>int main() {<br> TagLib::String string("hello");<br>}</span></div></div>