1

I do know how linking works. I added the path to the lib, but still have linking issues. My guess is that the lib doesn't have the relevant implementation. I would like to confirm that.

Did anyone try C++ library for communicating with a RabbitMQ message broker from nuget?

I tried the x64 2.6.1.4 and even 2.6.1.3 versions on Windows 10 using Visual Studio 2015 but I get link errors:

1>amqp-cpp.lib(tcpconnection.obj) : error LNK2001: unresolved external symbol "int __cdecl AMQP::tcp::Errno(void)" (?Errno@tcp@AMQP@@YAHXZ)
1>amqp-cpp.lib(tcpconnection.obj) : error LNK2001: unresolved external symbol "char const * __cdecl AMQP::tcp::StrError(int)" (?StrError@tcp@AMQP@@YAQEBDH@Z)
1>amqp-cpp.lib(tcpconnection.obj) : error LNK2001: unresolved external symbol "int __cdecl AMQP::tcp::Close(unsigned __int64)" (?Close@tcp@AMQP@@YAH_K@Z)

Did anyone encounter with this issue?

UPDATE1

I've uploaded the project with the package to here. I've also uploaded the dump of the lib and I can see that indeed those symbols are missing (there is UNDEF near those symbols) from the lib

1B4 00000000 UNDEF  notype ()    External     | ?Errno@tcp@AMQP@@YAHXZ (int __cdecl AMQP::tcp::Errno(void))
1B5 00000000 UNDEF  notype ()    External     | ?StrError@tcp@AMQP@@YAQEBDH@Z (char const * __cdecl AMQP::tcp::StrError(int))
1B6 00000000 UNDEF  notype ()    External     | ?Close@tcp@AMQP@@YAH_K@Z (int __cdecl AMQP::tcp::Close(unsigned __int64))
theateist
  • 13,879
  • 17
  • 69
  • 109
  • What attempts have you made to interpret the error, resolve the issue? The linker was expecting to find the aforementioned symbol referenced in the object file, whilst trying to link a binary. Where is that symbol defined, is that lib/dll referenced on the link line? – Mansoor Sep 11 '19 at 15:46
  • The nuget installes amqp-cpp.lib and I added the path to it to the project. – theateist Sep 11 '19 at 15:48
  • Sure, I understand that you used Nuget, however now that it has failed, you need to get into the package and understand what it was trying to find and where it looked and why it could not link it. – Mansoor Sep 11 '19 at 16:08
  • Possible duplicate of [What is an undefined reference/unresolved external symbol error and how do I fix it?](https://stackoverflow.com/questions/12573816/what-is-an-undefined-reference-unresolved-external-symbol-error-and-how-do-i-fix) – Öö Tiib Sep 11 '19 at 16:08
  • @ÖöTiib, I'm very well aware how linking works. The lib is a static lib. It seems that the lib doesn't have the required implementation. That's why I asked here to see if anyone has used this library! – theateist Sep 11 '19 at 16:14
  • @Mansoor, I did look and did not find anything. That's why I asked the question here. – theateist Sep 11 '19 at 16:18
  • Why it was voted for closing if my issue is not just a missing reference problem?? – theateist Sep 12 '19 at 06:38
  • @theateist I find that linker related issues on stack overflow are often ignored or poorly answered. I recommend you manually go through the command line, find where those symbols are defined and make sure that they appear on the link line. By default, they will not appear in the build log but you can turn up the build verbosity in the dev-studio settings and enable the verbose flag for the linker. – Mansoor Sep 12 '19 at 16:18

0 Answers0