• Login
sketchucation logo sketchucation
  • Login
⚠️ Libfredo 15.4b | Minor release with bugfixes and improvements Update

C API unresolved external symbol

Scheduled Pinned Locked Moved Developers' Forum
3 Posts 2 Posters 704 Views 2 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    Gábor
    last edited by 2 Jul 2014, 13:57

    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:

    1. Installed Visual Studio C++ 2010 Express
    2. Downloaded the SDK
    3. Created a blank Win32 Console app and copied the example into it.
    4. Among the project settings set the location for the sdk header and lib files.
    5. Added #include "stdafx.h" as the first line of the example code.
    6. Tried to build.
    7. 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?

    1 Reply Last reply Reply Quote 0
    • A Offline
      AdamB
      last edited by 3 Jul 2014, 13:09

      Generally, its better to amend the VS library search path rather than have multiple copies of libs/dlls

      Developer of LightUp Click for website

      1 Reply Last reply Reply Quote 0
      • G Offline
        Gábor
        last edited by 3 Jul 2014, 14:35

        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... 😳 )

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        1 / 1
        • First post
          1/3
          Last post
        Buy SketchPlus
        Buy SUbD
        Buy WrapR
        Buy eBook
        Buy Modelur
        Buy Vertex Tools
        Buy SketchCuisine
        Buy FormFonts

        Advertisement