Results 1 to 5 of 5

Thread: Unresolved external symbol

  1. #1
    Serf
    Join Date
    Jan 2011
    Posts
    2

    Default Unresolved external symbol

    I compiled the sunset example in tutorial2 and I got this:
    Code:
    1>clanDisplay-static-mt-debug.lib(png_provider.obj) : error LNK2019: unresolved external symbol _png_destroy_write_struct referenced in function "public: static void __cdecl CL_PNGProvider::save(class CL_PixelBuffer,class CL_IODevice &)" (?save@CL_PNGProvider@@SAXVCL_PixelBuffer@@AAVCL_IODevice@@@Z)
    1>clanDisplay-static-mt-debug.lib(png_provider.obj) : error LNK2019: unresolved external symbol _png_write_end referenced in function "public: static void __cdecl CL_PNGProvider::save(class CL_PixelBuffer,class CL_IODevice &)" (?save@CL_PNGProvider@@SAXVCL_PixelBuffer@@AAVCL_IODevice@@@Z)
    1>clanDisplay-static-mt-debug.lib(png_provider.obj) : error LNK2019: unresolved external symbol _png_write_image referenced in function "public: static void __cdecl CL_PNGProvider::save(class CL_PixelBuffer,class CL_IODevice &)" (?save@CL_PNGProvider@@SAXVCL_PixelBuffer@@AAVCL_IODevice@@@Z)
    1>clanDisplay-static-mt-debug.lib(png_provider.obj) : error LNK2019: unresolved external symbol _png_write_info referenced in function "public: static void __cdecl CL_PNGProvider::save(class CL_PixelBuffer,class CL_IODevice &)" (?save@CL_PNGProvider@@SAXVCL_PixelBuffer@@AAVCL_IODevice@@@Z)
    1>clanDisplay-static-mt-debug.lib(png_provider.obj) : error LNK2019: unresolved external symbol _png_set_IHDR referenced in function "public: static void __cdecl CL_PNGProvider::save(class CL_PixelBuffer,class CL_IODevice &)" (?save@CL_PNGProvider@@SAXVCL_PixelBuffer@@AAVCL_IODevice@@@Z)
    1>clanDisplay-static-mt-debug.lib(png_provider.obj) : error LNK2019: unresolved external symbol _png_set_write_fn referenced in function "public: static void __cdecl CL_PNGProvider::save(class CL_PixelBuffer,class CL_IODevice &)" (?save@CL_PNGProvider@@SAXVCL_PixelBuffer@@AAVCL_IODevice@@@Z)
    1>clanDisplay-static-mt-debug.lib(png_provider.obj) : error LNK2019: unresolved external symbol _png_set_read_fn referenced in function "public: static void __cdecl CL_PNGProvider::save(class CL_PixelBuffer,class CL_IODevice &)" (?save@CL_PNGProvider@@SAXVCL_PixelBuffer@@AAVCL_IODevice@@@Z)
    1
    Does anyone have any idea?

  2. #2
    ClanLib Developer
    Join Date
    Sep 2006
    Location
    Bergen, Norway
    Posts
    588

    Default

    Seems it does not link to the libpng library. Which is weird, because this is supposed to happen automatically. Does the first examples work for you?

    Did you create the solution yourself, or use the provided one?

    Also, read http://www.rtsoft.com/forums/showthr...lved-externals...

  3. #3
    Serf
    Join Date
    Jan 2011
    Posts
    2

    Default

    I tried the Hello World example. It works perfectly.
    The source code of the sunset example was download from the page. It should be correct.
    And I have read his problem. I am sure we are not the same.

    I am using VC++2008 on WindowsXP.

  4. #4
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,824

    Default

    it is strange.

    Sources/API/dispay.h contains, for that target:
    Code:
    	#pragma comment(lib, "clanDisplay-static-mt-debug.lib")
    	#pragma comment(lib, "libjpeg-static-mt-debug.lib")
    	#pragma comment(lib, "libpng-static-mt-debug.lib")
    	#pragma comment(lib, "freetype-static-mt-debug.lib")
    So it "should" automatically link libpng-static-mt-debug.lib

  5. #5
    ClanLib Developer
    Join Date
    Sep 2006
    Location
    Bergen, Norway
    Posts
    588

    Default

    And if you try some of the visual examples from the ClanLib distribution, do they compile correctly? (Look in the Examples\Display\Basic2D for example)

Similar Threads

  1. Replies: 5
    Last Post: 02-21-2011, 10:54 PM
  2. Unresolved externals...
    By Tuisto in forum Official ClanLib SDK Forums
    Replies: 2
    Last Post: 01-08-2011, 04:29 PM
  3. Updated ClanLib External Precompiled Libraries
    By rombust in forum Official ClanLib SDK Forums
    Replies: 0
    Last Post: 07-23-2010, 12:30 PM
  4. unresolved external symbol Error
    By Jorda in forum Official ClanLib SDK Forums
    Replies: 1
    Last Post: 02-05-2008, 03:39 AM

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •