error LNK2001: unresolved external symbol "void * __cdecl malloc_new(struct png_struct_def *,unsigned int)" (?malloc_new@@YAPAXPAUpng_struct_def@@I@Z)
Debug/PNGWARITE.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.明明我的建的库中已经声明了该函数,但还是出错,我还要注意那些呢?

解决方案 »

  1.   

    there are two reasons this error occurs: what the code asks for doesn’t exist (the symbol is spelled incorrectly or uses the wrong case, for example), or the code asks for the wrong thing (you are using mixed versions of the libraries?some from one version of the product, others from another version). 查一下你那个callback函数的声明
      

  2.   

    有可能没有找到连接库(DLL)
      

  3.   

    比如说DLL引用的时候没有把相应的静态连接库 .lib 加入
    说清楚一点!不要这样没头脑的让人猜
      

  4.   

    你自己定义的库有没有引用近来?(project->setting->link->object\lib)