• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

What is an "unresolved external symbol?"

halfpower

Senior member
I'm trying to compile something, but I have a linking error that says "unresolved external symbol." The error in it's entirety is
Linking...
Creating library E:\My System Files\vstsdk2.4\vstgui.sf\drawtest\win\Debug\drawtest.lib and object E:\My System Files\vstsdk2.4\vstgui.sf\drawtest\win\Debug\drawtest.exp
cfileselector.obj : error LNK2019: unresolved external symbol __imp__GetSaveFileNameA@4 referenced in function "public: long __thiscall VSTGUI::CFileSelector::run(struct VstFileSelect *)" (?run@CFileSelector@VSTGUI@@QAEJPAUVstFileSelect@@@Z)
cfileselector.obj : error LNK2019: unresolved external symbol __imp__GetOpenFileNameA@4 referenced in function "public: long __thiscall VSTGUI::CFileSelector::run(struct VstFileSelect *)" (?run@CFileSelector@VSTGUI@@QAEJPAUVstFileSelect@@@Z)
E:\My System Files\vstsdk2.4\vstgui.sf\drawtest\win\Debug\drawtest.dll : fatal error LNK1120: 2 unresolved externals

What causes this? How are such errors fixed?
 
It means that you are probably missing some libraries that you are supposed to include with whatever you are compiling..
 
The .h files are the headers with the definitions of functions, variables, classes, etc and the .lib files should be what is actually linked against.
 
You need to tell the linker to use/where to find the .lib files that your project needs.

The project has already compiled so the compiler was able to find the .h files.
 
Say I now have the following error message:
Linking...
LINK : fatal error LNK1104: cannot open file 'zlib.lib'
Why can't the compiler open 'zlib.lib'? I don't know where 'zlib.lib' would be. I'm not positive I compiled to a file named 'zlib.lib'. I have a 'zutil.obj' but I don't think that is the same thing.
 
Back
Top