Reputation: 47995
I got lots of LNK2001/2005 issues inside Visual C++ 2000 Express:
1>------ Build started: Project: lice, Configuration: Debug Win32 ------
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\Microsoft.Cpp.Win32.Targets(518,5): error MSB8008: Specified platform toolset (v140) is not installed or invalid. Please make sure that a supported PlatformToolset value is selected.
2>------ Build started: Project: IPlug, Configuration: Debug Win32 ------
2>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\Microsoft.Cpp.Win32.Targets(518,5): error MSB8008: Specified platform toolset (v140) is not installed or invalid. Please make sure that a supported PlatformToolset value is selected.
3>------ Build started: Project: MyFirstPlugin-app, Configuration: Debug Win32 ------
3>asio.obj : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/INCREMENTAL:NO' specification
3>LIBCMTD.lib(sprintf.obj) : error LNK2005: _sprintf already defined in IPlug.lib(IPlugBase.obj)
3>LIBCMTD.lib(vsprintf.obj) : error LNK2005: __vsprintf_l already defined in IPlug.lib(IPlugBase.obj)
3>IPlug.lib(IPopupMenu.obj) : error LNK2001: unresolved external symbol "void __cdecl operator delete(void *,unsigned int)" (??3@YAXPAXI@Z)
3>lice.lib(lice_png.obj) : error LNK2001: unresolved external symbol "void __cdecl operator delete(void *,unsigned int)" (??3@YAXPAXI@Z)
3>lice.lib(lice.obj) : error LNK2019: unresolved external symbol "void __cdecl operator delete(void *,unsigned int)" (??3@YAXPAXI@Z) referenced in function "public: static void __cdecl _LICE_Template_Blit2<class _LICE_CombinePixelsMulSourceAlphaClamp>::scaleBlit(unsigned char *,unsigned char *,int,int,int,int,int,int,int,int,int,int,int,int)" (?scaleBlit@?$_LICE_Template_Blit2@V_LICE_CombinePixelsMulSourceAlphaClamp@@@@SAXPAE0HHHHHHHHHHHH@Z)
3>lice.lib(lice_textnew.obj) : error LNK2001: unresolved external symbol "void __cdecl operator delete(void *,unsigned int)" (??3@YAXPAXI@Z)
3>IPlug.lib(IPlugBase.obj) : error LNK2001: unresolved external symbol "void __cdecl operator delete(void *,unsigned int)" (??3@YAXPAXI@Z)
3>IPlug.lib(IGraphicsWin.obj) : error LNK2001: unresolved external symbol "void __cdecl operator delete(void *,unsigned int)" (??3@YAXPAXI@Z)
3>IPlug.lib(IGraphics.obj) : error LNK2001: unresolved external symbol "void __cdecl operator delete(void *,unsigned int)" (??3@YAXPAXI@Z)
3>IPlug.lib(IControl.obj) : error LNK2001: unresolved external symbol "void __cdecl operator delete(void *,unsigned int)" (??3@YAXPAXI@Z)
3>IPlug.lib(IPlugBase.obj) : error LNK2019: unresolved external symbol ___stdio_common_vfprintf referenced in function __vfprintf_l
3>lice.lib(pngerror.obj) : error LNK2001: unresolved external symbol ___stdio_common_vfprintf
3>IPlug.lib(IParam.obj) : error LNK2001: unresolved external symbol ___stdio_common_vsprintf
3>IPlug.lib(IPlugBase.obj) : error LNK2019: unresolved external symbol ___stdio_common_vsprintf referenced in function __vsnprintf_l
3>IPlug.lib(Log.obj) : error LNK2001: unresolved external symbol ___stdio_common_vsprintf
3>IPlug.lib(IPlugStructs.obj) : error LNK2001: unresolved external symbol ___stdio_common_vsprintf
3>IPlug.lib(IGraphicsWin.obj) : error LNK2001: unresolved external symbol ___stdio_common_vsprintf
3>IPlug.lib(IPlugBase.obj) : error LNK2019: unresolved external symbol ___stdio_common_vsscanf referenced in function __vsscanf_l
3>IPlug.lib(Log.obj) : error LNK2019: unresolved external symbol __Init_thread_header referenced in function "char const * __cdecl AppendTimestamp(char const *,char const *,char const *)" (?AppendTimestamp@@YAPBDPBD00@Z)
3>lice.lib(lice_textnew.obj) : error LNK2001: unresolved external symbol __Init_thread_header
3>IPlug.lib(Log.obj) : error LNK2019: unresolved external symbol __Init_thread_footer referenced in function "char const * __cdecl AppendTimestamp(char const *,char const *,char const *)" (?AppendTimestamp@@YAPBDPBD00@Z)
3>lice.lib(lice_textnew.obj) : error LNK2001: unresolved external symbol __Init_thread_footer
3>IPlug.lib(Log.obj) : error LNK2001: unresolved external symbol __Init_thread_epoch
3>lice.lib(lice_textnew.obj) : error LNK2001: unresolved external symbol __Init_thread_epoch
3>IPlug.lib(IGraphicsWin.obj) : error LNK2019: unresolved external symbol ___report_rangecheckfailure referenced in function "void __cdecl GetModulePath(struct HINSTANCE__ *,class WDL_String *)" (?GetModulePath@@YAXPAUHINSTANCE__@@PAVWDL_String@@@Z)
3>lice.lib(pngerror.obj) : error LNK2001: unresolved external symbol ___report_rangecheckfailure
3>lice.lib(pngrutil.obj) : error LNK2001: unresolved external symbol ___report_rangecheckfailure
3>lice.lib(inftrees.obj) : error LNK2001: unresolved external symbol ___report_rangecheckfailure
3>lice.lib(pngerror.obj) : error LNK2019: unresolved external symbol ___acrt_iob_func referenced in function _png_default_error
3>lice.lib(pngget.obj) : error LNK2019: unresolved external symbol __dtoui3 referenced in function _png_get_pHYs_dpi
3>build-win\app\Win32\bin\MyFirstPlugin.exe : fatal error LNK1120: 10 unresolved externals
========== Build: 0 succeeded, 3 failed, 0 up-to-date, 0 skipped ==========
I don't know where they come from. I'm following this tutorial to setup my environment for making audio plugin. As suggested in the tutorial, I've set "Properties → Linker (General) → Enable Incremental Linking → “No (/INCREMENTAL:NO)”"
but without any success. I've also setup SP1.
Any helps? I've also tried with Visual Studio 2015, but I got other problems too. So its better first fit to the tutorial... but I can't go forward with these issues.
Upvotes: 2
Views: 2717
Reputation: 1262
By the looks of it, you've three different kinds of linker error here - and hopefully one single fix.
error LNK2005: _sprintf already defined in IPlug.lib(IPlugBase.obj)
This error suggests that the library in question (IPlug.lib) has been compiled using a different runtime-library linking (static or dynamic , debug or release) This link describes the compiler-settings for these. You'll need to identify the correct setting so that your project matches the library being linked
IPlug.lib(IPlugBase.obj) : error LNK2019: unresolved external symbol ___stdio_common_vfprintf referenced in function __vfprintf_l
This appears (though may not be) that due to the previous error, the runtime-library hasn't been linked, and thus it's components (such as fprintf) are not available to be linked. this should be solved by fixing the previous issue
lice.lib(inftrees.obj) : error LNK2001: unresolved external symbol ___report_rangecheckfailure
lice.lib(pngerror.obj) : error LNK2019: unresolved external symbol ___acrt_iob_func referenced in function _png_default_error
These two issues appear to be actual unresolved symbols, these will hopefully be solved by repairing the first issue - if not, you'll be missing a library needed by your project. Study the documentation until you find it.
After some effort, it was discovered the OP has missed the step of using git checkout
in the tutorial he was following, as such the library he was linking against was not compatible with his version of Visual-Studio
Upvotes: 2