Unable to link my own static libraries - c++

I am trying to add a sound library to a GLFW / OpenGL project in windows. I have set the sound project to output a static library (.lib). It compiles fine.
In my main project, I add a reference to Sound and a dependency on Sound (to change the build order). I include "..\Sound\sound.h" in my main.cpp and Intellisense is happy with everything. All compiles well. However, the linker is pissed:
1>Link:
1> LINK : ###\Projects\DeathRace\Debug\DeathRace.exe not found or not built by the last incremental link; performing full link
1>Sound.lib(sound.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in base_objects.obj
1>LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library
1>Sound.lib(sound.obj) : error LNK2019: unresolved external symbol __imp__alListenerfv referenced in function "public: bool __thiscall SoundAPI::Startup(void)" (?Startup#SoundAPI##QAE_NXZ)
1>Sound.lib(sound.obj) : error LNK2019: unresolved external symbol __imp__alListener3f referenced in function "public: bool __thiscall SoundAPI::Startup(void)" (?Startup#SoundAPI##QAE_NXZ)
1>Sound.lib(sound.obj) : error LNK2019: unresolved external symbol __imp__alGetError referenced in function "public: bool __thiscall SoundAPI::Startup(void)" (?Startup#SoundAPI##QAE_NXZ)
1>Sound.lib(sound.obj) : error LNK2019: unresolved external symbol __imp__alutGetError referenced in function "public: bool __thiscall SoundAPI::Startup(void)" (?Startup#SoundAPI##QAE_NXZ)
1>Sound.lib(sound.obj) : error LNK2019: unresolved external symbol __imp__alutInit referenced in function "public: bool __thiscall SoundAPI::Startup(void)" (?Startup#SoundAPI##QAE_NXZ)
1>Sound.lib(sound.obj) : error LNK2019: unresolved external symbol __imp__alutExit referenced in function "public: bool __thiscall SoundAPI::Shutdown(void)" (?Shutdown#SoundAPI##QAE_NXZ)
1>Sound.lib(sound.obj) : error LNK2019: unresolved external symbol __imp__alDeleteBuffers referenced in function "public: bool __thiscall SoundAPI::Shutdown(void)" (?Shutdown#SoundAPI##QAE_NXZ)
1>Sound.lib(sound.obj) : error LNK2019: unresolved external symbol __imp__alDeleteSources referenced in function "public: bool __thiscall SoundAPI::Shutdown(void)" (?Shutdown#SoundAPI##QAE_NXZ)
1>Sound.lib(sound.obj) : error LNK2019: unresolved external symbol __imp__alutCreateBufferFromFile referenced in function "public: unsigned int * __thiscall SoundAPI::LoadSound(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?LoadSound#SoundAPI##QAEPAIV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std###Z)
1>Sound.lib(sound.obj) : error LNK2019: unresolved external symbol __imp__alSourcei referenced in function "public: unsigned int * __thiscall SoundAPI::CreateSource(void)" (?CreateSource#SoundAPI##QAEPAIXZ)
1>Sound.lib(sound.obj) : error LNK2019: unresolved external symbol __imp__alSource3f referenced in function "public: unsigned int * __thiscall SoundAPI::CreateSource(void)" (?CreateSource#SoundAPI##QAEPAIXZ)
1>Sound.lib(sound.obj) : error LNK2019: unresolved external symbol __imp__alSourcef referenced in function "public: unsigned int * __thiscall SoundAPI::CreateSource(void)" (?CreateSource#SoundAPI##QAEPAIXZ)
1>Sound.lib(sound.obj) : error LNK2019: unresolved external symbol __imp__alGenSources referenced in function "public: unsigned int * __thiscall SoundAPI::CreateSource(void)" (?CreateSource#SoundAPI##QAEPAIXZ)
1>Sound.lib(sound.obj) : error LNK2019: unresolved external symbol __imp__alSourceQueueBuffers referenced in function "public: bool __thiscall SoundAPI::Queue(unsigned int *,unsigned int *)" (?Queue#SoundAPI##QAE_NPAI0#Z)
1>Sound.lib(sound.obj) : error LNK2019: unresolved external symbol __imp__alSourcePlay referenced in function "public: bool __thiscall SoundAPI::Play(unsigned int *)" (?Play#SoundAPI##QAE_NPAI#Z)
1>Sound.lib(sound.obj) : error LNK2019: unresolved external symbol __imp__alSourcePause referenced in function "public: bool __thiscall SoundAPI::Pause(unsigned int *)" (?Pause#SoundAPI##QAE_NPAI#Z)
1>Sound.lib(sound.obj) : error LNK2019: unresolved external symbol __imp__alSourceStop referenced in function "public: bool __thiscall SoundAPI::Stop(unsigned int *)" (?Stop#SoundAPI##QAE_NPAI#Z)
1>###\Projects\DeathRace\Debug\DeathRace.exe : fatal error LNK1120: 17 unresolved externals
I have NO IDEA what to make of this. Lnk2038 is supposed to mean a problem between debug and release, but everything is in debug mode. The lnk2019 should be fine against Sound.lib?
Much obliged!

Everything fine with your library (except you mixing debug and release runtime). You'll have to link a debug build when building a program in debug mode. Same is true for release builds. That's for error LNK2038 and warning LNK4098.
The other errors are caused by the simple fact that you can't link a static library with a static library (here: OpenAL), because that would get extra complicated if two static libraries would refer to the same static code (essentially leading to multiple definitions).
What you have to do for these errors to be solved is simple: Link your resulting executable file to your own Sound.lib as well as the right OpenAL library file and everything should be fine.

Related

I get error LNK2019 when I try to compile zeromq sources

I'm trying to compile the zeromq sources and I have the following error:
I'm using Visual studio 2013 update 4 / windows 7 x64
First of all I compile the libsodium library satisfactorily.
Then I link the libsodium header files directory path to additional dependencies and libsodium.lib to additional library directories. I also specify the name of library in additional dependencies.
I try to compile it under win32 architecture and x64 architecture but I get the same errors.
I know that a __imp prefix is used as a bridge to the function that I want to use so if I linked the libraries appropiately why do I get this error?
Console log:
1>Creating library E:\zmq\libzmq\builds\msvc\vs2013\libzmq\..\..\..\..\bin\Win32\Debug\v120\dynamic\libzmq.lib and object E:\zmq\libzmq\builds\msvc\vs2013\libzmq\..\..\..\..\bin\Win32\Debug\v120\dynamic\libzmq.exp
1>ctx.obj : error LNK2019: unresolved external symbol __imp__randombytes_close referenced in function "public: __thiscall zmq::ctx_t::~ctx_t(void)" (??1ctx_t#zmq##QAE#XZ)
1>curve_client.obj : error LNK2019: unresolved external symbol __imp__sodium_init referenced in function "public: __thiscall zmq::curve_client_t::curve_client_t(struct zmq::options_t const &)" (??0curve_client_t#zmq##QAE#ABUoptions_t#1##Z)
1>curve_server.obj : error LNK2001: unresolved external symbol __imp__sodium_init
1>curve_client.obj : error LNK2019: unresolved external symbol __imp__crypto_box_keypair referenced in function "public: __thiscall zmq::curve_client_t::curve_client_t(struct zmq::options_t const &)" (??0curve_client_t#zmq##QAE#ABUoptions_t#1##Z)
1>curve_server.obj : error LNK2001: unresolved external symbol __imp__crypto_box_keypair
1>zmq_utils.obj : error LNK2001: unresolved external symbol __imp__crypto_box_keypair
1>curve_client.obj : error LNK2019: unresolved external symbol __imp__crypto_box_beforenm referenced in function "private: int __thiscall zmq::curve_client_t::process_welcome(unsigned char const *,unsigned int)" (?process_welcome#curve_client_t#zmq##AAEHPBEI#Z)
1>curve_server.obj : error LNK2001: unresolved external symbol __imp__crypto_box_beforenm
1>curve_client.obj : error LNK2019: unresolved external symbol __imp__crypto_box referenced in function "private: int __thiscall zmq::curve_client_t::produce_hello(class zmq::msg_t *)" (?produce_hello#curve_client_t#zmq##AAEHPAVmsg_t#2##Z)
1>curve_server.obj : error LNK2001: unresolved external symbol __imp__crypto_box
1>curve_client.obj : error LNK2019: unresolved external symbol __imp__crypto_box_open referenced in function "private: int __thiscall zmq::curve_client_t::process_welcome(unsigned char const *,unsigned int)" (?process_welcome#curve_client_t#zmq##AAEHPBEI#Z)
1>curve_server.obj : error LNK2001: unresolved external symbol __imp__crypto_box_open
1>curve_client.obj : error LNK2019: unresolved external symbol __imp__crypto_box_afternm referenced in function "public: virtual int __thiscall zmq::curve_client_t::encode(class zmq::msg_t *)" (?encode#curve_client_t#zmq##UAEHPAVmsg_t#2##Z)
1>curve_server.obj : error LNK2001: unresolved external symbol __imp__crypto_box_afternm
1>curve_client.obj : error LNK2019: unresolved external symbol __imp__crypto_box_open_afternm referenced in function "public: virtual int __thiscall zmq::curve_client_t::decode(class zmq::msg_t *)" (?decode#curve_client_t#zmq##UAEHPAVmsg_t#2##Z)
1>curve_server.obj : error LNK2001: unresolved external symbol __imp__crypto_box_open_afternm
1>curve_client.obj : error LNK2019: unresolved external symbol __imp__randombytes referenced in function "private: int __thiscall zmq::curve_client_t::produce_initiate(class zmq::msg_t *)" (?produce_initiate#curve_client_t#zmq##AAEHPAVmsg_t#2##Z)
1>curve_server.obj : error LNK2001: unresolved external symbol __imp__randombytes
1>curve_server.obj : error LNK2019: unresolved external symbol __imp__crypto_secretbox referenced in function "private: int __thiscall zmq::curve_server_t::produce_welcome(class zmq::msg_t *)" (?produce_welcome#curve_server_t#zmq##AAEHPAVmsg_t#2##Z)
1>curve_server.obj : error LNK2019: unresolved external symbol __imp__crypto_secretbox_open referenced in function "private: int __thiscall zmq::curve_server_t::process_initiate(class zmq::msg_t *)" (?process_initiate#curve_server_t#zmq##AAEHPAVmsg_t#2##Z)
Thanks in advance.
You're probably compiling libsodium in a static way.
Try to compile it dinamically and link it again.
Such errors are also able to occur when you have a wrong set calling convention at your project.

OpenSSL Unresolved External Symbol LNK2019 When Compiling Synergy in VS2013

First, let me start by saying I've read EVERY post, link, answer, etc I can find that points to Linking/External Symbol errors in Visual Studio/C++. With that said, here are the 27 errors I'm getting:
1>SecureSocket.obj : error LNK2019: unresolved external symbol CRYPTO_free referenced in function "private: void __cdecl SecureSocket::showCertificate(void)" (?showCertificate#SecureSocket##AEAAXXZ)
1>SecureSocket.obj : error LNK2019: unresolved external symbol OPENSSL_add_all_algorithms_noconf referenced in function "private: void __cdecl SecureSocket::initContext(bool)" (?initContext#SecureSocket##AEAAX_N#Z)
1>SecureSocket.obj : error LNK2019: unresolved external symbol X509_free referenced in function "private: void __cdecl SecureSocket::showCertificate(void)" (?showCertificate#SecureSocket##AEAAXXZ)
1>SecureSocket.obj : error LNK2019: unresolved external symbol X509_NAME_oneline referenced in function "private: void __cdecl SecureSocket::showCertificate(void)" (?showCertificate#SecureSocket##AEAAXXZ)
1>SecureSocket.obj : error LNK2019: unresolved external symbol X509_get_subject_name referenced in function "private: void __cdecl SecureSocket::showCertificate(void)" (?showCertificate#SecureSocket##AEAAXXZ)
1>SecureSocket.obj : error LNK2019: unresolved external symbol SSL_CTX_new referenced in function "private: void __cdecl SecureSocket::initContext(bool)" (?initContext#SecureSocket##AEAAX_N#Z)
1>SecureSocket.obj : error LNK2019: unresolved external symbol SSL_CTX_free referenced in function "public: virtual __cdecl SecureSocket::~SecureSocket(void)" (??1SecureSocket##UEAA#XZ)
1>SecureSocket.obj : error LNK2019: unresolved external symbol SSL_set_fd referenced in function "private: bool __cdecl SecureSocket::secureAccept(int)" (?secureAccept#SecureSocket##AEAA_NH#Z)
1>SecureSocket.obj : error LNK2019: unresolved external symbol SSL_CTX_use_PrivateKey_file referenced in function "public: void __cdecl SecureSocket::loadCertificates(char const *)" (?loadCertificates#SecureSocket##QEAAXPEBD#Z)
1>SecureSocket.obj : error LNK2019: unresolved external symbol SSL_CTX_use_certificate_file referenced in function "public: void __cdecl SecureSocket::loadCertificates(char const *)" (?loadCertificates#SecureSocket##QEAAXPEBD#Z)
1>SecureSocket.obj : error LNK2019: unresolved external symbol SSL_load_error_strings referenced in function "private: void __cdecl SecureSocket::initContext(bool)" (?initContext#SecureSocket##AEAAX_N#Z)
1>SecureSocket.obj : error LNK2019: unresolved external symbol SSL_get_peer_certificate referenced in function "private: void __cdecl SecureSocket::showCertificate(void)" (?showCertificate#SecureSocket##AEAAXXZ)
1>SecureSocket.obj : error LNK2019: unresolved external symbol SSL_CTX_check_private_key referenced in function "public: void __cdecl SecureSocket::loadCertificates(char const *)" (?loadCertificates#SecureSocket##QEAAXPEBD#Z)
1>SecureSocket.obj : error LNK2019: unresolved external symbol SSL_new referenced in function "private: void __cdecl SecureSocket::createSSL(void)" (?createSSL#SecureSocket##AEAAXXZ)
1>SecureSocket.obj : error LNK2019: unresolved external symbol SSL_free referenced in function "public: virtual __cdecl SecureSocket::~SecureSocket(void)" (??1SecureSocket##UEAA#XZ)
1>SecureSocket.obj : error LNK2019: unresolved external symbol SSL_accept referenced in function "private: bool __cdecl SecureSocket::secureAccept(int)" (?secureAccept#SecureSocket##AEAA_NH#Z)
1>SecureSocket.obj : error LNK2019: unresolved external symbol SSL_connect referenced in function "private: bool __cdecl SecureSocket::secureConnect(int)" (?secureConnect#SecureSocket##AEAA_NH#Z)
1>SecureSocket.obj : error LNK2019: unresolved external symbol SSL_read referenced in function "public: virtual unsigned int __cdecl SecureSocket::secureRead(void *,unsigned int)" (?secureRead#SecureSocket##UEAAIPEAXI#Z)
1>SecureSocket.obj : error LNK2019: unresolved external symbol SSL_write referenced in function "public: virtual unsigned int __cdecl SecureSocket::secureWrite(void const *,unsigned int)" (?secureWrite#SecureSocket##UEAAIPEBXI#Z)
1>SecureSocket.obj : error LNK2019: unresolved external symbol SSL_get_error referenced in function "private: void __cdecl SecureSocket::checkResult(int,bool &,bool &)" (?checkResult#SecureSocket##AEAAXHAEA_N0#Z)
1>SecureSocket.obj : error LNK2019: unresolved external symbol SSLv23_server_method referenced in function "private: void __cdecl SecureSocket::initContext(bool)" (?initContext#SecureSocket##AEAAX_N#Z)
1>SecureSocket.obj : error LNK2019: unresolved external symbol SSLv23_client_method referenced in function "private: void __cdecl SecureSocket::initContext(bool)" (?initContext#SecureSocket##AEAAX_N#Z)
1>SecureSocket.obj : error LNK2019: unresolved external symbol SSL_shutdown referenced in function "public: virtual __cdecl SecureSocket::~SecureSocket(void)" (??1SecureSocket##UEAA#XZ)
1>SecureSocket.obj : error LNK2019: unresolved external symbol SSL_library_init referenced in function "private: void __cdecl SecureSocket::initContext(bool)" (?initContext#SecureSocket##AEAAX_N#Z)
1>SecureSocket.obj : error LNK2019: unresolved external symbol ERR_get_error referenced in function "private: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl SecureSocket::getError(void)" (?getError#SecureSocket##AEAA?AV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##XZ)
1>SecureSocket.obj : error LNK2019: unresolved external symbol ERR_error_string_n referenced in function "private: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl SecureSocket::getError(void)" (?getError#SecureSocket##AEAA?AV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##XZ)
1>C:\Users\ME\Downloads\synergy-master\synergy-master\lib\MinSizeRel\ns.dll : fatal error LNK1120: 26 unresolved externals
Some background: I've downloaded Synergy from their GitHub and built it without error. Getting it to build took a small amount of hacking because they don't officially support Visual Studio 2013, but not overly difficult. I also built is using the latest Qt instead of the one they provide on their site (2010) I'm also using OpenSSL from SLProWeb, 32-bit full version.
Anyway, I cleared up a minor error or two in their code and tried to compile it first from command line, and second with VS GUI. Both spit out the 27 errors shown above. As I said, I've searched high and low trying to figure out what I've done wrong, but ultimately found nothing. I copied ssleay32.lib and libeay32.lib, with their .dlls, into the /ext/openssl/out32dll folder, where Synergy looks, which didn't work, so I pointed the linker additional libraries directory to it manually and also added it to the additional includes, and added the two .libs to Input>Additional Dependencies. Still no good.
In a last ditch effort, I added this to the top:
#pragma comment(lib, "libeay32.lib")
#pragma comment(lib, "ssleay32.lib")
#pragma comment(lib, "libeay32MD.lib")
#pragma comment(lib, "libeay32MDd.lib")
#pragma comment(lib, "libeay32MT.lib")
#pragma comment(lib, "libeay32MTd.lib")
#pragma comment(lib, "ssleay32MD.lib")
#pragma comment(lib, "ssleay32MDd.lib")
#pragma comment(lib, "ssleay32MT.lib")
#pragma comment(lib, "ssleay32MTd.lib")
while also copying the rest of the libs into the out32dll folder. This proved that it know the files existed, but still refused to resolve the External Symbol issue.
To me, it looks like it isn't properly loading libeay32.lib, which contains the crypto portion of OpenSSL that the compiler complains about....

Unable to build OSG Earth with Visual Studio 2013 due to ODBC link error in GDAL

I am trying to build OSGEarth using CMAKE and Visual studio 2013
I first downloaded Open Scene Graph 3.2 and the prebuild dependencies (small package) from this page. I generated the visual studio 2013 project and build/installed Open Scene Graph without much problem
After that, I downloaded the source of osgearth 2.5 and generated the Visual Studio 2013 project, using the same dependencies as for Open Scene Graph (I don't want to use the optional dependencies for the first build) and when I try to build the osgEarth project, I got the following error at the linking step :
2>gdal.lib(cpl_odbc.obj) : error LNK2019: unresolved external symbol _SQLAllocConnect#8 referenced in function "public: int __thiscall CPLODBCSession::EstablishSession(char const *,char const *,char const *)" (?EstablishSession#CPLODBCSession##QAEHPBD00#Z)
2>gdal.lib(cpl_odbc.obj) : error LNK2019: unresolved external symbol _SQLAllocEnv#4 referenced in function "public: int __thiscall CPLODBCSession::EstablishSession(char const *,char const *,char const *)" (?EstablishSession#CPLODBCSession##QAEHPBD00#Z)
2>gdal.lib(cpl_odbc.obj) : error LNK2019: unresolved external symbol _SQLAllocStmt#8 referenced in function "public: __thiscall CPLODBCStatement::CPLODBCStatement(class CPLODBCSession *)" (??0CPLODBCStatement##QAE#PAVCPLODBCSession###Z)
2>gdal.lib(cpl_odbc.obj) : error LNK2019: unresolved external symbol _SQLColAttribute#28 referenced in function "public: int __thiscall CPLODBCStatement::CollectResultsInfo(void)" (?CollectResultsInfo#CPLODBCStatement##QAEHXZ)
2>gdal.lib(cpl_odbc.obj) : error LNK2019: unresolved external symbol _SQLColumns#36 referenced in function "public: int __thiscall CPLODBCStatement::GetColumns(char const *,char const *,char const *)" (?GetColumns#CPLODBCStatement##QAEHPBD00#Z)
2>gdal.lib(cpl_odbc.obj) : error LNK2019: unresolved external symbol _SQLConnect#28 referenced in function "public: int __thiscall CPLODBCSession::EstablishSession(char const *,char const *,char const *)" (?EstablishSession#CPLODBCSession##QAEHPBD00#Z)
2>gdal.lib(cpl_odbc.obj) : error LNK2019: unresolved external symbol _SQLDescribeCol#36 referenced in function "public: int __thiscall CPLODBCStatement::CollectResultsInfo(void)" (?CollectResultsInfo#CPLODBCStatement##QAEHXZ)
2>gdal.lib(cpl_odbc.obj) : error LNK2019: unresolved external symbol _SQLDisconnect#4 referenced in function "public: int __thiscall CPLODBCSession::CloseSession(void)" (?CloseSession#CPLODBCSession##QAEHXZ)
2>gdal.lib(cpl_odbc.obj) : error LNK2019: unresolved external symbol _SQLEndTran#12 referenced in function "public: int __thiscall CPLODBCSession::CommitTransaction(void)" (?CommitTransaction#CPLODBCSession##QAEHXZ)
2>gdal.lib(cpl_odbc.obj) : error LNK2019: unresolved external symbol _SQLError#32 referenced in function "public: int __thiscall CPLODBCSession::Failed(int,void *)" (?Failed#CPLODBCSession##QAEHHPAX#Z)
2>gdal.lib(cpl_odbc.obj) : error LNK2019: unresolved external symbol _SQLExecDirect#12 referenced in function "public: int __thiscall CPLODBCStatement::ExecuteSQL(char const *)" (?ExecuteSQL#CPLODBCStatement##QAEHPBD#Z)
2>gdal.lib(cpl_odbc.obj) : error LNK2019: unresolved external symbol _SQLFetch#4 referenced in function "public: int __thiscall CPLODBCStatement::Fetch(int,int)" (?Fetch#CPLODBCStatement##QAEHHH#Z)
2>gdal.lib(cpl_odbc.obj) : error LNK2019: unresolved external symbol _SQLFetchScroll#12 referenced in function "public: int __thiscall CPLODBCStatement::Fetch(int,int)" (?Fetch#CPLODBCStatement##QAEHHH#Z)
2>gdal.lib(cpl_odbc.obj) : error LNK2019: unresolved external symbol _SQLFreeConnect#4 referenced in function "public: int __thiscall CPLODBCSession::CloseSession(void)" (?CloseSession#CPLODBCSession##QAEHXZ)
2>gdal.lib(cpl_odbc.obj) : error LNK2019: unresolved external symbol _SQLFreeEnv#4 referenced in function "public: int __thiscall CPLODBCSession::CloseSession(void)" (?CloseSession#CPLODBCSession##QAEHXZ)
2>gdal.lib(cpl_odbc.obj) : error LNK2019: unresolved external symbol _SQLFreeStmt#8 referenced in function "public: __thiscall CPLODBCStatement::~CPLODBCStatement(void)" (??1CPLODBCStatement##QAE#XZ)
2>gdal.lib(cpl_odbc.obj) : error LNK2019: unresolved external symbol _SQLGetConnectAttr#20 referenced in function "public: int __thiscall CPLODBCSession::ClearTransaction(void)" (?ClearTransaction#CPLODBCSession##QAEHXZ)
2>gdal.lib(cpl_odbc.obj) : error LNK2019: unresolved external symbol _SQLGetData#24 referenced in function "public: int __thiscall CPLODBCStatement::Fetch(int,int)" (?Fetch#CPLODBCStatement##QAEHHH#Z)
2>gdal.lib(cpl_odbc.obj) : error LNK2019: unresolved external symbol _SQLNumResultCols#8 referenced in function "public: int __thiscall CPLODBCStatement::CollectResultsInfo(void)" (?CollectResultsInfo#CPLODBCStatement##QAEHXZ)
2>gdal.lib(cpl_odbc.obj) : error LNK2019: unresolved external symbol _SQLSetConnectAttr#16 referenced in function "public: int __thiscall CPLODBCSession::ClearTransaction(void)" (?ClearTransaction#CPLODBCSession##QAEHXZ)
2>gdal.lib(cpl_odbc.obj) : error LNK2019: unresolved external symbol _SQLSetConnectOption#12 referenced in function "public: int __thiscall CPLODBCSession::EstablishSession(char const *,char const *,char const *)" (?EstablishSession#CPLODBCSession##QAEHPBD00#Z)
2>gdal.lib(cpl_odbc.obj) : error LNK2019: unresolved external symbol _SQLTables#36 referenced in function "public: int __thiscall CPLODBCStatement::GetTables(char const *,char const *)" (?GetTables#CPLODBCStatement##QAEHPBD0#Z)
2>gdal.lib(cpl_odbc.obj) : error LNK2019: unresolved external symbol _SQLDriverConnect#32 referenced in function "public: int __thiscall CPLODBCSession::EstablishSession(char const *,char const *,char const *)" (?EstablishSession#CPLODBCSession##QAEHPBD00#Z)
2>gdal.lib(cpl_odbc.obj) : error LNK2019: unresolved external symbol _SQLPrimaryKeys#28 referenced in function "public: int __thiscall CPLODBCStatement::GetPrimaryKeys(char const *,char const *,char const *)" (?GetPrimaryKeys#CPLODBCStatement##QAEHPBD00#Z)
2>gdal.lib(cpl_odbc.obj) : error LNK2019: unresolved external symbol _SQLRemoveDriver#12 referenced in function "public: int __thiscall CPLODBCDriverInstaller::RemoveDriver(char const *,int)" (?RemoveDriver#CPLODBCDriverInstaller##QAEHPBDH#Z)
2>gdal.lib(cpl_odbc.obj) : error LNK2019: unresolved external symbol _SQLInstallerError#20 referenced in function "public: int __thiscall CPLODBCDriverInstaller::InstallDriver(char const *,char const *,unsigned short)" (?InstallDriver#CPLODBCDriverInstaller##QAEHPBD0G#Z)
2>gdal.lib(cpl_odbc.obj) : error LNK2019: unresolved external symbol _SQLInstallDriverEx#28 referenced in function "public: int __thiscall CPLODBCDriverInstaller::InstallDriver(char const *,char const *,unsigned short)" (?InstallDriver#CPLODBCDriverInstaller##QAEHPBD0G#Z)
The only think I was able to find is that all the missing method seems to be deprecated ODBC method, like this one
For additional information, the project got a reference to odbc32.lib in its inherited values.
Okay, stupid question... the odbc's dependencies were in the inherited values... but the checkbox indicated to the build process to use these dependencies was not checked. Once it was done, everything is good... I think I need either a coffee or a very big smack on the head...

Problems with linking CEF3

I'm having some problems with using CEF in my application which uses the MD/MDd runtime library linking.
I have downloaded the latest build of CEF3 from cefbuilds.com and followed the instructions How to link CEF against a different run-time library.
I have built the "libcef_dll_wrapper" project after changing "Runtime Library" to "/MDd" and "Platform Toolset" to "v110" and then I've linked the resulting "libcef_dll_wrapper.lib" binary to my project.
However, when I try to build my project I get the following errors:
12>html.lib(html_producer.obj) : error LNK2019: unresolved external symbol _cef_string_utf16_clear referenced in function "public: static void __cdecl CefBrowserSettingsTraits::clear(struct _cef_browser_settings_t *)" (?clear#CefBrowserSettingsTraits##SAXPAU_cef_browser_settings_t###Z)
12>html.lib(html_producer.obj) : error LNK2019: unresolved external symbol _cef_string_utf8_to_utf16 referenced in function "public: static bool __cdecl CefStringTraitsUTF16::from_string(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,struct _cef_string_utf16_t *)" (?from_string#CefStringTraitsUTF16##SA_NABV?$basic_string#DU?$char_traits#D#std##V?$allocator#D#2##std##PAU_cef_string_utf16_t###Z)
12>html.lib(html_producer.obj) : error LNK2019: unresolved external symbol _cef_string_list_free referenced in function "public: static void __cdecl CefSettingsTraits::clear(struct _cef_settings_t *)" (?clear#CefSettingsTraits##SAXPAU_cef_settings_t###Z)
12>html.lib(html_producer.obj) : error LNK2019: unresolved external symbol "public: static bool __cdecl CefBrowser::CreateBrowser(class CefWindowInfo &,class CefRefPtr<class CefClient>,class CefStringBase<struct CefStringTraitsUTF16> const &,class CefStructBase<struct CefBrowserSettingsTraits> const &)" (?CreateBrowser#CefBrowser##SA_NAAVCefWindowInfo##V?$CefRefPtr#VCefClient####ABV?$CefStringBase#UCefStringTraitsUTF16####ABV?$CefStructBase#UCefBrowserSettingsTraits#####Z) referenced in function "public: void __thiscall caspar::html::html_producer::run(void)" (?run#html_producer#html#caspar##QAEXXZ)
12>html.lib(html_producer.obj) : error LNK2019: unresolved external symbol "bool __cdecl CefInitialize(class CefStructBase<struct CefSettingsTraits> const &,class CefRefPtr<class CefApp>)" (?CefInitialize##YA_NABV?$CefStructBase#UCefSettingsTraits####V?$CefRefPtr#VCefApp#####Z) referenced in function "public: void __thiscall caspar::html::html_producer::run(void)" (?run#html_producer#html#caspar##QAEXXZ)
12>libcef_dll_wrapper.lib(libcef_dll_wrapper.obj) : error LNK2019: unresolved external symbol __imp__cef_execute_process referenced in function "int __cdecl CefExecuteProcess(class CefMainArgs const &,class CefRefPtr<class CefApp>)" (?CefExecuteProcess##YAHABVCefMainArgs##V?$CefRefPtr#VCefApp#####Z)
12>libcef_dll_wrapper.lib(libcef_dll_wrapper.obj) : error LNK2019: unresolved external symbol __imp__cef_initialize referenced in function "bool __cdecl CefInitialize(class CefMainArgs const &,class CefStructBase<struct CefSettingsTraits> const &,class CefRefPtr<class CefApp>)" (?CefInitialize##YA_NABVCefMainArgs##ABV?$CefStructBase#UCefSettingsTraits####V?$CefRefPtr#VCefApp#####Z)
12>libcef_dll_wrapper.lib(libcef_dll_wrapper.obj) : error LNK2019: unresolved external symbol __imp__cef_shutdown referenced in function "void __cdecl CefShutdown(void)" (?CefShutdown##YAXXZ)
12>libcef_dll_wrapper.lib(libcef_dll_wrapper.obj) : error LNK2019: unresolved external symbol __imp__cef_do_message_loop_work referenced in function "void __cdecl CefDoMessageLoopWork(void)" (?CefDoMessageLoopWork##YAXXZ)
12>libcef_dll_wrapper.lib(libcef_dll_wrapper.obj) : error LNK2019: unresolved external symbol __imp__cef_run_message_loop referenced in function "void __cdecl CefRunMessageLoop(void)" (?CefRunMessageLoop##YAXXZ)
The full log can be found here.
Any ideas as to what I might be missing?
Are you also libcef.lib in the linker input?

error LNK2019 unresolved external symbol

I am quite new to C++ so I downloaded a sample C++ program. The sample program seems to hit the following error when it is compiling :-
Error 22 error LNK2019: unresolved external symbol _acsEnumServerNames#12 referenced in function "protected: virtual int __thiscall COpenTsrv::OnInitDialog(void)" (?OnInitDialog#COpenTsrv##MAEHXZ) Opentsrv.obj
I traced it to the referred function but I do not know anything wrong with it ?
BOOL COpenTsrv::OnInitDialog()
{
CDialog::OnInitDialog();
CenterWindow();
acsEnumServerNames(ST_CSTA, AddToList, (unsigned long) (CComboBox*)&m_TserverListControl);
UpdateData(FALSE);
The following is the build log. Apparently there are still other errors but would like to start with the first one.
1>Generating Code...
1>Compiling resources...
1>Compiling manifest to resources...
1>Linking...
1>Opentsrv.obj : error LNK2019: unresolved external symbol _acsEnumServerNames#12 referenced in function "protected: virtual int __thiscall COpenTsrv::OnInitDialog(void)" (? OnInitDialog#COpenTsrv##MAEHXZ)
1>Opentsrv.obj : error LNK2019: unresolved external symbol _acsQueryAuthInfo#8 referenced in function "protected: void __thiscall COpenTsrv::OnSelchangeTserverlist(void)" (?OnSelchangeTserverlist#COpenTsrv##IAEXXZ)
1>Opentsrv.obj : error LNK2019: unresolved external symbol _acsAbortStream#8 referenced in function "protected: virtual void __thiscall COpenTsrv::OnOK(void)" (?OnOK#COpenTsrv##MAEXXZ)
1>Tsapi.obj : error LNK2001: unresolved external symbol _acsAbortStream#8
1>Opentsrv.obj : error LNK2019: unresolved external symbol _acsEventNotify#16 referenced in function "protected: virtual void __thiscall COpenTsrv::OnOK(void)" (?OnOK#COpenTsrv##MAEXXZ)
1>Opentsrv.obj : error LNK2019: unresolved external symbol _acsOpenStream#60 referenced in function "protected: virtual void __thiscall COpenTsrv::OnOK(void)" (?OnOK#COpenTsrv##MAEXXZ)
1>Opentsrv.obj : error LNK2019: unresolved external symbol _cstaMonitorDevice#20 referenced in function "protected: long __thiscall COpenTsrv::OnTsapiAcsConfirmation(unsigned int,long)" (?OnTsapiAcsConfirmation#COpenTsrv##IAEJIJ#Z)
1>Sampldlg.obj : error LNK2019: unresolved external symbol _cstaMakeCall#20 referenced in function "protected: void __thiscall CSampleDlg::OnCall(void)" (?OnCall#CSampleDlg##IAEXXZ)
1>Sampldlg.obj : error LNK2019: unresolved external symbol _cstaClearConnection#16 referenced in function "protected: void __thiscall CSampleDlg::OnHangup(void)" (?OnHangup#CSampleDlg##IAEXXZ)
1>Sampldlg.obj : error LNK2019: unresolved external symbol _cstaAnswerCall#16 referenced in function "protected: void __thiscall CSampleDlg::OnAnswer(void)" (?OnAnswer#CSampleDlg##IAEXXZ)
1>Tsapi.obj : error LNK2019: unresolved external symbol _acsGetEventPoll#20 referenced in function "protected: long __thiscall CTsapiWnd::OnTsapiMsg(unsigned int,long)" (?OnTsapiMsg#CTsapiWnd##IAEJIJ#Z)
1>C:\Users\steventang\Documents\Visual Studio 2005\Projects\TSAPINEW\Debug\TSAPINEW.exe : fatal error LNK1120: 10 unresolved externals
1>Build log was saved at "file://c:\Users\steventang\Documents\Visual Studio 2005\Projects\TSAPINEW\TSAPINEW\Debug\BuildLog.htm"
1>TSAPINEW - 12 error(s), 21 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
Any help to point me to the right direction would very much be appreciated.
Thanks
Seems like your compilation was sucessfull. Only the linking did not work.
Probably the linker is complaining because you defined the header of the method "acsEnumServerNames" but you did not provide an implementation of the method.
Maybe you used a header-file but you did not provide the library to which the header belongs ?
Find out to which pakage "acsEnumServerNames" belongs and check if you have the implementation of the method in some .c/.cpp file, or if the implementation should be provided by some library on which you do rely.