Building in Visual Studio 2015 x64 command prompt seems to revert to x86 at link time (3.10-rc3)
Not really had much time to look at this, but it seems that in v3.10-rc3 (see below) the build seems to revert to x86 mode at link time, possibly earlier. Link command came out as:
[ 76%] Linking C executable ....\output-bin\cbonline.co.uk\checkTransaction.exe
LINK Pass 1: command "C:\PROGRA2\MICROS1.0\VC\bin\link.exe /nologo @CMakeFiles\checkTransaction.dir\objects1.rsp /out:....\output-bin\cbonline.co.uk\checkTransaction.exe /implib:....\lib\checkTransaction.lib /pdb:C:\Users\jamie\Projects\Banking\output-bin\cbonline.co.uk\checkTransaction.pdb /version:0.0 /machine:X86 /debug /INCREMENTAL /subsystem:console ....\lib\cbonline.lib ....\lib\institutions-core.lib ....\lib\data-structures.lib ....\lib\accounts.lib ....\lib\libs-core.lib ....\lib\transport.lib ....\lib\rsa.lib ....\lib\xor.lib ....\lib\cjson.lib ....\3rd-party\libxml2-2.9.3\lib\libxml2.lib ....\3rd-party\curl-7.51.0\builds\libcurl-vc-x64-release-dll-ipv6-sspi-winssl\lib\libcurl.lib ....\3rd-party\pthread-win32\lib\x64\pthreadVC2.lib ....\site_tools\utils\rsa-signing....\3rd-party\openssl-1.1.0e-vs2015\lib64\libcryptoMT.lib ....\site_tools\utils\rsa-signing....\3rd-party\openssl-1.1.0e-vs2015\lib64\libsslMT.lib Crypt32.lib Ws2_32.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:CMakeFiles\checkTransaction.dir/intermediate.manifest CMakeFiles\checkTransaction.dir/manifest.res" failed (exit code 1120) with the following output:
LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
checkTransaction.c.obj : error LNK2019: unresolved external symbol __imp__sem_init referenced in function _main
accounts.lib(accountmanager.c.obj) : error LNK2001: unresolved external symbol __imp__sem_init
checkTransaction.c.obj : error LNK2019: unresolved external symbol __imp__sem_post referenced in function _account_loginprogress
accounts.lib(accountmanager.c.obj) : error LNK2001: unresolved external symbol __imp__sem_post
checkTransaction.c.obj : error LNK2019: unresolved external symbol _OPENSSL_init_crypto referenced in function _load_and_verify
cbonline.lib(cbonline.c.obj) : error LNK2019: unresolved external symbol __imp__curl_easy_cleanup referenced in function _CBOnline_destroy
cbonline.lib(cbonline.c.obj) : error LNK2019: unresolved external symbol _xmlFreeDoc referenced in function _CBOnline_parseAccounts
cbonline.lib(cbonline.c.obj) : error LNK2019: unresolved external symbol _xmlGetProp referenced in function _execute_xpath_expression
cbonline.lib(cbonline.c.obj) : error LNK2019: unresolved external symbol _xmlNodeListGetRawString referenced in function _execute_xpath_expression
cbonline.lib(cbonline.c.obj) : error LNK2019: unresolved external symbol _xmlChildElementCount referenced in function _print_xpath_nodes
cbonline.lib(cbonline.c.obj) : error LNK2019: unresolved external symbol _htmlReadMemory referenced in function _CBOnline_parseAccounts
cbonline.lib(cbonline.c.obj) : error LNK2019: unresolved external symbol _xmlXPathFreeObject referenced in function _CBOnline_parseAccounts
cbonline.lib(cbonline.c.obj) : error LNK2019: unresolved external symbol _xmlXPathCastNodeToString referenced in function _CBOnline_parseAccounts
cbonline.lib(cbonline.c.obj) : error LNK2019: unresolved external symbol _xmlXPathNewContext referenced in function _CBOnline_parseAccounts
cbonline.lib(cbonline.c.obj) : error LNK2019: unresolved external symbol _xmlXPathFreeContext referenced in function _CBOnline_parseAccounts
cbonline.lib(cbonline.c.obj) : error LNK2019: unresolved external symbol _xmlXPathEvalExpression referenced in function _CBOnline_parseAccounts
cbonline.lib(cbonline.c.obj) : error LNK2001: unresolved external symbol __imp__xmlFree
accounts.lib(accountmanager.c.obj) : error LNK2019: unresolved external symbol __imp__pthread_create referenced in function _AccMan_create
accounts.lib(accountmanager.c.obj) : error LNK2019: unresolved external symbol __imp__pthread_exit referenced in function _queueProcessor
accounts.lib(accountmanager.c.obj) : error LNK2019: unresolved external symbol __imp__pthread_join referenced in function _AccMan_destroy
accounts.lib(accountmanager.c.obj) : error LNK2019: unresolved external symbol __imp__pthread_cancel referenced in function _AccMan_destroy
accounts.lib(accountmanager.c.obj) : error LNK2019: unresolved external symbol __imp__pthread_mutex_init referenced in function _AccMan_create
accounts.lib(accountmanager.c.obj) : error LNK2019: unresolved external symbol __imp__pthread_mutex_lock referenced in function _AccMan_destroy
accounts.lib(accountmanager.c.obj) : error LNK2019: unresolved external symbol __imp__pthread_mutex_unlock referenced in function _AccMan_destroy
accounts.lib(accountmanager.c.obj) : error LNK2019: unresolved external symbol __imp__sem_destroy referenced in function _AccMan_destroy
accounts.lib(accountmanager.c.obj) : error LNK2019: unresolved external symbol __imp__sem_wait referenced in function _queueProcessor
accounts.lib(accountmanager.c.obj) : error LNK2019: unresolved external symbol _xmlCheckVersion referenced in function _AccMan_create
accounts.lib(accountmanager.c.obj) : error LNK2019: unresolved external symbol _xmlInitParser referenced in function _AccMan_create
accounts.lib(accountmanager.c.obj) : error LNK2019: unresolved external symbol _xmlCleanupParser referenced in function _AccMan_destroy
accounts.lib(accountmanager.c.obj) : error LNK2019: unresolved external symbol __imp__curl_global_cleanup referenced in function _AccMan_destroy
libs-core.lib(misc-funcs.c.obj) : error LNK2019: unresolved external symbol _sem_timedwait referenced in function _waitForCallback
transport.lib(curl-transport.c.obj) : error LNK2019: unresolved external symbol __imp__curl_slist_append referenced in function _login_curl
transport.lib(curl-transport.c.obj) : error LNK2019: unresolved external symbol __imp__curl_slist_free_all referenced in function _login_curl
transport.lib(curl-transport.c.obj) : error LNK2019: unresolved external symbol __imp__curl_easy_init referenced in function _login_curl
transport.lib(curl-transport.c.obj) : error LNK2019: unresolved external symbol __imp__curl_easy_setopt referenced in function _login_curl
transport.lib(curl-transport.c.obj) : error LNK2019: unresolved external symbol __imp__curl_easy_perform referenced in function _login_curl
rsa.lib(t-rsa.c.obj) : error LNK2019: unresolved external symbol _CRYPTO_malloc referenced in function _sign_it
rsa.lib(t-rsa.c.obj) : error LNK2019: unresolved external symbol _CRYPTO_free referenced in function _sign_it
rsa.lib(t-rsa.c.obj) : error LNK2019: unresolved external symbol _BIO_new_mem_buf referenced in function _load_public_key_from_buffer
rsa.lib(t-rsa.c.obj) : error LNK2019: unresolved external symbol _EVP_MD_CTX_new referenced in function _sign_it
rsa.lib(t-rsa.c.obj) : error LNK2019: unresolved external symbol _EVP_MD_CTX_free referenced in function _sign_it
rsa.lib(t-rsa.c.obj) : error LNK2019: unresolved external symbol _EVP_DigestInit_ex referenced in function _sign_it
rsa.lib(t-rsa.c.obj) : error LNK2019: unresolved external symbol _EVP_DigestUpdate referenced in function _sign_it
rsa.lib(t-rsa.c.obj) : error LNK2019: unresolved external symbol _EVP_DigestSignInit referenced in function _sign_it
rsa.lib(t-rsa.c.obj) : error LNK2019: unresolved external symbol _EVP_DigestSignFinal referenced in function _sign_it
rsa.lib(t-rsa.c.obj) : error LNK2019: unresolved external symbol _EVP_DigestVerifyInit referenced in function _verify_it
rsa.lib(t-rsa.c.obj) : error LNK2019: unresolved external symbol _EVP_DigestVerifyFinal referenced in function _verify_it
rsa.lib(t-rsa.c.obj) : error LNK2019: unresolved external symbol _EVP_get_digestbyname referenced in function _sign_it
rsa.lib(t-rsa.c.obj) : error LNK2019: unresolved external symbol _EVP_PKEY_assign referenced in function _make_keys
rsa.lib(t-rsa.c.obj) : error LNK2019: unresolved external symbol _EVP_PKEY_new referenced in function _load_private_key
rsa.lib(t-rsa.c.obj) : error LNK2019: unresolved external symbol _EVP_PKEY_free referenced in function _load_private_key
rsa.lib(t-rsa.c.obj) : error LNK2019: unresolved external symbol _RSA_generate_key referenced in function _make_keys
rsa.lib(t-rsa.c.obj) : error LNK2019: unresolved external symbol _RSA_free referenced in function _make_keys
rsa.lib(t-rsa.c.obj) : error LNK2019: unresolved external symbol _RSAPublicKey_dup referenced in function _make_keys
rsa.lib(t-rsa.c.obj) : error LNK2019: unresolved external symbol _RSAPrivateKey_dup referenced in function _make_keys
rsa.lib(t-rsa.c.obj) : error LNK2019: unresolved external symbol _PEM_read_PrivateKey referenced in function _load_private_key
rsa.lib(t-rsa.c.obj) : error LNK2019: unresolved external symbol _PEM_write_PrivateKey referenced in function _make_keys
rsa.lib(t-rsa.c.obj) : error LNK2019: unresolved external symbol _PEM_read_bio_PUBKEY referenced in function _load_public_key_from_buffer
rsa.lib(t-rsa.c.obj) : error LNK2019: unresolved external symbol _PEM_read_PUBKEY referenced in function _load_public_key
rsa.lib(t-rsa.c.obj) : error LNK2019: unresolved external symbol _PEM_write_PUBKEY referenced in function _make_keys
rsa.lib(t-rsa.c.obj) : error LNK2019: unresolved external symbol _ERR_get_error referenced in function _load_private_key
rsa.lib(t-rsa.c.obj) : error LNK2019: unresolved external symbol _ERR_clear_error referenced in function _verify_it
....\3rd-party\libxml2-2.9.3\lib\libxml2.lib : warning LNK4272: library machine type 'x64' conflicts with target machine type 'X86'
....\3rd-party\curl-7.51.0\builds\libcurl-vc-x64-release-dll-ipv6-sspi-winssl\lib\libcurl.lib : warning LNK4272: library machine type 'x64' conflicts with target machine type 'X86'
....\3rd-party\pthread-win32\lib\x64\pthreadVC2.lib : warning LNK4272: library machine type 'x64' conflicts with target machine type 'X86'
....\site_tools\utils\rsa-signing....\3rd-party\openssl-1.1.0e-vs2015\lib64\libcryptoMT.lib : warning LNK4272: library machine type 'x64' conflicts with target machine type 'X86'
....\site_tools\utils\rsa-signing....\3rd-party\openssl-1.1.0e-vs2015\lib64\libsslMT.lib : warning LNK4272: library machine type 'x64' conflicts with target machine type 'X86'
....\output-bin\cbonline.co.uk\checkTransaction.exe : fatal error LNK1120: 60 unresolved externals
NMAKE : fatal error U1077: '"C:\Program Files\CMake\bin\cmake.exe"' : return code '0xffffffff'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe"' : return code '0x2'
Stop.
As soon as I changed back to the 3.9.4 build of Cmake, this code base compiled first time.
Sorry, I'm in a real bind with a deadline so I can't really give many more details than this - hopefully this points to something amiss with the RC.
This is a clean machine, used to work with an older version of CMake in about May 2017 - not sure what version, so I can't really point back to if this worked with any other RC's.
Building with this fails: https://cmake.org/files/v3.10/cmake-3.10.0-rc3-win64-x64.msi
Building with this works: https://cmake.org/files/v3.9/cmake-3.9.4-win64-x64.msi