Linker errors in building Vivek's Virtual Camera on Windows 10? - c++

I am trying to build Vivek's Virtual Camera on Windows 10.
For that I need to have Win7Samples/multimedia/directshow/baseclasses
I have downloaded baseclasses and built it using Visual Studio 2019.
Now I am ready to build Virtual camera filter. I followed few requisite steps
git clone https://github.com/roman380/tmhare.mvps.org-vcam
cd tmhare.mvps.org-vcam\Filters
Then I tried to open Filters.dsp in Visual Studio 2019 which asked me to do one-way upgrade
Added C:\Users\alokm\tmp\Windows-classic-samples\Samples\Win7Samples\multimedia\directshow\baseclasses in Additional Include Directories
Added C:\Users\alokm\tmp\Windows-classic-samples\Samples\Win7Samples\multimedia\directshow\baseclasses\Debug to Addition Library Directories
After all these steps I tried to build by hitting Build >> Build Solution
But I am getting lot of linker errors.
Errors in text format:
Severity Code Description Project File Line Suppression State
Error LNK2001 unresolved external symbol _memcmp Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\strmbasd.lib(combase.obj) 1
Error LNK2001 unresolved external symbol _memcmp Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\strmbasd.lib(mtype.obj) 1
Error LNK2001 unresolved external symbol _memcmp Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\strmbasd.lib(amfilter.obj) 1
Error LNK2001 unresolved external symbol _memcmp Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\Filters.obj 1
Error LNK2001 unresolved external symbol _memcmp Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\strmbasd.lib(dllentry.obj) 1
Error LNK2001 unresolved external symbol _memcmp Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\strmbasd.lib(wxdebug.obj) 1
Error LNK2001 unresolved external symbol _memcmp Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\strmbasd.lib(amvideo.obj) 1
Error LNK2019 unresolved external symbol _memset referenced in function "public: virtual long __thiscall CVCamStream::GetMediaType(int,class CMediaType *)" (?GetMediaType#CVCamStream##UAEJHPAVCMediaType###Z) Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\Filters.obj 1
Error LNK2001 unresolved external symbol _memset Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\strmbasd.lib(wxdebug.obj) 1
Error LNK2001 unresolved external symbol _memset Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\strmbasd.lib(mtype.obj) 1
Error LNK2001 unresolved external symbol _memset Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\strmbasd.lib(amfilter.obj) 1
Error LNK2019 unresolved external symbol __imp__rand referenced in function "public: virtual long __thiscall CVCamStream::FillBuffer(struct IMediaSample *)" (?FillBuffer#CVCamStream##UAEJPAUIMediaSample###Z) Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\Filters.obj 1
Error LNK2001 unresolved external symbol ___CxxFrameHandler3 Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\strmbasd.lib(mtype.obj) 1
Error LNK2001 unresolved external symbol ___CxxFrameHandler3 Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\strmbasd.lib(amfilter.obj) 1
Error LNK2001 unresolved external symbol ___CxxFrameHandler3 Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\strmbasd.lib(source.obj) 1
Error LNK2001 unresolved external symbol ___CxxFrameHandler3 Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\strmbasd.lib(wxlist.obj) 1
Error LNK2001 unresolved external symbol ___CxxFrameHandler3 Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\Filters.obj 1
Error LNK2001 unresolved external symbol ___CxxFrameHandler3 Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\strmbasd.lib(wxdebug.obj) 1
Error LNK2001 unresolved external symbol ___CxxFrameHandler3 Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\strmbasd.lib(wxutil.obj) 1
Error LNK2001 unresolved external symbol ___CxxFrameHandler3 Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\strmbasd.lib(combase.obj) 1
Error LNK2019 unresolved external symbol _wcsrchr referenced in function "wchar_t * __cdecl wcsrchr(wchar_t *,wchar_t)" (?wcsrchr##YAPA_WPA_W_W#Z) Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\strmbasd.lib(dllentry.obj) 1
Error LNK2001 unresolved external symbol _wcsrchr Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\strmbasd.lib(wxdebug.obj) 1
Error LNK2019 unresolved external symbol __imp____stdio_common_vswprintf referenced in function __vsnwprintf_l Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\strmbasd.lib(dllentry.obj) 1
Error LNK2001 unresolved external symbol __imp____stdio_common_vswprintf Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\strmbasd.lib(wxdebug.obj) 1
Error LNK2001 unresolved external symbol __imp____stdio_common_vswprintf Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\strmbasd.lib(dllsetup.obj) 1
Error LNK2001 unresolved external symbol __imp____stdio_common_vswprintf Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\strmbasd.lib(wxutil.obj) 1
Error LNK2019 unresolved external symbol __imp____stdio_common_vsprintf referenced in function __vsnprintf_l Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\strmbasd.lib(wxdebug.obj) 1
Error LNK2019 unresolved external symbol _memcpy referenced in function _AMGetWideString#8 Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\strmbasd.lib(wxutil.obj) 1
Error LNK2001 unresolved external symbol _memcpy Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\strmbasd.lib(mtype.obj) 1
Error LNK2001 unresolved external symbol _memcpy Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\strmbasd.lib(amfilter.obj) 1
Error LNK2001 unresolved external symbol _memcpy Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\strmbasd.lib(source.obj) 1
Error LNK2001 unresolved external symbol __purecall Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\strmbasd.lib(amfilter.obj) 1
Error LNK2001 unresolved external symbol __purecall Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\strmbasd.lib(source.obj) 1
Error LNK2019 unresolved external symbol __imp___wtoi referenced in function "public: virtual long __stdcall CSource::FindPin(wchar_t const *,struct IPin * *)" (?FindPin#CSource##UAGJPB_WPAPAUIPin###Z) Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\strmbasd.lib(source.obj) 1
Error LNK2019 unresolved external symbol __CrtDbgReport referenced in function __CRT_RTC_INIT Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\MSVCRTD.lib(init.obj) 1
Error LNK2019 unresolved external symbol __CrtDbgReportW referenced in function __CRT_RTC_INITW Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\MSVCRTD.lib(init.obj) 1
Error LNK2019 unresolved external symbol __callnewh referenced in function "void * __cdecl operator new(unsigned int)" (??2#YAPAXI#Z) Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\MSVCRTD.lib(new_scalar.obj) 1
Error LNK2019 unresolved external symbol _malloc referenced in function "void * __cdecl operator new(unsigned int)" (??2#YAPAXI#Z) Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\MSVCRTD.lib(new_scalar.obj) 1
Error LNK2019 unresolved external symbol _strcpy_s referenced in function "void __cdecl _RTC_StackFailure(void *,char const *)" (?_RTC_StackFailure##YAXPAXPBD#Z) Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\MSVCRTD.lib(error.obj) 1
Error LNK2019 unresolved external symbol _strcat_s referenced in function "void __cdecl _RTC_StackFailure(void *,char const *)" (?_RTC_StackFailure##YAXPAXPBD#Z) Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\MSVCRTD.lib(error.obj) 1
Error LNK2019 unresolved external symbol ___stdio_common_vsprintf_s referenced in function __vsprintf_s_l Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\MSVCRTD.lib(error.obj) 1
Error LNK2019 unresolved external symbol ___std_exception_copy referenced in function "public: __thiscall std::exception::exception(class std::exception const &)" (??0exception#std##QAE#ABV01##Z) Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\MSVCRTD.lib(throw_bad_alloc.obj) 1
Error LNK2019 unresolved external symbol ___std_exception_destroy referenced in function "public: virtual __thiscall std::exception::~exception(void)" (??1exception#std##UAE#XZ) Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\MSVCRTD.lib(throw_bad_alloc.obj) 1
Error LNK2019 unresolved external symbol __CxxThrowException#8 referenced in function "void __cdecl __scrt_throw_std_bad_alloc(void)" (?__scrt_throw_std_bad_alloc##YAXXZ) Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\MSVCRTD.lib(throw_bad_alloc.obj) 1
Error LNK2019 unresolved external symbol __free_dbg referenced in function "void __cdecl operator delete(void *)" (??3#YAXPAX#Z) Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\MSVCRTD.lib(delete_scalar.obj) 1
Error LNK2019 unresolved external symbol __wmakepath_s referenced in function "int __cdecl GetPdbDllPathFromFilePath(wchar_t const *,wchar_t *,unsigned int)" (?GetPdbDllPathFromFilePath##YAHPB_WPA_WI#Z) Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\MSVCRTD.lib(pdblkup.obj) 1
Error LNK2019 unresolved external symbol __wsplitpath_s referenced in function "int __cdecl GetPdbDllPathFromFilePath(wchar_t const *,wchar_t *,unsigned int)" (?GetPdbDllPathFromFilePath##YAHPB_WPA_WI#Z) Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\MSVCRTD.lib(pdblkup.obj) 1
Error LNK2019 unresolved external symbol _wcscpy_s referenced in function "int __cdecl GetPdbDllPathFromFilePath(wchar_t const *,wchar_t *,unsigned int)" (?GetPdbDllPathFromFilePath##YAHPB_WPA_WI#Z) Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\MSVCRTD.lib(pdblkup.obj) 1
Error LNK2019 unresolved external symbol ___vcrt_GetModuleFileNameW referenced in function "struct HINSTANCE__ * __cdecl GetPdbDll(void)" (?GetPdbDll##YAPAUHINSTANCE__##XZ) Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\MSVCRTD.lib(pdblkup.obj) 1
Error LNK2019 unresolved external symbol ___vcrt_GetModuleHandleW referenced in function "struct HINSTANCE__ * __cdecl GetPdbDll(void)" (?GetPdbDll##YAPAUHINSTANCE__##XZ) Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\MSVCRTD.lib(pdblkup.obj) 1
Error LNK2019 unresolved external symbol ___vcrt_LoadLibraryExW referenced in function "struct HINSTANCE__ * __cdecl GetPdbDll(void)" (?GetPdbDll##YAPAUHINSTANCE__##XZ) Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\MSVCRTD.lib(pdblkup.obj) 1
Error LNK2019 unresolved external symbol _terminate referenced in function __except_handler4_noexcept Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\MSVCRTD.lib(chandler4_noexcept.obj) 1
Error LNK2019 unresolved external symbol ___current_exception referenced in function __except_handler4_noexcept Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\MSVCRTD.lib(chandler4_noexcept.obj) 1
Error LNK2019 unresolved external symbol ___current_exception_context referenced in function __except_handler4_noexcept Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\MSVCRTD.lib(chandler4_noexcept.obj) 1
Error LNK2019 unresolved external symbol __except_handler4_common referenced in function __except_handler4 Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Filters\MSVCRTD.lib(chandler4gs.obj) 1
Error LNK1120 31 unresolved externals Filters C:\Users\alokm\tmp\tmhare.mvps.org-vcam\Bin\VCamD.ax 1
Where I am wrong? How to make this working?

The problem building the project is coming from this:
The project source code has a dependency of DirectShow BaseClasses which is no longer a part of Windows SDK
The project has too many settings diverged from defaults; with current Visual Studio it becomes a problem
I updated the github repository and changed the project settings to make the project build (Visual Studio 2019 Communitty) and run: most of the C++ project settings are reverted and DirectShow BaseClasses are used in the build configuration from github.
Check out README.md there, follow build steps (which require to pull Windows SDK Samples first, and build DirectShow stuff there), have DLLs registered (regsvr32) and finally you will have the filter generating video with random data:

Related

GLFW: LNK2001 unresolved external symbol __imp_calloc

I was following this OpenGL tutorial on YouTube https://youtu.be/45MIykWJ-C4. but instead of following everything exactly, I tried to setup GLFW using premake. then I tried running with just the glfwInit() and received these errors
Severity Code Description Project File Line Suppression State
Error LNK2001 unresolved external symbol __imp_calloc OpenGl_sandbox C:\dev\c++\projects\OpenGL\OpenGl_sandbox\glfw3.lib(win32_joystick.obj) 1
Error LNK2001 unresolved external symbol __imp_calloc OpenGl_sandbox C:\dev\c++\projects\OpenGL\OpenGl_sandbox\glfw3.lib(wgl_context.obj) 1
Error LNK2001 unresolved external symbol __imp_calloc OpenGl_sandbox C:\dev\c++\projects\OpenGL\OpenGl_sandbox\glfw3.lib(egl_context.obj) 1
Error LNK2001 unresolved external symbol __imp_calloc OpenGl_sandbox C:\dev\c++\projects\OpenGL\OpenGl_sandbox\glfw3.lib(osmesa_context.obj) 1
Error LNK2001 unresolved external symbol __imp_calloc OpenGl_sandbox C:\dev\c++\projects\OpenGL\OpenGl_sandbox\glfw3.lib(win32_monitor.obj) 1
Error LNK2001 unresolved external symbol __imp_calloc OpenGl_sandbox C:\dev\c++\projects\OpenGL\OpenGl_sandbox\glfw3.lib(monitor.obj) 1
Error LNK2001 unresolved external symbol __imp_calloc OpenGl_sandbox C:\dev\c++\projects\OpenGL\OpenGl_sandbox\glfw3.lib(vulkan.obj) 1
Error LNK2001 unresolved external symbol __imp_calloc OpenGl_sandbox C:\dev\c++\projects\OpenGL\OpenGl_sandbox\glfw3.lib(win32_window.obj) 1
Error LNK2001 unresolved external symbol __imp_calloc OpenGl_sandbox C:\dev\c++\projects\OpenGL\OpenGl_sandbox\glfw3.lib(init.obj) 1
Error LNK2001 unresolved external symbol __imp_calloc OpenGl_sandbox C:\dev\c++\projects\OpenGL\OpenGl_sandbox\glfw3.lib(window.obj) 1
Error LNK2001 unresolved external symbol __imp_calloc OpenGl_sandbox C:\dev\c++\projects\OpenGL\OpenGl_sandbox\glfw3.lib(input.obj) 1
Error LNK2001 unresolved external symbol __imp_calloc OpenGl_sandbox C:\dev\c++\projects\OpenGL\OpenGl_sandbox\glfw3.lib(win32_init.obj) 1
Error LNK2019 unresolved external symbol __imp_strncpy referenced in function glfwWindowHintString OpenGl_sandbox C:\dev\c++\projects\OpenGL\OpenGl_sandbox\glfw3.lib(window.obj) 1
Error LNK2001 unresolved external symbol __imp_strncpy OpenGl_sandbox C:\dev\c++\projects\OpenGL\OpenGl_sandbox\glfw3.lib(input.obj) 1
Error LNK2001 unresolved external symbol __imp_strncpy OpenGl_sandbox C:\dev\c++\projects\OpenGL\OpenGl_sandbox\glfw3.lib(monitor.obj) 1
Error LNK2001 unresolved external symbol __imp_strncpy OpenGl_sandbox C:\dev\c++\projects\OpenGL\OpenGl_sandbox\glfw3.lib(win32_joystick.obj) 1
Error LNK2019 unresolved external symbol __imp__wassert referenced in function _glfwCreateContextOSMesa OpenGl_sandbox C:\dev\c++\projects\OpenGL\OpenGl_sandbox\glfw3.lib(osmesa_context.obj) 1
Error LNK2001 unresolved external symbol __imp__wassert OpenGl_sandbox C:\dev\c++\projects\OpenGL\OpenGl_sandbox\glfw3.lib(vulkan.obj) 1
Error LNK2001 unresolved external symbol __imp__wassert OpenGl_sandbox C:\dev\c++\projects\OpenGL\OpenGl_sandbox\glfw3.lib(context.obj) 1
Error LNK2001 unresolved external symbol __imp__wassert OpenGl_sandbox C:\dev\c++\projects\OpenGL\OpenGl_sandbox\glfw3.lib(wgl_context.obj) 1
Error LNK2001 unresolved external symbol __imp__wassert OpenGl_sandbox C:\dev\c++\projects\OpenGL\OpenGl_sandbox\glfw3.lib(egl_context.obj) 1
Error LNK2001 unresolved external symbol __imp__wassert OpenGl_sandbox C:\dev\c++\projects\OpenGL\OpenGl_sandbox\glfw3.lib(window.obj) 1
Error LNK2001 unresolved external symbol __imp__wassert OpenGl_sandbox C:\dev\c++\projects\OpenGL\OpenGl_sandbox\glfw3.lib(input.obj) 1
Error LNK2001 unresolved external symbol __imp__wassert OpenGl_sandbox C:\dev\c++\projects\OpenGL\OpenGl_sandbox\glfw3.lib(win32_thread.obj) 1
Error LNK2001 unresolved external symbol __imp__wassert OpenGl_sandbox C:\dev\c++\projects\OpenGL\OpenGl_sandbox\glfw3.lib(monitor.obj) 1
Error LNK2019 unresolved external symbol __imp_strcspn referenced in function glfwUpdateGamepadMappings OpenGl_sandbox C:\dev\c++\projects\OpenGL\OpenGl_sandbox\glfw3.lib(input.obj) 1
Error LNK2019 unresolved external symbol __imp_strspn referenced in function glfwUpdateGamepadMappings OpenGl_sandbox C:\dev\c++\projects\OpenGL\OpenGl_sandbox\glfw3.lib(input.obj) 1
Error LNK2019 unresolved external symbol __imp_realloc referenced in function glfwUpdateGamepadMappings OpenGl_sandbox C:\dev\c++\projects\OpenGL\OpenGl_sandbox\glfw3.lib(input.obj) 1
Error LNK2001 unresolved external symbol __imp_realloc OpenGl_sandbox C:\dev\c++\projects\OpenGL\OpenGl_sandbox\glfw3.lib(win32_monitor.obj) 1
Error LNK2001 unresolved external symbol __imp_realloc OpenGl_sandbox C:\dev\c++\projects\OpenGL\OpenGl_sandbox\glfw3.lib(monitor.obj) 1
Error LNK2019 unresolved external symbol __imp_wcscpy referenced in function createMonitor OpenGl_sandbox C:\dev\c++\projects\OpenGL\OpenGl_sandbox\glfw3.lib(win32_monitor.obj) 1
Error LNK2019 unresolved external symbol __imp_powf referenced in function glfwSetGamma OpenGl_sandbox C:\dev\c++\projects\OpenGL\OpenGl_sandbox\glfw3.lib(monitor.obj) 1
Error LNK1120 8 unresolved externals OpenGl_sandbox C:\dev\c++\projects\OpenGL\bin\Debug-windows-x86_64\OpenGl_sandbox\OpenGl_sandbox.exe 1
, and here is the premake code:
workspace "OpenGl"
architecture "x86_64"
startproject "OpenGl"
configurations
{
"Debug",
"Release",
"Dist"
}
outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
IncludeDirs = {}
IncludeDirs["GLFW"] = "vendor/GLFW/include"
IncludeDirs["glad"] = "vendor/glad/include"
LibsDirs = {}
LibsDirs["GLFW"] = "vendor/GLFW/bin"
project "OpenGl_sandbox"
location "OpenGl_sandbox"
kind "ConsoleApp"
language "C++"
targetdir ("bin/" .. outputdir .. "/%{prj.name}")
objdir ("bin-int/" .. outputdir .. "/%{prj.name}")
files
{
"%{prj.name}/src/**.h",
"%{prj.name}/src/**.cpp",
"%{prj.name}/src/**.c",
"%{prj.name}/res/**.**",
}
includedirs
{
IncludeDirs,
}
libdirs
{
LibsDirs,
}
links
{
"glfw3.lib",
"opengl32.lib"
}
filter "system:windows"
cppdialect "C++latest"
staticruntime "On"
systemversion "latest"
defines
{
}
filter "configurations:Debug"
defines "DEBUG"
symbols "On"
filter "configurations:Release"
defines "RELEASE"
optimize "On"
filter "configurations:Dist"
defines "DIST"
optimize "On"
can anyone tell me why this happens? I tried following this tutorial before and it work for me perfectly but this time it didn't. I'm guessing this might be a problem with the OpenGL file itself, which causes it not to link properly. thanks!

How to solve link errors while MediaFoundation using?

I have a solution that is works, then I was needed to add a project that has implementation of MediaFoundation. So, in order to include it I added this project as existing one then in configuration in General section I provided path to .h files and then in Liker input added .lib
After this I tried to use it and write include in one of my files and then invoked a few methods from this project that was added.
When I tried to compile my project I got an errors :
9>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
9>co_AudioDecoder.lib(co_AudioDecoderMF.obj) : error LNK2019: unresolved external symbol MFStartup referenced in function "private: bool __cdecl co_AudioDecoderMF::InitAndStartCOMLib(void)" (?InitAndStartCOMLib#co_AudioDecoderMF##AEAA_NXZ)
9>co_AudioDecoder.lib(co_AudioDecoderMF.obj) : error LNK2019: unresolved external symbol MFShutdown referenced in function "public: virtual void __cdecl co_AudioDecoderMF::Cleanup(void)" (?Cleanup#co_AudioDecoderMF##UEAAXXZ)
9>co_AudioDecoder.lib(co_AudioDecoderMF.obj) : error LNK2019: unresolved external symbol MFCreateAttributes referenced in function "private: bool __cdecl co_AudioDecoderMF::CreateSourceReader(void)" (?CreateSourceReader#co_AudioDecoderMF##AEAA_NXZ)
9>co_AudioDecoder.lib(co_AudioDecoderMF.obj) : error LNK2019: unresolved external symbol MFCreateMediaType referenced in function "private: bool __cdecl co_AudioDecoderMF::ConfigureAudioStream(enum co_AudioDecoder::SoundDataType,struct IMFSourceReader *,struct IMFMediaType * *)" (?ConfigureAudioStream#co_AudioDecoderMF##AEAA_NW4SoundDataType#co_AudioDecoder##PEAUIMFSourceReader##PEAPEAUIMFMediaType###Z)
9>co_AudioDecoder.lib(co_AudioDecoderMF.obj) : error LNK2019: unresolved external symbol MFCreateMFByteStreamOnStream referenced in function "private: bool __cdecl co_AudioDecoderMF::CreateByteStream(unsigned char const *,__int64)" (?CreateByteStream#co_AudioDecoderMF##AEAA_NPEBE_J#Z)
9>co_AudioDecoder.lib(co_AudioDecoderMF.obj) : error LNK2019: unresolved external symbol MFCreateSourceReaderFromByteStream referenced in function "private: bool __cdecl co_AudioDecoderMF::CreateSourceReader(void)" (?CreateSourceReader#co_AudioDecoderMF##AEAA_NXZ)
9>co_AudioDecoder.lib(co_AudioDecoderMF.obj) : error LNK2001: unresolved external symbol MFAudioFormat_PCM
9>co_AudioDecoder.lib(co_AudioDecoderMF.obj) : error LNK2001: unresolved external symbol MF_MT_MAJOR_TYPE
9>co_AudioDecoder.lib(co_AudioDecoderMF.obj) : error LNK2001: unresolved external symbol MF_MT_SUBTYPE
9>co_AudioDecoder.lib(co_AudioDecoderMF.obj) : error LNK2001: unresolved external symbol MF_MT_AUDIO_NUM_CHANNELS
9>co_AudioDecoder.lib(co_AudioDecoderMF.obj) : error LNK2001: unresolved external symbol MF_MT_AUDIO_SAMPLES_PER_SECOND
9>co_AudioDecoder.lib(co_AudioDecoderMF.obj) : error LNK2001: unresolved external symbol MF_MT_AUDIO_BLOCK_ALIGNMENT
9>co_AudioDecoder.lib(co_AudioDecoderMF.obj) : error LNK2001: unresolved external symbol MF_MT_AUDIO_BITS_PER_SAMPLE
9>co_AudioDecoder.lib(co_AudioDecoderMF.obj) : error LNK2001: unresolved external symbol MFMediaType_Audio
First of all it is strange because I have already use this project in other solution and there weren't problems, but ok after a research I have found out that I need to add in configuration Linker -> input a few more .libs
Mf.lib
Mfplat.lib
mfuuid.lib
(inspire of I don't have these lines in my other solution where does it works) and after I added these lines a lot of error gone, but one left
9>co_AudioDecoder.lib(co_AudioDecoderMF.obj) : error LNK2019: unresolved external symbol MFCreateSourceReaderFromByteStream referenced in function "private: bool __cdecl co_AudioDecoderMF::CreateSourceReader(void)" (?CreateSourceReader#co_AudioDecoderMF##AEAA_NXZ)
And I have not found nothing about how to solve it. I am a relatively new in c++ and it looks weird that in order to make MediaFoundation(big lib) work I need to spend a few hours in order to find out what to add in additional in order to make it works.
So, question is - what am I missing here?
You need to include this :
#pragma comment(lib, "mfreadwrite")
Documentation usually helps :
MFCreateSourceReaderFromByteStream function

curlpp error from LibCurl.obj and libcurl_a.lib

When executing the following code I receive LNK2019 errors. I have set the Runtime Library as Multi-threaded (/MT):
// LibCurl.cpp : Defines the entry point for the console application.
#include "stdafx.h"
// errors here solved via C:\Users\homeDir\Documents\Tools\curlpp-0.8.1\include
#include <curlpp/cURLpp.hpp>
#include <curlpp/Options.hpp>
#include <curlpp/Easy.hpp>
#include "curl/curl.h"
#ifdef _DEBUG
#pragma comment(lib, "libcurl_a.lib")
#else
#pragma comment(lib, "libcurl_a.lib")
#endif
int main()
{
curl_global_init(CURL_GLOBAL_DEFAULT);
CURL *curl = curl_easy_init();
if (curl) {
CURLcode res;
curl_easy_setopt(curl, CURLOPT_URL, "http://www.dynamsoft.com");
res = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
curl_global_cleanup();
printf("Press any key to continue\n");
getchar();
curlpp::Cleanup myCleanup;
return 0;
}
Error is as follows:
Severity Code Description Project File Line Suppression State
Error LNK2001 unresolved external symbol __imp__fgets LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(netrc.obj) 1
Error LNK2019 unresolved external symbol "public: __thiscall curlpp::Cleanup::Cleanup(void)" (??0Cleanup#curlpp##QAE#XZ) referenced in function _main LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\LibCurl.obj 1
Error LNK2019 unresolved external symbol "public: __thiscall curlpp::Cleanup::~Cleanup(void)" (??1Cleanup#curlpp##QAE#XZ) referenced in function _main LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\LibCurl.obj 1
Error LNK2019 unresolved external symbol __imp__fgets referenced in function _Curl_cookie_init LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(cookie.obj) 1
Error LNK2019 unresolved external symbol __imp__fopen referenced in function _Curl_cookie_init LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(cookie.obj) 1
Error LNK2001 unresolved external symbol __imp__fopen LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(vtls.obj) 1
Error LNK2001 unresolved external symbol __imp__fopen LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(mime.obj) 1
Error LNK2001 unresolved external symbol __imp__fopen LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(netrc.obj) 1
Error LNK2019 unresolved external symbol __imp__fputs referenced in function _Curl_flush_cookies LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(cookie.obj) 1
Error LNK2001 unresolved external symbol __imp____stdio_common_vsscanf LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(telnet.obj) 1
Error LNK2001 unresolved external symbol __imp____stdio_common_vsscanf LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(rtsp.obj) 1
Error LNK2001 unresolved external symbol __imp____stdio_common_vsscanf LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(imap.obj) 1
Error LNK2001 unresolved external symbol __imp____stdio_common_vsscanf LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(transfer.obj) 1
Error LNK2001 unresolved external symbol __imp____stdio_common_vsscanf LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(http.obj) 1
Error LNK2001 unresolved external symbol __imp____stdio_common_vsscanf LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(parsedate.obj) 1
Error LNK2001 unresolved external symbol __imp____stdio_common_vsscanf LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(ftp.obj) 1
Error LNK2001 unresolved external symbol __imp____stdio_common_vsscanf LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(cookie.obj) 1
Error LNK2001 unresolved external symbol __imp____stdio_common_vsscanf LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(hostip.obj) 1
Error LNK2001 unresolved external symbol __imp____stdio_common_vsscanf LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(url.obj) 1
Error LNK2001 unresolved external symbol __imp____stdio_common_vsscanf LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(http_proxy.obj) 1
Error LNK2001 unresolved external symbol __imp___time64 LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(tftp.obj) 1
Error LNK2001 unresolved external symbol __imp___time64 LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(cookie.obj) 1
Error LNK2001 unresolved external symbol __imp___time64 LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(hostip.obj) 1
Error LNK2001 unresolved external symbol __imp___time64 LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(http.obj) 1
Error LNK2001 unresolved external symbol __imp___time64 LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(ftp.obj) 1
Error LNK2001 unresolved external symbol __imp__strncmp LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(dotdot.obj) 1
Error LNK2001 unresolved external symbol __imp__strncmp LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(curl_sasl.obj) 1
Error LNK2001 unresolved external symbol __imp__strncmp LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(ftplistparser.obj) 1
Error LNK2001 unresolved external symbol __imp__strncmp LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(http.obj) 1
Error LNK2001 unresolved external symbol __imp__strncmp LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(mprintf.obj) 1
Error LNK2001 unresolved external symbol __imp__strncmp LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(ftp.obj) 1
Error LNK2001 unresolved external symbol __imp__strncmp LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(rtsp.obj) 1
Error LNK2001 unresolved external symbol __imp__strncmp LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(cookie.obj) 1
Error LNK2001 unresolved external symbol __imp__strncmp LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(vtls.obj) 1
Error LNK2001 unresolved external symbol __imp__strncmp LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(url.obj) 1
Error LNK2001 unresolved external symbol __imp__strncmp LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(connect.obj) 1
Error LNK2001 unresolved external symbol __imp__strncpy LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(telnet.obj) 1
Error LNK2001 unresolved external symbol __imp__strncpy LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(curl_sspi.obj) 1
Error LNK2001 unresolved external symbol __imp__strncpy LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(url.obj) 1
Error LNK2001 unresolved external symbol __imp__strncpy LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(strerror.obj) 1
Error LNK2001 unresolved external symbol __imp__strncpy LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(ftp.obj) 1
Error LNK2001 unresolved external symbol __imp__fread LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(formdata.obj) 1
Error LNK2001 unresolved external symbol __imp__fread LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(vtls.obj) 1
Error LNK2001 unresolved external symbol __imp__fread LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(url.obj) 1
Error LNK2001 unresolved external symbol __imp__fread LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(transfer.obj) 1
Error LNK2001 unresolved external symbol __imp__fread LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(mime.obj) 1
Error LNK2019 unresolved external symbol __imp__fseek referenced in function _Curl_pin_peer_pubkey LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(vtls.obj) 1
Error LNK2001 unresolved external symbol __imp__fseek LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(transfer.obj) 1
Error LNK2001 unresolved external symbol __imp__fseek LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(mime.obj) 1
Error LNK2001 unresolved external symbol __imp__fseek LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(formdata.obj) 1
Error LNK2019 unresolved external symbol __imp__ftell referenced in function _Curl_pin_peer_pubkey LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(vtls.obj) 1
Error LNK2019 unresolved external symbol __imp__getenv referenced in function _curl_global_sslset LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(vtls.obj) 1
Error LNK2001 unresolved external symbol __imp__getenv LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(getenv.obj) 1
Error LNK2019 unresolved external symbol __imp__fwrite referenced in function _Curl_init_userdefined LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(url.obj) 1
Error LNK2001 unresolved external symbol __imp__fwrite LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(sendf.obj) 1
Error LNK2019 unresolved external symbol __imp__read referenced in function _curlx_read LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(warnless.obj) 1
Error LNK2001 unresolved external symbol __imp__read LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\OLDNAMES.lib(read.obi) 1
Error LNK2019 unresolved external symbol __imp__write referenced in function _curlx_write LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(warnless.obj) 1
Error LNK2001 unresolved external symbol __imp__write LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\OLDNAMES.lib(write.obi) 1
Error LNK2019 unresolved external symbol __imp___gmtime64 referenced in function _Curl_gmtime LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(parsedate.obj) 1
Error LNK2019 unresolved external symbol __imp__strerror referenced in function _Curl_strerror LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(strerror.obj) 1
Error LNK2019 unresolved external symbol __imp____sys_nerr referenced in function _Curl_strerror LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(strerror.obj) 1
Error LNK2019 unresolved external symbol __imp___beginthreadex referenced in function _Curl_thread_create LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(curl_threads.obj) 1
Error LNK2019 unresolved external symbol __imp__close referenced in function _file_done LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(file.obj) 1
Error LNK2001 unresolved external symbol __imp__close LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\OLDNAMES.lib(close.obi) 1
Error LNK2019 unresolved external symbol __imp__open referenced in function _file_connect LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(file.obj) 1
Error LNK2001 unresolved external symbol __imp__open LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\OLDNAMES.lib(open.obi) 1
Error LNK2019 unresolved external symbol __imp___fstat64 referenced in function _file_do LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(file.obj) 1
Error LNK2019 unresolved external symbol __imp___getpid referenced in function _smb_format_message LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(smb.obj) 1
Error LNK2019 unresolved external symbol __imp__access referenced in function _curl_mime_filedata LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(mime.obj) 1
Error LNK2001 unresolved external symbol __imp__access LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\OLDNAMES.lib(access.obi) 1
Error LNK2019 unresolved external symbol __imp___stat64 referenced in function _curl_mime_filedata LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\libcurl_a.lib(mime.obj) 1
Error LNK2001 unresolved external symbol __imp___open LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\OLDNAMES.lib(open.obi) 1
Error LNK2001 unresolved external symbol __imp___access LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\OLDNAMES.lib(access.obi) 1
Error LNK2019 unresolved external symbol __except_handler4_common referenced in function __except_handler4 LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\LibCurl\MSVCRT.lib(chandler4gs.obj) 1
Error LNK1120 29 unresolved externals LibCurl C:\Users\939508\Documents\C++ Projects\LibCurl\Debug\LibCurl.exe 1
Please refer to Visual Studio 2017 and curlpp library LNK2019 error if you would like to see my configurations for my project.

unresolved external symbol in eclipse cdt

I try to build cpp file using eclipse cdt. Linker throws "unresolved external symbol", however path to lib file that contains implementation for function is listed in LIB environment variable on Project properties->C/C++ Build->Environment
What am I doing wrong?
UPD I try to build file. There is lib RpcRT4.Lib on the path C:\Program Files\Microsoft SDKs\Windows\v7.0A\Lib\
And linker fails:
**** Build of configuration Debug for project test cpp ****
**** Internal Builder is used for build ****
link /debug /nologo /OUT:test cpp.exe main.obj
main.obj : error LNK2019: unresolved external symbol __imp__RpcStringFreeA#4 referenced in function "bool __cdecl Initialize_CreateWindowClass(void)"(?Initialize_CreateWindowClass##YA_NXZ)
main.obj : error LNK2019: unresolved external symbol __imp__RegisterClassA#4 referenced in function "bool __cdecl Initialize_CreateWindowClass(void)" (?Initialize_CreateWindowClass##YA_NXZ)
main.obj : error LNK2019: unresolved external symbol __imp__UuidToStringA#8 referenced in function "bool __cdecl Initialize_CreateWindowClass(void)" (?Initialize_CreateWindowClass##YA_NXZ)
main.obj : error LNK2019: unresolved external symbol __imp__UuidCreate#4 referenced in function "bool __cdecl Initialize_CreateWindowClass(void)" (?Initialize_CreateWindowClass##YA_NXZ)
main.obj : error LNK2019: unresolved external symbol __imp__DefWindowProcA#16 referenced in function "long __stdcall SkypeAPITest_Windows_WindowProc(struct HWND__ *,unsigned int,unsigned int,long)" (?SkypeAPITest_Windows_WindowProc##YGJPAUHWND__##IIJ#Z)
main.obj : error LNK2019: unresolved external symbol __imp__PostQuitMessage#4 referenced in function "long __stdcall SkypeAPITest_Windows_WindowProc(struct HWND__ *,unsigned int,unsigned int,long)" (?SkypeAPITest_Windows_WindowProc##YGJPAUHWND__##IIJ#Z)
main.obj : error LNK2019: unresolved external symbol __imp__UnregisterClassA#8 referenced in function "void __cdecl DeInitialize_DestroyWindowClass(void)" (?DeInitialize_DestroyWindowClass##YAXXZ)
main.obj : error LNK2019: unresolved external symbol __imp__CreateWindowExA#48 referenced in function "bool __cdecl Initialize_CreateMainWindow(void)" (?Initialize_CreateMainWindow##YA_NXZ)
main.obj : error LNK2019: unresolved external symbol __imp__DestroyWindow#4 referenced in function "void __cdecl DeInitialize_DestroyMainWindow(void)" (?DeInitialize_DestroyMainWindow##YAXXZ)
main.obj : error LNK2019: unresolved external symbol __imp__DispatchMessageA#4 referenced in function "void __cdecl Global_MessageLoop(void)" (?Global_MessageLoop##YAXXZ)
main.obj : error LNK2019: unresolved external symbol __imp__TranslateMessage#4 referenced in function "void __cdecl Global_MessageLoop(void)" (?Global_MessageLoop##YAXXZ)
main.obj : error LNK2019: unresolved external symbol __imp__GetMessageA#16 referenced in function "void __cdecl Global_MessageLoop(void)" (?Global_MessageLoop##YAXXZ)
main.obj : error LNK2019: unresolved external symbol __imp__PostMessageA#16 referenced in function "void __cdecl Global_InputProcessingThread(void *)" (?Global_InputProcessingThread##YAXPAX#Z)
main.obj : error LNK2019: unresolved external symbol __imp__SendMessageA#16 referenced in function "void __cdecl Global_InputProcessingThread(void *)" (?Global_InputProcessingThread##YAXPAX#Z)
main.obj : error LNK2019: unresolved external symbol __imp__RegisterWindowMessageA#4 referenced in function _main
test cpp.exe : fatal error LNK1120: 15 unresolved externals
Build error occurred, build is stopped
Time consumed: 2438 ms.
And environment settings for project
I'm not entirely clear on whether you've already done this based on the question, but just adding the directory to your linker's search path isn't enough for any compiler/linker I've ever used. There could be hundreds of different libraries in there, even different versions of the same library, and the linker has no idea which ones you do and don't want. You need to tell it, explicitly, to link against the library using the appropriate parameter.
It looks like you're using the Microsoft linker, which I've never used, so I can't help you with the specific flag but it should be easy enough to find what it is in the documentation if that's the issue. I presume Eclipse has a method of specifying this in the GUI as well which should be generic across the various compilers it supports.

Mfc application building in defug mode but not in release mode?

Mfc application is showing following error when buil in release mode
Error 152 error LNK2019: unresolved external symbol SHGetPathFromIDList referenced in function "public: class ATL::CStringT > > __cdecl CCopyFile::DoBrowse(void)" (?DoBrowse#CCopyFile##QAA?AV?$CStringT#_WV?$StrTraitMFC#_WV?$ChTraitsOS#_W#ATL#####ATL##XZ) CopyFile.obj
Error 153 error LNK2001: unresolved external symbol SHGetPathFromIDList IflawFileDialog.obj
Error 154 error LNK2001: unresolved external symbol SHGetPathFromIDList NewFile.obj
Error 155 error LNK2019: unresolved external symbol SHBrowseForFolder referenced in function "public: class ATL::CStringT > > __cdecl CCopyFile::DoBrowse(void)" (?DoBrowse#CCopyFile##QAA?AV?$CStringT#_WV?$StrTraitMFC#_WV?$ChTraitsOS#_W#ATL#####ATL##XZ) CopyFile.obj
Compare the debug/release linker input dependencies for your project. The release one is probably missing shell32.lib