C API unresolved external symbol
-
I'm trying to compile and build the "Reading from a .skp file" example found at http://www.sketchup.com/intl/en/developer/su-api/
What I did:
- Installed Visual Studio C++ 2010 Express
- Downloaded the SDK
- Created a blank Win32 Console app and copied the example into it.
- Among the project settings set the location for the sdk header and lib files.
- Added
#include "stdafx.h"
as the first line of the example code. - Tried to build.
- Got a list of errors:
d external symbol __imp__SUTerminate referenced in function _main 1>skp demo.obj ; error LNK2019; unresolved external symbol __imp__SUModelRelease referenced in function _main 1>skp demo.obj ; error LNK2019; unresolved external symbol __imp__SUStringRelease referenced in function _main 1>skp demo.obj ; error LNK2019; unresolved external symbol __imp__SUStringGetUTF8 referenced in function _main 1>skp demo.obj ; error LNK2019; unresolved external symbol __imp__SUStringGetUTF8Length referenced in function _main 1>skp demo.obj ; error LNK2019; unresolved external symbol __imp__SUModelGetName referenced in function _main 1>skp demo.obj ; error LNK2019; unresolved external symbol __imp__SUStringCreate referenced in function _main 1>skp demo.obj ; error LNK2019; unresolved external symbol __imp__SUVertexGetPosition referenced in function _main 1>skp demo.obj ; error LNK2019; unresolved external symbol __imp__SUEdgeGetEndVertex referenced in function _main 1>skp demo.obj ; error LNK2019; unresolved external symbol __imp__SUEdgeGetStartVertex referenced in function _main 1>skp demo.obj ; error LNK2019; unresolved external symbol __imp__SUFaceGetEdges referenced in function _main 1>skp demo.obj ; error LNK2019; unresolved external symbol __imp__SUFaceGetNumEdges referenced in function _main 1>skp demo.obj ; error LNK2019; unresolved external symbol __imp__SUEntitiesGetFaces referenced in function _main 1>skp demo.obj ; error LNK2019; unresolved external symbol __imp__SUEntitiesGetNumFaces referenced in function _main 1>skp demo.obj ; error LNK2019; unresolved external symbol __imp__SUModelGetEntities referenced in function _main 1>skp demo.obj ; error LNK2019; unresolved external symbol __imp__SUModelCreateFromFile referenced in function _main 1>skp demo.obj ; error LNK2019; unresolved external symbol __imp__SUInitialize referenced in function _main 1>c;\users\user1\documents\visual studio 2010\Projects\skp demo\Debug\skp demo.exe ; fatal error LNK1120; 17 unresolved externals ========== Build; 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
The error messages obviously refer to the implementation of these functions are not found in the library files. I tried to copy the SDK libraries (.lib, .dll) to any directory I could imagine in the search path but still got the same error list on build.
Any ideas what needs to be done to successfully compile and build the example?
-
Generally, its better to amend the VS library search path rather than have multiple copies of libs/dlls
-
Thank you AdamB. I did add the path of the downloaded .dll and .lib to the VS library search path.
Somewhere I read that character encoding differences could cause such error messages. So I also tried to change the project's encoding settings without any luck....EDIT: Thank you. SUCCESS!!! (Well it was a missing reference to the lib... )
Advertisement