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

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

Related

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

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:

VC++ Library Miss while compiling application? unzip.obj : error LNK2019

I try to compile VC++ application and get the error message as below. Is there anyone who know what the library I may be missing? Any advice & suggestion are appreciated.
My Environment:
VC++ 2010
zlib-1.2.8
boost_1_57_0
icu
1>------ Build started: Project: paloserver, Configuration: Debug Win32 ------
1> Creating library C:/Users/a992788/Virtual Machines/Documents/Application/Palo/Palo 3.x Source Code/palo-code-546/molap/server/5.1/SourceCode/Debug/paloserver.lib and object C:/Users/a992788/Virtual Machines/Documents/Application/Palo/Palo 3.x Source Code/palo-code-546/molap/server/5.1/SourceCode/Debug/paloserver.exp
1>unzip.obj : error LNK2019: unresolved external symbol _inflateInit2_ referenced in function _unzOpenCurrentFile3
1>unzip.obj : error LNK2019: unresolved external symbol _inflate referenced in function _unzReadCurrentFile
1>unzip.obj : error LNK2019: unresolved external symbol _crc32 referenced in function _unzReadCurrentFile
1>zip.obj : error LNK2001: unresolved external symbol _crc32
1>unzip.obj : error LNK2019: unresolved external symbol _inflateEnd referenced in function _unzCloseCurrentFile
1>zip.obj : error LNK2019: unresolved external symbol _get_crc_table referenced in function _zipOpenNewFileInZip4_64
1>zip.obj : error LNK2019: unresolved external symbol _deflateInit2_ referenced in function _zipOpenNewFileInZip4_64
1>zip.obj : error LNK2019: unresolved external symbol _deflate referenced in function _zipWriteInFileInZip
1>zip.obj : error LNK2019: unresolved external symbol _deflateEnd referenced in function _zipCloseFileInZipRaw64
1>C:\Users\a992788\Virtual Machines\Documents\Application\Palo\Palo 3.x Source Code\palo-code-546\molap\server\5.1\SourceCode\Debug\paloserver.dll : fatal error LNK1120: 8 unresolved externals
Add reference to the zdll.lib in your source.
#pragma comment (lib, "zdll.lib")

Selecting a Capture Device Using the System Device Enumerator

I was tring to use this link: http://msdn.microsoft.com/en-us/library/dd377566%28v=VS.85%29.aspx, to select a capturing device.
Works perfectly on Visual Studio, but throws the following error QT:
test.obj : error LNK2005: _main already defined in main.obj
test.obj : error LNK2019: unresolved external symbol __imp__CoCreateInstance#20 referenced in function "long __cdecl EnumerateDevices(struct _GUID const &,struct IEnumMoniker * *)" (?EnumerateDevices##YAJABU_GUID##PAPAUIEnumMoniker###Z)
test.obj : error LNK2019: unresolved external symbol __imp__VariantClear#4 referenced in function "void __cdecl DisplayDeviceInformation(struct IEnumMoniker *)" (?DisplayDeviceInformation##YAXPAUIEnumMoniker###Z)
test.obj : error LNK2019: unresolved external symbol __imp__VariantInit#4 referenced in function "void __cdecl DisplayDeviceInformation(struct IEnumMoniker *)" (?DisplayDeviceInformation##YAXPAUIEnumMoniker###Z)
test.obj : error LNK2019: unresolved external symbol __imp__CoUninitialize#0 referenced in function _main
test.obj : error LNK2019: unresolved external symbol __imp__CoInitializeEx#8 referenced in function _main
I'm using windows 7 & QT 5.0.2.
Any help will be appreciated thanks.
Searching for "cocreateinstance unresolved external" on google and using the first link returned:
http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/5fc032e1-86d8-43c7-870b-f10599000605/
I spotted the third comment that indicates to link against "ole32.lib".
Your reply to my comment above indicates that "oleAut32.lib" is also required.
Also make sure to link against "strmiids.lib".
To sum up, required libraries are:
ole32.lib
oleaut32.lib
strmiids.lib

Calling a c++ .exe from Matlab - Program Stopped Working?

I wrote a code in C++ called FaceTracker.cpp and other code in Matlab that do some analyzes and statics.
What I need to do is adding a button in matlab that calls the FaceTracker when being pressed. I tried to use the following command:
system (['FaceTracker.exe <' nameOfVideo]);
but it doesn't work. It opens the FaceTracker.exe GUI, then it stops ! (Like when internet explorer or any other program does sometimes\hang) with the msg "FaceTracker.exe stoped working.
When I tried to run the .exe from command prompt it showed me the following error:
Assertion Faile: Type == IO::TRACKER ... Debug error! R6010 - abort() has been called.
From what i understd from the answers\ other sites is that I need to statically link libraries.
I read in one site that I need to make the following changes:
The CRT:
• Configuration Properties -> C/C++ -> Code Generation: Where it reads Runtime Library, change to Multi-Threaded (/MT).
The manifest must go:
• Configuration Properties -> Manifest Tool -> Input and Output: Where it reads Embed Manifest, change to No.
But when I do it (Change to /MT) I start getting the following errors:
1> Generating Code... 1>LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library 1>libcpmtd.lib(xmbtowc.obj) : error LNK2001: unresolved external symbol __CrtDbgReportW 1>Tracker.obj : error LNK2019: unresolved external symbol __CrtDbgReportW referenced in function "public: void
__thiscall FACETRACKER::Tracker::Load(char const *)" (?Load#Tracker#FACETRACKER##QAEXPBD#Z) 1>libcpmtd.lib(stdthrow.obj) : error LNK2001: unresolved external symbol __CrtDbgReportW 1>libcpmtd.lib(cout.obj) : error LNK2001: unresolved external symbol
__CrtDbgReportW 1>libcpmtd.lib(cin.obj) : error LNK2001: unresolved external symbol __CrtDbgReportW 1>IO.obj : error LNK2001: unresolved external symbol __CrtDbgReportW 1>Patch.obj : error LNK2001: unresolved external symbol __CrtDbgReportW 1>PAW.obj : error LNK2001: unresolved external symbol __CrtDbgReportW 1>PDM.obj : error LNK2001: unresolved external symbol __CrtDbgReportW 1>CLM.obj : error LNK2001: unresolved external symbol __CrtDbgReportW 1>FaceTracker.obj : error LNK2001: unresolved external symbol __CrtDbgReportW 1>FCheck.obj : error LNK2001: unresolved external symbol __CrtDbgReportW 1>FDet.obj : error LNK2001: unresolved external symbol __CrtDbgReportW 1>libcpmtd.lib(cin.obj) : error LNK2001: unresolved external symbol
__free_dbg 1>libcpmtd.lib(xmbtowc.obj) : error LNK2001: unresolved external symbol __free_dbg 1>Tracker.obj : error LNK2001: unresolved external symbol __free_dbg 1>libcpmtd.lib(xdebug.obj) : error LNK2001: unresolved external symbol __free_dbg 1>libcpmtd.lib(locale0.obj) : error LNK2001: unresolved external symbol __free_dbg 1>libcpmtd.lib(cout.obj) : error LNK2001: unresolved external symbol
__free_dbg 1>IO.obj : error LNK2001: unresolved external symbol __free_dbg 1>Patch.obj : error LNK2001: unresolved external symbol __free_dbg 1>PAW.obj : error LNK2001: unresolved external symbol __free_dbg 1>PDM.obj : error LNK2001: unresolved external symbol __free_dbg 1>CLM.obj : error LNK2019: unresolved external symbol __free_dbg referenced in function "private: void __thiscall std::_Yarn<char>::_Tidy(void)" (?_Tidy#?$_Yarn#D#std##AAEXXZ) 1>FaceTracker.obj : error LNK2001: unresolved external symbol
__free_dbg 1>FCheck.obj : error LNK2001: unresolved external symbol __free_dbg 1>FDet.obj : error LNK2001: unresolved external symbol __free_dbg 1>libcpmtd.lib(xdebug.obj) : error LNK2019: unresolved external symbol __malloc_dbg referenced in function "void * __cdecl operator new(unsigned int,struct std::_DebugHeapTag_t const &,char
*,int)" (??2#YAPAXIABU_DebugHeapTag_t#std##PADH#Z) 1>libcpmtd.lib(locale0.obj) : error LNK2001: unresolved external symbol __malloc_dbg 1>libcpmtd.lib(xmbtowc.obj) : error LNK2001: unresolved external symbol __malloc_dbg 1>libcpmtd.lib(_tolower.obj) : error LNK2019: unresolved external symbol __calloc_dbg referenced in function __Getctype 1>C:\Users\wew\Documents\Jam3a\PROJECT-2012!!\FindSymetryInFaces\FaceTracker\Debug\FaceTracker.exe : fatal error LNK1120: 4 unresolved externals
Any Suggestions?
What do I Have to do in order to be able to use the FaceTracker.exe in every computer, also the ones that doesn't have c++\vs compiler?
besides, why does my program OPENS when I call it from matlab but then Hangs\stops working?
Thank in advance.
This almost certainly has nothing to do with debug versus release or whether mt is enabled. You are not making a matlab extension, just using a binary from the command line. If the program works when you type things in from the command line, it should work when called from Matlab unless you are running low on memory (highly unlikely also).
I would examine the contents of . .
['FaceTracker.exe < ' InputVid]
...and copy and paste the string directly into the command line (system, not Matlab) to see if you can replicate the error. The error is most likely occurring because your exe is not handling the file string well.
Try putting the inputvid, calling m file, and FaceTracker.exe in the working directory to make the most simple scenario. If that works, make things more complex by placing input vid into another directory and bug hunt from there.
Best of luck!
I think this exe file depends on some other libraries. You should copy them into one of the directories in your system parameter PATH. Or you can use the static link option when build your project.
Your applications don't require the entire Visual C++ compiler to be installed, just the runtime library. Microsoft has a free redistributable which can add this runtime library to any computer. You can find vcredist_x86.exe in your Visual C++ install path, or download it from http://www.microsoft.com/en-us/download/details.aspx?id=8328

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.