Skip to content

Linker error when building DLL on Windows 11 #349

Description

@Harters

Hi,

I'm trying to build SimpleAmqpClient on a Windows 11 box using MS Visual Studio Community 2022. The invocation I'm using is this:

cmake -G "Visual Studio 17 2022" -A x64 -DBoost_INCLUDE_DIR="C:/boost/1.77.0/lib/native/include" -DBOOST_ROOT="C:/boost/1.77.0" -DBOOST_LIBRARYDIR="C:/boost/1.77.0/lib/native" -DRabbitmqc_INCLUDE_DIR="C:/rabbitmq-c/include" -DRabbitmqc_LIBRARY="C:/rabbitmq-c/lib/rabbitmq.4.lib" -DBoost_ADDITIONAL_VERSIONS="1.77 1.77.0" -DBoost_USE_STATIC_LIBS=ON -DBUILD_STATIC_LIBS=ON -DENABLE_SSL_SUPPORT=OFF ..

and to make, this:

cmake --build . --config Release

Compilation seems to occur but I get this link error. Any ideas please?


Generating Code...
Creating library C:/SimpleAmqpClient/build/Release/SimpleAmqpClient.7.lib and object C:/SimpleAmqpClient/build/Release/SimpleAmqpClient.7.exp
TableImpl.obj : error LNK2019: unresolved external symbol amqp_empty_table referenced in function "public: static struct amqp_table_t_ cdecl AmqpClient::Detail::TableValueImpl::CopyTable(struct amqp_table_t
_ const &,class boost::shared_ptr &)" (?CopyTable@TableValueImpl@Detail@AmqpClient@@sa?AUamqp_table_t
@@AEBU4@AEAV?$shared_ptr@Uamqp_pool_t
@@@boost@@@z) [C:\SimpleAmqpClient\build\Simple
AmqpClient.vcxproj]
C:\SimpleAmqpClient\build\Release\SimpleAmqpClient.7.dll : fatal error LNK1120: 1 unresolved externals [C:\SimpleAmqpClient\build\SimpleAmqpClient.vcxproj]

If I use the sln file I get:
Error LNK2001 unresolved external symbol amqp_empty_table SimpleAmqpClient C:\SimpleAmqpClient\build\TableImpl.obj 1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions