How do I define a DllMain function in rust cdylib? - c++

Is there a specific way to define a DllMain function in Rust? I have tried this:
use winapi::shared::ntdef::*;
use winapi::um::winnt::DLL_PROCESS_ATTACH;
use winapi::shared::minwindef::*;
use std::*;
#[no_mangle]
extern "stdcall" fn DllMain(hInstDll: HINSTANCE, fdwReason: DWORD, lpvReserved: LPVOID){
if fdwReason == DLL_PROCESS_ATTACH {
}
}
But windows doesn't seem to call the function when the dll is attached to a process?
Edit: Renaming function to _DllMainCRTStartup is recognized as an entry point by the compiler, but rust is unable to find the c-runtime libraries
`error: linking with 'link.exe' failed: exit code: 1120
|
= note: "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX64\x64\link.exe" "/NOLOGO" "/NXCOMPAT" "/LIBPATH:C:\Users\Admin\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib" "C:\Users\Admin\source\repos\dandra_but_rust\target\debug\deps\dandra_but_rust.2zwdumngih9wy4mr.rcgu.o" "/OUT:C:\Users\Admin\source\repos\dandra_but_rust\target\debug\deps\dandra_but_rust.dll" "/DEF:C:\Users\Admin\AppData\Local\Temp\rustc7Q6l64\lib.def" "C:\Users\Admin\source\repos\dandra_but_rust\target\debug\deps\dandra_but_rust.2ir3c20pqmwv4eun.rcgu.o" "/OPT:REF,NOICF" "/DLL" "/IMPLIB:C:\Users\Admin\source\repos\dandra_but_rust\target\debug\deps\dandra_but_rust.dll.lib" "/DEBUG" "/NATVIS:C:\Users\Admin\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\etc\intrinsic.natvis" "/NATVIS:C:\Users\Admin\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\etc\liballoc.natvis" "/NATVIS:C:\Users\Admin\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\etc\libcore.natvis" "/NATVIS:C:\Users\Admin\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\etc\libstd.natvis" "/LIBPATH:C:\Users\Admin\source\repos\dandra_but_rust\target\debug\deps" "/LIBPATH:C:\Users\Admin\source\repos\dandra_but_rust\target\debug\build\minhook-sys-148df4753bb64a28\out" "/LIBPATH:C:\Users\Admin\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib" "C:\Users\Admin\source\repos\dandra_but_rust\target\debug\deps\libwinapi-1d830746c941a966.rlib" "C:\Users\Admin\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib\libstd-e5130808ccb074ce.rlib" "C:\Users\Admin\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib\libpanic_unwind-580326a9fdffe4b1.rlib" "C:\Users\Admin\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib\librustc_demangle-a76d77b5d9ed4759.rlib" "C:\Users\Admin\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib\libhashbrown-d5a5b7aa7eeea0b8.rlib" "C:\Users\Admin\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib\librustc_std_workspace_alloc-4b74b4985b95e6c8.rlib" "C:\Users\Admin\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib\libunwind-b2d5eb0d27518d1c.rlib" "C:\Users\Admin\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib\libcfg_if-8a162ec37e71ea47.rlib" "C:\Users\Admin\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib\liblibc-45fb7c94b612099e.rlib" "C:\Users\Admin\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib\liballoc-3c0db88c6c3c2080.rlib" "C:\Users\Admin\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib\librustc_std_workspace_core-ae8fea3b9ef7193c.rlib" "C:\Users\Admin\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib\libcore-44bd5dbe4e29964c.rlib" "C:\Users\Admin\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\x86_64-pc-windows-msvc\lib\libcompiler_builtins-2e1363d96f00dd60.rlib" "advapi32.lib" "cfgmgr32.lib" "credui.lib" "gdi32.lib" "kernel32.lib" "msimg32.lib" "ole32.lib" "opengl32.lib" "secur32.lib" "shell32.lib" "user32.lib" "winspool.lib" "advapi32.lib" "ws2_32.lib" "userenv.lib" "msvcrt.lib"
= note: LINK : warning LNK4216: Exported entry point _DllMainCRTStartup
Creating library C:\Users\Admin\source\repos\dandra_but_rust\target\debug\deps\dandra_but_rust.dll.lib and object C:\Users\Admin\source\repos\dandra_but_rust\target\debug\deps\dandra_but_rust.dll.exp
libstd-e5130808ccb074ce.rlib(std-e5130808ccb074ce.std.cergmp4c-cgu.0.rcgu.o) : error LNK2001: unresolved external symbol __CxxFrameHandler3
libpanic_unwind-580326a9fdffe4b1.rlib(panic_unwind-580326a9fdffe4b1.panic_unwind.c9nntgss-cgu.0.rcgu.o) : error LNK2001: unresolved external symbol __CxxFrameHandler3
liballoc-3c0db88c6c3c2080.rlib(alloc-3c0db88c6c3c2080.alloc.3pxpxezw-cgu.0.rcgu.o) : error LNK2001: unresolved external symbol __CxxFrameHandler3
libstd-e5130808ccb074ce.rlib(std-e5130808ccb074ce.std.cergmp4c-cgu.0.rcgu.o) : error LNK2019: unresolved external symbol memcpy referenced in function _ZN4core3fmt5Write10write_char17h1ad50f755d81c59eE
liballoc-3c0db88c6c3c2080.rlib(alloc-3c0db88c6c3c2080.alloc.3pxpxezw-cgu.0.rcgu.o) : error LNK2001: unresolved external symbol memcpy
libcore-44bd5dbe4e29964c.rlib(core-44bd5dbe4e29964c.core.7rmb18uk-cgu.0.rcgu.o) : error LNK2001: unresolved external symbol memcpy
libstd-e5130808ccb074ce.rlib(std-e5130808ccb074ce.std.cergmp4c-cgu.0.rcgu.o) : error LNK2019: unresolved external symbol memset referenced in function _ZN4core3ops8function6FnOnce40call_once$u7b$$u7b$vtable.shim$u7d$$u7d$17h79aa7d690a3d5e88E
librustc_demangle-a76d77b5d9ed4759.rlib(rustc_demangle-a76d77b5d9ed4759.rustc_demangle.bwbqjk7y-cgu.0.rcgu.o) : error LNK2001: unresolved external symbol memset
libcore-44bd5dbe4e29964c.rlib(core-44bd5dbe4e29964c.core.7rmb18uk-cgu.0.rcgu.o) : error LNK2001: unresolved external symbol memset
libstd-e5130808ccb074ce.rlib(std-e5130808ccb074ce.std.cergmp4c-cgu.0.rcgu.o) : error LNK2019: unresolved external symbol memmove referenced in function _ZN4core3ptr90drop_in_place$LT$std..io..buffered..bufwriter..BufWriter$LT$W$GT$..flush_buf..BufGuard$GT$17hedcaf5acf9e62584E
liballoc-3c0db88c6c3c2080.rlib(alloc-3c0db88c6c3c2080.alloc.3pxpxezw-cgu.0.rcgu.o) : error LNK2001: unresolved external symbol memmove
libstd-e5130808ccb074ce.rlib(std-e5130808ccb074ce.std.cergmp4c-cgu.0.rcgu.o) : error LNK2019: unresolved external symbol memcmp referenced in function _ZN5alloc11collections5btree3map21BTreeMap$LT$K$C$V$GT$6insert17hc358a9b81795c956E
librustc_demangle-a76d77b5d9ed4759.rlib(rustc_demangle-a76d77b5d9ed4759.rustc_demangle.bwbqjk7y-cgu.0.rcgu.o) : error LNK2001: unresolved external symbol memcmp
libcore-44bd5dbe4e29964c.rlib(core-44bd5dbe4e29964c.core.7rmb18uk-cgu.0.rcgu.o) : error LNK2001: unresolved external symbol memcmp
libstd-e5130808ccb074ce.rlib(std-e5130808ccb074ce.std.cergmp4c-cgu.0.rcgu.o) : error LNK2019: unresolved external symbol strlen referenced in function _ZN3std3ffi5c_str7CString8from_raw17h67ae0c016f9720bbE
libpanic_unwind-580326a9fdffe4b1.rlib(panic_unwind-580326a9fdffe4b1.panic_unwind.c9nntgss-cgu.0.rcgu.o) : error LNK2019: unresolved external symbol _CxxThrowException referenced in function _ZN12panic_unwind8real_imp5panic17hd7ecf9c6caff3a53E
msvcrt.lib(delete_scalar.obj) : error LNK2019: unresolved external symbol free referenced in function "void __cdecl operator delete(void *)" (??3#YAXPEAX#Z)
C:\Users\Admin\source\repos\dandra_but_rust\target\debug\deps\dandra_but_rust.dll : fatal error LNK1120: 8 unresolved externals
error: aborting due to previous error
error: could not compile 'dandra_but_rust'`

Related

Error Calling dmumps_c() and zmumps_c() for MUMPS 5.5.1.5

I m using MUMPS 5.5.1.5 compiled with CMake 3.24.2 and Intel one Api on Windows .
After generating and Building the projects .
I Had called dmumps_c() and zmumps_c() from mumps libraries .
Errors appeared ::
DirectMumps.obj : error LNK2001: unresolved external symbol "void __cdecl _com_issue_error(long)" (?_com_issue_error##YAXJ#Z)
1>DirectMumps.obj : error LNK2001: unresolved external symbol "char * __cdecl _com_util::ConvertBSTRToString(wchar_t *)" (?ConvertBSTRToString#_com_util##YAPEADPEA_W#Z)
1>zmumps.lib(mumps_c.obj) : error LNK2001: unresolved external symbol ZMUMPS_SET_TMP_PTR
1>zmumps.lib(mumps_c.obj) : error LNK2001: unresolved external symbol ZMUMPS_F77
1>dmumps.lib(mumps_c.obj) : error LNK2001: unresolved external symbol DMUMPS_SET_TMP_PTR
1>dmumps.lib(mumps_c.obj) : error LNK2001: unresolved external symbol DMUMPS_F77
Please Any help.

Getting unresolved external symbol errors for libcurl_a.lib in VC++

I have a project in VC++ where I am using libcurl library. Even after adding the library in Additional Dependencies I am facing around 150 unresolved external errors, all majorly for libcurl_a.lib file.
Error -
1>OLDNAMES.lib(open.obi): warning LNK4049: locally defined symbol open imported
1>libcurl_a.lib(mime.obj): error LNK2019: unresolved external symbol imp__feof referenced
1>libcurl_a.lib(mime.obj): error LNK2019: unresolved external symbol imp_access referenced in function Curl_mime_duppart in function _read_part content
1>OLDNAMES.lib(access.obi): error LNK2001: unresolved external symbol imp access
1>libcurl_a.lib(mime.obj): error LNK2019: unresolved external symbolimp_ stat64 referenced in function Curl_nine duppart 1>libcurl_a.lib(strerror.obj): error LNK2019: unresolved external symbolimp_strerror referenced in function Curl strerror
1>libcurl_a.lib(url.obj): error LNK2001: unresolved external symbol imp_strerror
1>1ibcurl_a.lib(telnet.obj): error LNK2001: unresolved external symbol imp_strncpy
1>1ibcurl_a.lib(ftp.obj): error LNK2001: unresolved external symbolimp_strncpy
1>libcurl_alib(curl_sspi.obj): error LNK2001: unresolved external symbolimp_strncpy
1>1ibcurl_s.lib(strerror.obj): error LNK2001: unresolved external symbolimp_strncpy
1>1ibcurl_a.lib(vtis.obj): error LNK2001: unresolved external symbol imp_strncpy 1>1ibcurl_.1ib(url.obj): error LNK2001: unresolved external symbolimp_strncpy
1>libcurl_a.lib(schannel.obj) error LNK 2001: unresolved external symbol_imp_strncpy
1>libcuri_a.lip(strerror.obj) : error LNK2019: unresolved external symbol imp sys_nerr referenced in function Curi strerror
1>libcurl_a.lib(warnless.obj): error LNK2019: unresolved external symbol 1 OLDNAMES1ib(read.obi): error LNK2001: unresolved external symbolimp_read imp_read referenced in function curl_read
111bcurt a.lib/warmless.obj) error LNK2019: unresolved external symbol_imp_write referenced in function curl, weite
1 OLDNAMES-110(write.obi): error LNK2001: unresolved external symbolimp_write
I have solved this problem by building the library with RTLIBCFG=static option.

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

How to compile programs involving external libraries using MSVC developer command prompt?

I am working on an opengl project (in Visual Studio 2019) in which I am using glfw and glad. I want to create a makefile (windows platform) so that other team members could also compile and execute it. I am using nmake command on the developer command prompt to run the makefile. The problem is I don't know how to link programs involving an external library (like glfw). I tried to specify the library path like:
link /nologo /LIBPATH:"files\libs" main.obj sphere.obj
This gives errors like "unresolved external symbols [glfw functions ex:glfwinit(),etc]". Specifying the library glfw3.lib with the .obj files like:
link /nologo /LIBPATH:"files\libs" main.obj sphere.obj glfw3.lib
again gives a list of errors specifying many unresolved external symbols and asks to use /NODEFAULTLIB which doesn't work either.
So how am I supposed to link these programs?
EDIT:
Also: I have 64 bit glfw3.lib . I used both the developer command prompt and the x64 native tools command prompt. With the developer command prompt I got an error:
LIBCMT.lib(std_type_info_static.obj) : fatal error LNK1112: module machine type 'x86' conflicts with target machine type 'x64'
So I used x64 native tools command prompt. The following errors are the errors I got using x64 native tools command prompt.
On specifying glfw3.lib along with the .obj files, I am getting these errors:
link /nologo /LIBPATH:"..\SoC Other Files" glad.obj Planet.obj ImageLoader.obj Shader.obj Sphere.obj glfw3.lib
LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library
LINK : warning LNK4286: symbol 'calloc' defined in 'libucrt.lib(calloc.obj)' is imported by 'glfw3.lib(win32_joystick.obj)'
LINK : warning LNK4286: symbol 'calloc' defined in 'libucrt.lib(calloc.obj)' is imported by 'glfw3.lib(wgl_context.obj)'
LINK : warning LNK4286: symbol 'calloc' defined in 'libucrt.lib(calloc.obj)' is imported by 'glfw3.lib(egl_context.obj)'
LINK : warning LNK4286: symbol 'calloc' defined in 'libucrt.lib(calloc.obj)' is imported by 'glfw3.lib(osmesa_context.obj)'
LINK : warning LNK4286: symbol 'calloc' defined in 'libucrt.lib(calloc.obj)' is imported by 'glfw3.lib(win32_monitor.obj)'
LINK : warning LNK4286: symbol 'calloc' defined in 'libucrt.lib(calloc.obj)' is imported by 'glfw3.lib(monitor.obj)'
LINK : warning LNK4286: symbol 'calloc' defined in 'libucrt.lib(calloc.obj)' is imported by 'glfw3.lib(vulkan.obj)'
LINK : warning LNK4286: symbol 'calloc' defined in 'libucrt.lib(calloc.obj)' is imported by 'glfw3.lib(win32_window.obj)'
LINK : warning LNK4217: symbol 'calloc' defined in 'libucrt.lib(calloc.obj)' is imported by 'glfw3.lib(init.obj)' in function '_glfwInputError'
LINK : warning LNK4217: symbol 'calloc' defined in 'libucrt.lib(calloc.obj)' is imported by 'glfw3.lib(window.obj)' in function 'glfwSetWindowAttrib'
LINK : warning LNK4217: symbol 'calloc' defined in 'libucrt.lib(calloc.obj)' is imported by 'glfw3.lib(input.obj)' in function 'glfwGetGamepadState'
LINK : warning LNK4286: symbol 'calloc' defined in 'libucrt.lib(calloc.obj)' is imported by 'glfw3.lib(win32_init.obj)'
LINK : warning LNK4286: symbol 'free' defined in 'libucrt.lib(free.obj)' is imported by 'glfw3.lib(win32_joystick.obj)'
LINK : warning LNK4286: symbol 'free' defined in 'libucrt.lib(free.obj)' is imported by 'glfw3.lib(wgl_context.obj)'
LINK : warning LNK4286: symbol 'free' defined in 'libucrt.lib(free.obj)' is imported by 'glfw3.lib(egl_context.obj)'
LINK : warning LNK4286: symbol 'free' defined in 'libucrt.lib(free.obj)' is imported by 'glfw3.lib(osmesa_context.obj)'
LINK : warning LNK4286: symbol 'free' defined in 'libucrt.lib(free.obj)' is imported by 'glfw3.lib(win32_monitor.obj)'
LINK : warning LNK4286: symbol 'free' defined in 'libucrt.lib(free.obj)' is imported by 'glfw3.lib(monitor.obj)'
LINK : warning LNK4286: symbol 'free' defined in 'libucrt.lib(free.obj)' is imported by 'glfw3.lib(vulkan.obj)'
LINK : warning LNK4286: symbol 'free' defined in 'libucrt.lib(free.obj)' is imported by 'glfw3.lib(win32_window.obj)'
LINK : warning LNK4217: symbol 'free' defined in 'libucrt.lib(free.obj)' is imported by 'glfw3.lib(init.obj)' in function 'terminate'
LINK : warning LNK4217: symbol 'free' defined in 'libucrt.lib(free.obj)' is imported by 'glfw3.lib(window.obj)' in function 'glfwSetWindowAttrib'
LINK : warning LNK4286: symbol 'free' defined in 'libucrt.lib(free.obj)' is imported by 'glfw3.lib(input.obj)'
LINK : warning LNK4286: symbol 'free' defined in 'libucrt.lib(free.obj)' is imported by 'glfw3.lib(win32_init.obj)'
LINK : warning LNK4217: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'glfw3.lib(init.obj)' in function 'vsnprintf'
LINK : warning LNK4286: symbol '__stdio_common_vsprintf' defined in 'libucrt.lib(output.obj)' is imported by 'glfw3.lib(win32_joystick.obj)'
LINK : warning LNK4217: symbol '_wassert' defined in 'libucrt.lib(assert.obj)' is imported by 'glfw3.lib(osmesa_context.obj)' in function '_glfwCreateContextOSMesa'
LINK : warning LNK4286: symbol '_wassert' defined in 'libucrt.lib(assert.obj)' is imported by 'glfw3.lib(monitor.obj)'
LINK : warning LNK4217: symbol '_wassert' defined in 'libucrt.lib(assert.obj)' is imported by 'glfw3.lib(vulkan.obj)' in function '_glfwGetVulkanResultString'
LINK : warning LNK4217: symbol '_wassert' defined in 'libucrt.lib(assert.obj)' is imported by 'glfw3.lib(wgl_context.obj)' in function 'choosePixelFormat'
LINK : warning LNK4286: symbol '_wassert' defined in 'libucrt.lib(assert.obj)' is imported by 'glfw3.lib(egl_context.obj)'
LINK : warning LNK4217: symbol '_wassert' defined in 'libucrt.lib(assert.obj)' is imported by 'glfw3.lib(window.obj)' in function 'glfwWindowHintString'
LINK : warning LNK4286: symbol '_wassert' defined in 'libucrt.lib(assert.obj)' is imported by 'glfw3.lib(input.obj)'
LINK : warning LNK4286: symbol '_wassert' defined in 'libucrt.lib(assert.obj)' is imported by 'glfw3.lib(context.obj)'
LINK : warning LNK4286: symbol '_wassert' defined in 'libucrt.lib(assert.obj)' is imported by 'glfw3.lib(win32_thread.obj)'
LINK : warning LNK4217: symbol 'strcspn' defined in 'libucrt.lib(strcspn.obj)' is imported by 'glfw3.lib(input.obj)' in function 'glfwUpdateGamepadMappings'
LINK : warning LNK4217: symbol 'strncmp' defined in 'libucrt.lib(strncmp.obj)' is imported by 'glfw3.lib(input.obj)' in function 'parseMapping'
LINK : warning LNK4286: symbol 'strncmp' defined in 'libucrt.lib(strncmp.obj)' is imported by 'glfw3.lib(context.obj)'
LINK : warning LNK4286: symbol 'strncmp' defined in 'libucrt.lib(strncmp.obj)' is imported by 'glfw3.lib(egl_context.obj)'
LINK : warning LNK4217: symbol 'realloc' defined in 'libucrt.lib(realloc.obj)' is imported by 'glfw3.lib(input.obj)' in function 'glfwUpdateGamepadMappings'
LINK : warning LNK4286: symbol 'realloc' defined in 'libucrt.lib(realloc.obj)' is imported by 'glfw3.lib(win32_monitor.obj)'
LINK : warning LNK4286: symbol 'realloc' defined in 'libucrt.lib(realloc.obj)' is imported by 'glfw3.lib(monitor.obj)'
LINK : warning LNK4217: symbol 'strtoul' defined in 'libucrt.lib(strtox.obj)' is imported by 'glfw3.lib(input.obj)' in function 'parseMapping'
LINK : warning LNK4217: symbol '__stdio_common_vsscanf' defined in 'libucrt.lib(input.obj)' is imported by 'glfw3.lib(context.obj)' in function '_vsscanf_l'
LINK : warning LNK4217: symbol 'wcscmp' defined in 'libucrt.lib(wcscmp.obj)' is imported by 'glfw3.lib(win32_monitor.obj)' in function '_glfwPollMonitorsWin32'
LINK : warning LNK4217: symbol 'qsort' defined in 'libucrt.lib(qsort.obj)' is imported by 'glfw3.lib(monitor.obj)' in function 'refreshVideoModes'
LINK : warning LNK4286: symbol 'qsort' defined in 'libucrt.lib(qsort.obj)' is imported by 'glfw3.lib(win32_joystick.obj)'
LINK : warning LNK4217: symbol 'powf' defined in 'libucrt.lib(powf.obj)' is imported by 'glfw3.lib(monitor.obj)' in function 'glfwSetGamma'
glfw3.lib(window.obj) : error LNK2019: unresolved external symbol __imp_strncpy referenced in function glfwWindowHintString
glfw3.lib(input.obj) : error LNK2001: unresolved external symbol __imp_strncpy
glfw3.lib(win32_joystick.obj) : error LNK2001: unresolved external symbol __imp_strncpy
glfw3.lib(input.obj) : error LNK2019: unresolved external symbol __imp_strspn referenced in function glfwUpdateGamepadMappings
glfw3.lib(win32_init.obj) : error LNK2019: unresolved external symbol __imp_TranslateMessage referenced in function createHelperWindow
glfw3.lib(win32_window.obj) : error LNK2001: unresolved external symbol __imp_TranslateMessage
glfw3.lib(win32_init.obj) : error LNK2019: unresolved external symbol __imp_DispatchMessageW referenced in function createHelperWindow
glfw3.lib(win32_window.obj) : error LNK2001: unresolved external symbol __imp_DispatchMessageW
glfw3.lib(win32_init.obj) : error LNK2019: unresolved external symbol __imp_PeekMessageW referenced in function createHelperWindow
glfw3.lib(win32_window.obj) : error LNK2001: unresolved external symbol __imp_PeekMessageW
glfw3.lib(win32_init.obj) : error LNK2019: unresolved external symbol __imp_RegisterDeviceNotificationW referenced in function createHelperWindow
glfw3.lib(win32_init.obj) : error LNK2019: unresolved external symbol __imp_UnregisterDeviceNotification referenced in function _glfwPlatformTerminate
glfw3.lib(win32_init.obj) : error LNK2019: unresolved external symbol __imp_CreateWindowExW referenced in function createHelperWindow
glfw3.lib(win32_window.obj) : error LNK2001: unresolved external symbol __imp_CreateWindowExW
glfw3.lib(win32_init.obj) : error LNK2019: unresolved external symbol __imp_DestroyWindow referenced in function _glfwPlatformTerminate
glfw3.lib(win32_window.obj) : error LNK2001: unresolved external symbol __imp_DestroyWindow
glfw3.lib(win32_init.obj) : error LNK2019: unresolved external symbol __imp_ShowWindow referenced in function createHelperWindow
glfw3.lib(win32_window.obj) : error LNK2001: unresolved external symbol __imp_ShowWindow
glfw3.lib(win32_init.obj) : error LNK2019: unresolved external symbol __imp_ToUnicode referenced in function _glfwUpdateKeyNamesWin32
glfw3.lib(win32_init.obj) : error LNK2019: unresolved external symbol __imp_MapVirtualKeyW referenced in function _glfwUpdateKeyNamesWin32
glfw3.lib(win32_window.obj) : error LNK2001: unresolved external symbol __imp_MapVirtualKeyW
glfw3.lib(win32_init.obj) : error LNK2019: unresolved external symbol __imp_SystemParametersInfoW referenced in function _glfwPlatformInit
glfw3.lib(win32_window.obj) : error LNK2001: unresolved external symbol __imp_SystemParametersInfoW
glfw3.lib(win32_monitor.obj) : error LNK2019: unresolved external symbol __imp_wcscpy referenced in function createMonitor
glfw3.lib(win32_monitor.obj) : error LNK2019: unresolved external symbol __imp_CreateDCW referenced in function _glfwPlatformGetGammaRamp
glfw3.lib(win32_monitor.obj) : error LNK2019: unresolved external symbol __imp_DeleteDC referenced in function _glfwPlatformGetGammaRamp
glfw3.lib(win32_monitor.obj) : error LNK2019: unresolved external symbol __imp_GetDeviceCaps referenced in function _glfwGetMonitorContentScaleWin32
glfw3.lib(win32_monitor.obj) : error LNK2019: unresolved external symbol __imp_GetDeviceGammaRamp referenced in function _glfwPlatformGetGammaRamp
glfw3.lib(win32_monitor.obj) : error LNK2019: unresolved external symbol __imp_SetDeviceGammaRamp referenced in function _glfwPlatformSetGammaRamp
glfw3.lib(win32_monitor.obj) : error LNK2019: unresolved external symbol __imp_GetDC referenced in function _glfwGetMonitorContentScaleWin32
glfw3.lib(win32_window.obj) : error LNK2001: unresolved external symbol __imp_GetDC
glfw3.lib(wgl_context.obj) : error LNK2001: unresolved external symbol __imp_GetDC
glfw3.lib(win32_monitor.obj) : error LNK2019: unresolved external symbol __imp_ReleaseDC referenced in function _glfwGetMonitorContentScaleWin32
glfw3.lib(win32_window.obj) : error LNK2001: unresolved external symbol __imp_ReleaseDC
glfw3.lib(win32_monitor.obj) : error LNK2019: unresolved external symbol __imp_ChangeDisplaySettingsExW referenced in function _glfwSetVideoModeWin32
glfw3.lib(win32_monitor.obj) : error LNK2019: unresolved external symbol __imp_EnumDisplaySettingsW referenced in function _glfwPlatformGetVideoModes
glfw3.lib(win32_monitor.obj) : error LNK2019: unresolved external symbol __imp_EnumDisplaySettingsExW referenced in function _glfwPlatformGetMonitorPos
glfw3.lib(win32_monitor.obj) : error LNK2019: unresolved external symbol __imp_EnumDisplayDevicesW referenced in function _glfwPollMonitorsWin32
glfw3.lib(win32_monitor.obj) : error LNK2019: unresolved external symbol __imp_GetMonitorInfoW referenced in function _glfwPlatformGetMonitorWorkarea
glfw3.lib(win32_window.obj) : error LNK2001: unresolved external symbol __imp_GetMonitorInfoW
glfw3.lib(win32_monitor.obj) : error LNK2019: unresolved external symbol __imp_EnumDisplayMonitors referenced in function createMonitor
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_CreateBitmap referenced in function createIcon
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_CreateRectRgn referenced in function updateFramebufferTransparency
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_DeleteObject referenced in function createIcon
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_CreateDIBSection referenced in function createIcon
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_TrackMouseEvent referenced in function windowProc
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_GetMessageTime referenced in function windowProc
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_SendMessageW referenced in function _glfwPlatformSetWindowIcon
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_PostMessageW referenced in function _glfwPlatformPostEmptyEvent
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_WaitMessage referenced in function _glfwPlatformWaitEvents
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_DefWindowProcW referenced in function windowProc
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_UnregisterClassW referenced in function _glfwUnregisterWindowClassWin32
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_RegisterClassExW referenced in function _glfwRegisterWindowClassWin32
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_GetLayeredWindowAttributes referenced in function _glfwPlatformGetWindowOpacity
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_SetLayeredWindowAttributes referenced in function _glfwPlatformSetWindowOpacity
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_FlashWindow referenced in function _glfwPlatformRequestWindowAttention
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_MoveWindow referenced in function _glfwPlatformSetWindowSizeLimits
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_SetWindowPos referenced in function _glfwPlatformSetWindowPos
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_GetWindowPlacement referenced in function createNativeWindow
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_SetWindowPlacement referenced in function createNativeWindow
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_IsWindowVisible referenced in function _glfwPlatformWindowVisible
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_IsIconic referenced in function _glfwPlatformWindowIconified
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_BringWindowToTop referenced in function _glfwPlatformFocusWindow
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_IsZoomed referenced in function _glfwPlatformWindowMaximized
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_OpenClipboard referenced in function _glfwPlatformSetClipboardString
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_CloseClipboard referenced in function _glfwPlatformSetClipboardString
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_SetClipboardData referenced in function _glfwPlatformSetClipboardString
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_GetClipboardData referenced in function _glfwPlatformGetClipboardString
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_EmptyClipboard referenced in function _glfwPlatformSetClipboardString
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_SetFocus referenced in function _glfwPlatformFocusWindow
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_GetActiveWindow referenced in function _glfwPlatformWindowFocused
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_GetKeyState referenced in function _glfwPlatformPollEvents
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_SetCapture referenced in function windowProc
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_ReleaseCapture referenced in function windowProc
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_MsgWaitForMultipleObjects referenced in function _glfwPlatformWaitEventsTimeout
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_GetSystemMetrics referenced in function _glfwPlatformSetWindowIcon
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_SetForegroundWindow referenced in function _glfwPlatformFocusWindow
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_RedrawWindow referenced in function updateFramebufferTransparency
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_SetPropW referenced in function createNativeWindow
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_GetPropW referenced in function _glfwPlatformPollEvents
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_RemovePropW referenced in function _glfwPlatformDestroyWindow
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_SetWindowTextW referenced in function _glfwPlatformSetWindowTitle
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_GetClientRect referenced in function _glfwPlatformGetWindowSize
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_GetWindowRect referenced in function _glfwPlatformSetWindowSizeLimits
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_AdjustWindowRectEx referenced in function _glfwPlatformSetWindowPos
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_SetCursorPos referenced in function _glfwPlatformSetCursorPos
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_SetCursor referenced in function updateCursorImage
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_GetCursorPos referenced in function _glfwPlatformGetCursorPos
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_ClientToScreen referenced in function _glfwPlatformSetCursorPos
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_ScreenToClient referenced in function _glfwPlatformGetCursorPos
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_WindowFromPoint referenced in function cursorInContentArea
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_ClipCursor referenced in function updateClipRect
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_SetRect referenced in function _glfwPlatformGetWindowFrameSize
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_PtInRect referenced in function cursorInContentArea
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_GetWindowLongW referenced in function _glfwPlatformSetWindowMonitor
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_SetWindowLongW referenced in function _glfwPlatformSetWindowMonitor
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_GetClassLongPtrW referenced in function _glfwPlatformSetWindowIcon
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_LoadCursorW referenced in function _glfwRegisterWindowClassWin32
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_DestroyIcon referenced in function _glfwPlatformDestroyCursor
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_LoadImageW referenced in function _glfwRegisterWindowClassWin32
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_CreateIconIndirect referenced in function createIcon
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_MonitorFromWindow referenced in function _glfwPlatformGetWindowContentScale
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_GetRawInputData referenced in function windowProc
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_RegisterRawInputDevices referenced in function enableRawMouseMotion
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_DragQueryFileW referenced in function windowProc
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_DragQueryPoint referenced in function windowProc
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_DragFinish referenced in function windowProc
glfw3.lib(win32_window.obj) : error LNK2019: unresolved external symbol __imp_DragAcceptFiles referenced in function createNativeWindow
glfw3.lib(win32_joystick.obj) : error LNK2019: unresolved external symbol __imp_GetRawInputDeviceInfoA referenced in function supportsXInput
glfw3.lib(win32_joystick.obj) : error LNK2019: unresolved external symbol __imp_GetRawInputDeviceList referenced in function supportsXInput
glfw3.lib(wgl_context.obj) : error LNK2019: unresolved external symbol __imp_ChoosePixelFormat referenced in function _glfwInitWGL
glfw3.lib(wgl_context.obj) : error LNK2019: unresolved external symbol __imp_DescribePixelFormat referenced in function _glfwCreateContextWGL
glfw3.lib(wgl_context.obj) : error LNK2019: unresolved external symbol __imp_SetPixelFormat referenced in function _glfwInitWGL
glfw3.lib(wgl_context.obj) : error LNK2019: unresolved external symbol __imp_SwapBuffers referenced in function swapBuffersWGL
glad.exe : fatal error LNK1120: 100 unresolved externals
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\bin\HostX64\x64\link.EXE"' : return code '0x460'
Stop.
This is the makefile:
INC = "..\Code Files\include"
INC_SH = "..\Code Files\Shader Class"
INC_SP = "..\Code Files\Sphere"
LOC = "..\SoC Other Files"
Planet.exe: glad.obj ImageLoader.obj Shader.obj Sphere.obj Planet.obj
link /nologo /LIBPATH:$(LOC) glad.obj Planet.obj ImageLoader.obj Shader.obj Sphere.obj glfw3.lib
glad.obj: {../SoC Other Files}glad.c
cl /c /nologo /I $(LOC) "../SoC Other Files/glad.c"
ImageLoader.obj: {../SoC Other Files}ImageLoader.cpp
cl /c /nologo /I $(INC) /EHsc "../SoC Other Files/ImageLoader.cpp"
Shader.obj: {../Code Files/Shader Class}Shader.cpp
cl /c /nologo /I $(INC) /EHsc "..\Code Files\Shader Class\Shader.cpp"
Sphere.obj: {../Code Files/Sphere}Sphere.cpp
cl /c /nologo /I $(INC) /I $(INC_SH) /EHsc "../Code Files/Sphere/Sphere.cpp"
Planet.obj: {../Code Files/Main Code}Planet.cpp
cl /c /nologo /I $(INC) /I $(INC_SH) /I $(INC_SP) /EHsc "../Code Files/Main Code/Planet.cpp"

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