Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: MFC VC++
Hello friends i a fresher trying to learn MFC VC++ .. I am trying to Build and dll which uses function from other dll. I have specified the lib path in properties and Include path too. but i am still getting these linking error's.
 

Error 1515 error LNK2019: unresolved external symbol _png_info_init referenced in function "public: virtual int __thiscall CImagePNG::ReadFile(class ATL::CStringT<char,class> > > const &)" (?ReadFile@CImagePNG@@UAEHABV?$CStringT@DV?$StrTraitMFC_DLL@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@@Z) I:\cpoy2 ProjectVS2010\ProjectVS2010\DLLWorkspaces\WidgetControls\WidgetControls\Image.lib(Imapng.obj)
 

 

Error 1514 error LNK2019: unresolved external symbol _png_read_init referenced in function "public: virtual int __thiscall CImagePNG::ReadFile(class ATL::CStringT<char,class> > > const &)" (?ReadFile@CImagePNG@@UAEHABV?$CStringT@DV?$StrTraitMFC_DLL@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@@Z) I:\cpoy2 ProjectVS2010\ProjectVS2010\DLLWorkspaces\WidgetControls\WidgetControls\Image.lib(Imapng.obj)
 

 

Error 1516 error LNK2019: unresolved external symbol _png_write_init referenced in function "public: virtual int __thiscall CImagePNG::SaveFile(class ATL::CStringT<char,class> > > const &,int)" (?SaveFile@CImagePNG@@UAEHABV?$CStringT@DV?$StrTraitMFC_DLL@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@H@Z) I:\cpoy2 ProjectVS2010\ProjectVS2010\DLLWorkspaces\WidgetControls\WidgetControls\Image.lib(Imapng.obj)
Posted 14-Feb-13 0:26am

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

It appears that you have not properly exported _png_info_init, _png_read_init and _png_write_init. The compiler is telling you that these identifiers are referenced in CImagePNG::ReadFile() and CImagePNG::SaveFile(). I am guessing that these are in 2 different dlls.
 
The exact mechanism for failure as well as the complete solution are complex and more details are needed to provide the proper fix...
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 277
1 Maciej Los 210
2 BillWoodruff 195
3 DamithSL 195
4 Richard MacCutchan 178
0 OriginalGriff 5,130
1 DamithSL 4,197
2 Maciej Los 3,670
3 Kornfeld Eliyahu Peter 3,470
4 Sergey Alexandrovich Kryukov 2,821


Advertise | Privacy | Mobile
Web02 | 2.8.141216.1 | Last Updated 15 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100