1

I am making some changes in Apache ActiveMQ CMS library (a potential bug fix). I have fixed the bug and tested it in Debug mode. Now I want to make it's release dll to be added in my project. When I try to build using Release-DLL configuration, Following error comes up:

DiscoveryTransport.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall activemq::util::Suspendable::~Suspendable(void)" (??1Suspendable@util@activemq@@UAE@XZ)

.lib and .exp files are being created successfully. Please note following findings:

  • It compiles fine in Debug (static lib) and Release (static lib) configurations

Please consider following configurations:

  • Platform Toolset : visual studio 2008 (v90) [Required for my build]

  • Configuration Type: Dynamic Library (.dll)

  • Whole Program optimization: Use Link Time Code Generation *tried No Whole Program Optimization with no luck

  • Character Set: Not Set *as per in Debug and Release Configuration

  • C/C++ >> General >> Debug Information Format: Program Database (/Zi)

  • C/C++ >> Optimization: Maximize Speed (/O2)

  • C/C++ >> Code Generation >> Run-time Library: Multi-threaded DLL (/MD) *Tried with (/MDd) but no luck

  • C/C++ >> Precompiled Headers: Not using precompiled headers

  • C/C++ >> Advanced >> Calling Convention: __cdecl (/Gd)

  • Linker >> Input: Added libapr-1.lib as it has dependency upon Apache Runtime

  • Linker >> Debugging >> Generate Debug Info: Yes (/DEBUG)

  • Linker >> System >> SubSystem: Windows (/SUBSYSTEM:WINDOWS)

  • Linker >> Advanced >> Target Machine: MachineX86 (/MACHINE:X86)

  • Linker >> Advanced >> Error Reporting: PromptImmediately (/ERRORREPORT:PROMPT)

  • Paths to include and lib are correct as being used in Debug and Release Configurations

  • I am using Visual Studio 2010 Express Edition

The code I changed has nothing to do with DiscoveryTransport class. I have been trying it since two days. Any help/suggestion would be highly appreciated.

Regards

Awais
  • 319
  • 3
  • 13
  • You have probably forgot to add a library to the release build settings – Richard Critten Sep 15 '16 at 08:48
  • 1
    Library include and lib paths are added and I have counter checked them. Library name added in Linker -> Input ->Additional Libraries for Release-DLL build. I have mentioned it in question as well. – Awais Sep 15 '16 at 08:52
  • Did you clean the solution before building? Probably not it, but worth a try. – Banex Sep 15 '16 at 09:08
  • Yes I did clean - rebuild the project although. Did a clean again followed by rebuild after your comment, yielding same error. – Awais Sep 15 '16 at 09:19
  • As a temporary workaround, you can make a copy of the debug configuration and switch optimizations on, to see if it works. – Banex Sep 15 '16 at 09:41
  • Just now I found something amazing. [ActiveMQ CMS Download Page](http://activemq.apache.org/cms/activemq-cpp-393-release.html) lists Source distribution and git clone url. I cloned git url. This git clone include src/main/activemq/transport/DiscoveryTransport/ but sources given on same page doesn't include discovery transport in src/main/activemq/tranposrt/. Both are same version i.e. 3.9.3. I am getting error exactly in DiscoveryTransport.obj where ~Suspendable(void){} is accessed. Going to raise issue in community. – Awais Sep 15 '16 at 10:07

0 Answers0