Click here to Skip to main content
15,892,737 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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

1 solution

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...
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900