<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>sc6ut Tracker</title>
    <link>https://communities.vmware.com/wbsdv95928/tracker</link>
    <description>sc6ut Tracker</description>
    <pubDate>Fri, 17 Nov 2023 19:34:26 GMT</pubDate>
    <dc:date>2023-11-17T19:34:26Z</dc:date>
    <item>
      <title>[C++] VIX API - Debug static building on MSVC</title>
      <link>https://communities.vmware.com/t5/VIX-API-Discussions/C-VIX-API-Debug-static-building-on-MSVC/m-p/2887099#M3913</link>
      <description>&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;Hi, trying to build some project using C++ and VIX API on Windows.&lt;/P&gt;&lt;P&gt;As it is told in API reference I'm using '/MTd /NODEFAULTLIB:libcmtd.lib' flags, but anyway I get errors on build. By the way, the release build is working great. There is my CMake project code:&lt;/P&gt;&lt;PRE&gt;cmake_minimum_required(VERSION 3.15 FATAL_ERROR)
project(virtualmachine LANGUAGES CXX)

# Static file linking
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreadedDebug")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB:libcmtd.lib")

set(VIX_API_BIN "C:/Program Files (x86)/VMware/VMware VIX")

# Check that VIX API is installed
if (NOT EXISTS ${VIX_API_BIN})
	message(FATAL_ERROR "VMware VIX API is not installed.")
endif ()

# Include VIX API
include_directories(${VIX_API_BIN})

add_executable(${PROJECT_NAME}
	main.cpp
	virtual_machine.h
	virtual_machine_exception.h
	vmware_virtual_machine.cpp
	vmware_virtual_machine.h
)

set_target_properties(${PROJECT_NAME} PROPERTIES
	CXX_STANDARD 17
	CXX_STANDARD_REQUIRED YES
	CXX_EXTENSIONS NO
)

# Link additional libraries
target_link_libraries(${PROJECT_NAME} PRIVATE 
	"${VIX_API_BIN}/Vix64AllProductsd.lib" # VIX API
	ws2_32 # WinSock2
)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp; May be someone tried to link it with C++ code and know what may be a problem? There are the build errors:&lt;/P&gt;&lt;PRE&gt;C:\Users\User\Desktop\virtualmachine\out\build\x64-Debug\libcpmtd.lib(wlocale.obj) : error LNK2001: unresolved external symbol _invalid_parameter
C:\Users\User\Desktop\virtualmachine\out\build\x64-Debug\libcpmtd.lib(xlocale.obj) : error LNK2001: unresolved external symbol _invalid_parameter
C:\Users\User\Desktop\virtualmachine\out\build\x64-Debug\main.cpp.obj : error LNK2001: unresolved external symbol _invalid_parameter
C:\Users\User\Desktop\virtualmachine\out\build\x64-Debug\vmware_virtual_machine.cpp.obj : error LNK2001: unresolved external symbol _invalid_parameter
C:\Users\User\Desktop\virtualmachine\out\build\x64-Debug\libcpmtd.lib(cerr.obj) : error LNK2001: unresolved external symbol _invalid_parameter
C:\Users\User\Desktop\virtualmachine\out\build\x64-Debug\libcpmtd.lib(locale.obj) : error LNK2001: unresolved external symbol _invalid_parameter
C:\Users\User\Desktop\virtualmachine\out\build\x64-Debug\libcpmtd.lib(xwcsxfrm.obj) : error LNK2001: unresolved external symbol _free_dbg
C:\Users\User\Desktop\virtualmachine\out\build\x64-Debug\libcpmtd.lib(StlCompareStringA.obj) : error LNK2001: unresolved external symbol _free_dbg
C:\Users\User\Desktop\virtualmachine\out\build\x64-Debug\libcpmtd.lib(locale.obj) : error LNK2001: unresolved external symbol _free_dbg
C:\Users\User\Desktop\virtualmachine\out\build\x64-Debug\libcpmtd.lib(StlLCMapStringA.obj) : error LNK2001: unresolved external symbol _free_dbg
C:\Users\User\Desktop\virtualmachine\out\build\x64-Debug\libcpmtd.lib(wlocale.obj) : error LNK2001: unresolved external symbol _free_dbg
C:\Users\User\Desktop\virtualmachine\out\build\x64-Debug\libcpmtd.lib(xlocale.obj) : error LNK2001: unresolved external symbol _free_dbg
C:\Users\User\Desktop\virtualmachine\out\build\x64-Debug\main.cpp.obj : error LNK2001: unresolved external symbol _free_dbg
C:\Users\User\Desktop\virtualmachine\out\build\x64-Debug\libcpmtd.lib(locale0.obj) : error LNK2001: unresolved external symbol _free_dbg
C:\Users\User\Desktop\virtualmachine\out\build\x64-Debug\libcpmtd.lib(filesystem.obj) : error LNK2001: unresolved external symbol _free_dbg
C:\Users\User\Desktop\virtualmachine\out\build\x64-Debug\libcpmtd.lib(cerr.obj) : error LNK2001: unresolved external symbol _free_dbg
C:\Users\User\Desktop\virtualmachine\out\build\x64-Debug\libcpmtd.lib(xwcsxfrm.obj) : error LNK2001: unresolved external symbol _malloc_dbg
C:\Users\User\Desktop\virtualmachine\out\build\x64-Debug\libcpmtd.lib(StlCompareStringA.obj) : error LNK2001: unresolved external symbol _malloc_dbg
C:\Users\User\Desktop\virtualmachine\out\build\x64-Debug\libcpmtd.lib(locale.obj) : error LNK2001: unresolved external symbol _malloc_dbg
C:\Users\User\Desktop\virtualmachine\out\build\x64-Debug\libcpmtd.lib(StlLCMapStringA.obj) : error LNK2001: unresolved external symbol _malloc_dbg
C:\Users\User\Desktop\virtualmachine\out\build\x64-Debug\libcpmtd.lib(wlocale.obj) : error LNK2001: unresolved external symbol _malloc_dbg
C:\Users\User\Desktop\virtualmachine\out\build\x64-Debug\libcpmtd.lib(xlocale.obj) : error LNK2001: unresolved external symbol _malloc_dbg
C:\Users\User\Desktop\virtualmachine\out\build\x64-Debug\main.cpp.obj : error LNK2001: unresolved external symbol _malloc_dbg
C:\Users\User\Desktop\virtualmachine\out\build\x64-Debug\libcpmtd.lib(locale0.obj) : error LNK2001: unresolved external symbol _malloc_dbg
C:\Users\User\Desktop\virtualmachine\out\build\x64-Debug\libcpmtd.lib(filesystem.obj) : error LNK2001: unresolved external symbol _malloc_dbg
C:\Users\User\Desktop\virtualmachine\out\build\x64-Debug\libcpmtd.lib(cerr.obj) : error LNK2001: unresolved external symbol _malloc_dbg
C:\Users\User\Desktop\virtualmachine\out\build\x64-Debug\libcpmtd.lib(wlocale.obj) : error LNK2001: unresolved external symbol _CrtDbgReport
C:\Users\User\Desktop\virtualmachine\out\build\x64-Debug\libcpmtd.lib(xlocale.obj) : error LNK2001: unresolved external symbol _CrtDbgReport
C:\Users\User\Desktop\virtualmachine\out\build\x64-Debug\main.cpp.obj : error LNK2001: unresolved external symbol _CrtDbgReport
C:\Users\User\Desktop\virtualmachine\out\build\x64-Debug\vmware_virtual_machine.cpp.obj : error LNK2001: unresolved external symbol _CrtDbgReport
C:\Users\User\Desktop\virtualmachine\out\build\x64-Debug\libcpmtd.lib(cerr.obj) : error LNK2001: unresolved external symbol _CrtDbgReport
C:\Users\User\Desktop\virtualmachine\out\build\x64-Debug\libcpmtd.lib(locale.obj) : error LNK2001: unresolved external symbol _CrtDbgReport
C:\Users\User\Desktop\virtualmachine\out\build\x64-Debug\libcpmtd.lib(_tolower.obj) : error LNK2019: unresolved external symbol _calloc_dbg referenced in function _Getctype
C:\Users\User\Desktop\virtualmachine\out\build\x64-Debug\libcpmtd.lib(locale.obj) : error LNK2001: unresolved external symbol _calloc_dbg
C:\Users\User\Desktop\virtualmachine\out\build\x64-Debug\libcpmtd.lib(wlocale.obj) : error LNK2001: unresolved external symbol _calloc_dbg
C:\Users\User\Desktop\virtualmachine\out\build\x64-Debug\libcpmtd.lib(xlocale.obj) : error LNK2001: unresolved external symbol _calloc_dbg
C:\Users\User\Desktop\virtualmachine\out\build\x64-Debug\libcpmtd.lib(_tolower.obj) : error LNK2019: unresolved external symbol _wcsdup_dbg referenced in function _Getctype
C:\Users\User\Desktop\virtualmachine\out\build\x64-Debug\libcpmtd.lib(xstrcoll.obj) : error LNK2001: unresolved external symbol _wcsdup_dbg
C:\Users\User\Desktop\virtualmachine\out\build\x64-Debug\libcpmtd.lib(locale.obj) : error LNK2019: unresolved external symbol _realloc_dbg referenced in function "private: static void __cdecl std::locale::_Locimp::_Locimp_Addfac(class std::locale::_Locimp *,class std::locale::facet *,unsigned __int64)" (?_Locimp_Addfac@_Locimp@locale@std@@CAXPEAV123@PEAVfacet@23@_K@Z)
C:\Users\User\Desktop\virtualmachine\out\build\x64-Debug\libcpmtd.lib(StlLCMapStringA.obj) : error LNK2019: unresolved external symbol _CrtDbgReportW referenced in function _freea_crt
C:\Users\User\Desktop\virtualmachine\out\build\x64-Debug\libcpmtd.lib(xmbtowc.obj) : error LNK2001: unresolved external symbol _CrtDbgReportW
C:\Users\User\Desktop\virtualmachine\out\build\x64-Debug\libcpmtd.lib(StlCompareStringA.obj) : error LNK2001: unresolved external symbol _CrtDbgReportW
C:\Users\User\Desktop\virtualmachine\out\build\x64-Debug\virtualmachine.exe : fatal error LNK1120: 8 unresolved externals&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sat, 08 Jan 2022 13:29:56 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VIX-API-Discussions/C-VIX-API-Debug-static-building-on-MSVC/m-p/2887099#M3913</guid>
      <dc:creator>sc6ut</dc:creator>
      <dc:date>2022-01-08T13:29:56Z</dc:date>
    </item>
  </channel>
</rss>

