Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linker error when building DLL on Windows 11 #349

Open
Harters opened this issue Jun 11, 2024 · 1 comment
Open

Linker error when building DLL on Windows 11 #349

Harters opened this issue Jun 11, 2024 · 1 comment

Comments

@Harters
Copy link

Harters commented Jun 11, 2024

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

@guntern
Copy link

guntern commented Nov 15, 2024

I run into a similar issue, when trying to compile a program using the SimpleAmqpClient library. Do you get the error when compiling the library or your actual application?
Have you maybe solved the issue? I guess you already took a look at #112 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants