Problem: Compiling poppler-0.42.0\qt4 on win10 with cmake and vs2010 reports the following error.
2>poppler-document.obj : error LNK2019: Unresolvable external symbol “__declspec(dllimport) public: int __thiscall QString::toWCharArray(wchar_t *)const ” (__imp _?toWCharArray@QString@@@QBEHPA_W@Z), the symbol in the function “public: __thiscall Poppler::DocumentData::DocumentData(class QString const &,class GooString * ,class GooString *)” (? ? 0DocumentData@Poppler@@QAE@ABVQString@@@PAVGooString@@1@Z) is referenced in
Reason: The Qt library itself compiles with /Zc:wchar_t- , if your program compiles with /Zc:wchar_t it will cause the compiler to have different rules for adapting function names
Whichever one it is, consistency is good.
Solution: Project – Properties – C/C++ – Language, Set wchar_t as a built-in type and change it to match the Qt library
Read More:
- [Solved] Visual studio 2022 error LNK2019: unable to resolve external symbol for
- [Solved] C++ Compile: error LNK2019: unresolved external “XX“
- [Solved] error C4996: QString::SkipEmptyParts declaration has been rejected
- Error 2 error c2491: XX: definition of dllimport static data member is not allowed
- [Solved] error LNK2038: Detected mismatch of “RuntimeLibrary”: The value “MDd_DynamicDebug” does not match the value “MTd_StaticDebug”
- [Solved] runtime error: reference binding to null pointer of type ‘std::vector<int, std::allocator<int>>‘
- Solve error LNK2001 about pcl::io::vtkPolyDataToPointCloud
- [Solved] Vscode Connect to the remote server error: permission denied (public key)
- [Solved] Use the truss console to connect to the public blockchain network error: mnemonic invalid or undefined
- [Solved] unesolved external symbol _imp_fprintf referenced in funciton _showerror
- Error lnk2038: detected “_ ITERATOR_ DEBUG_ Mismatched ‘level’ value of ‘0’
- [Solved] C++ Error: Undefined symbols for architecture x86_64:
- Axios request failed, get the status code and error information, how to encapsulate the function dealing with the public error code
- PHP Parse error: syntax error, unexpected ‘class‘ (T_CLASS), expecting identifier (T_STRING)
- result = e.symbols[symb] KeyError: b‘system‘ [How to Solve]
- LINK : fatal error LNK1104: Cannot Open the File “mfc90ud.lib”
- [Solved] Error:E0415 no suitable constructor exists to convert from “int“ to “Rational“
- Preprocessor Symbols setting error: error: redefinition of enumerator
- [Solved] error adding symbols: File in wrong format collect2: error: ld returned 1 exit status