Issues building mamacpp with Visual Studio


Guy <guy.tal@...>
 

Hi,
I have an issue building the mamacpp project using Visual Studio 2010 and 2012. The configuration is in Win32 Debug and Release.
In both cases I compile commonc, commoncpp, mamac and then mamacpp.

mamacpp always fails with errors pasted below.

Remark: Building with SCons seems to work fine, but I still have a need to work with the solution itself for some tasks.

In Visual Studio 2010 I get the following link errors:
1>Link:
1> Creating library D:\dev\lib\openmama\2.3.0new\OpenMAMA\Debug\mamacpp.lib and object D:\dev\lib\openmama\2.3.0new\OpenMAMA\Debug\mamacpp.exp
1>MamaSource.obj : error LNK2019: unresolved external symbol __imp__wtable_destroy referenced in function "public: virtual __thiscall Wombat::MamaSource::~MamaSource(void)" (??1MamaSource@Wombat@@UAE@XZ)
1>MamaSource.obj : error LNK2019: unresolved external symbol __imp__wtable_insert referenced in function "public: void __thiscall Wombat::MamaSource::addSubscription(char const *,class Wombat::MamaSubscription *)" (?addSubscription@MamaSource@Wombat@@QAEXPBDPAVMamaSubscription@2@@Z)
1>MamaTransportMap.obj : error LNK2001: unresolved external symbol __imp__wtable_insert
1>MamaSource.obj : error LNK2019: unresolved external symbol __imp__wtable_lookup referenced in function "public: void __thiscall Wombat::MamaSource::addSubscription(char const *,class Wombat::MamaSubscription *)" (?addSubscription@MamaSource@Wombat@@QAEXPBDPAVMamaSubscription@2@@Z)
1>MamaTransportMap.obj : error LNK2001: unresolved external symbol __imp__wtable_lookup
1>MamaSource.obj : error LNK2019: unresolved external symbol __imp__wtable_create referenced in function "public: void __thiscall Wombat::MamaSource::addSubscription(char const *,class Wombat::MamaSubscription *)" (?addSubscription@MamaSource@Wombat@@QAEXPBDPAVMamaSubscription@2@@Z)
1>MamaTransportMap.obj : error LNK2001: unresolved external symbol __imp__wtable_create
1>MamaSource.obj : error LNK2019: unresolved external symbol __imp__wtable_remove referenced in function "public: class Wombat::MamaSubscription * __thiscall Wombat::MamaSource::removeSubscription(char const *)" (?removeSubscription@MamaSource@Wombat@@QAEPAVMamaSubscription@2@PBD@Z)
1>MamaSource.obj : error LNK2019: unresolved external symbol __imp__wtable_for_each referenced in function "public: void __thiscall Wombat::MamaSource::activateSubscriptions(void)" (?activateSubscriptions@MamaSource@Wombat@@QAEXXZ)
1>D:\dev\lib\openmama\2.3.0new\OpenMAMA\Debug\libmamacppmdd.dll : fatal error LNK1120: 6 unresolved externals
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:38.26
========== Build: 0 succeeded, 1 failed, 2 up-to-date, 0 skipped ==========

Similar errors are coming from Visual Studio 2012
3>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppBuild.targets(1137,5): warning MSB8012: TargetPath(D:\dev\lib\openmama\2.3.0new\OpenMAMA\Release\mamacpp.dll) does not match the Linker's OutputFile property value (D:\dev\lib\openmama\2.3.0new\OpenMAMA\Release\libmamacppmd.dll). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
3>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppBuild.targets(1139,5): warning MSB8012: TargetName(mamacpp) does not match the Linker's OutputFile property value (libmamacppmd). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
3> Creating library D:\dev\lib\openmama\2.3.0new\OpenMAMA\Release\mamacpp.lib and object D:\dev\lib\openmama\2.3.0new\OpenMAMA\Release\mamacpp.exp
3>MamaSource.obj : error LNK2019: unresolved external symbol __imp__wtable_create referenced in function "public: void __thiscall Wombat::MamaSource::addSubscription(char const *,class Wombat::MamaSubscription *)" (?addSubscription@MamaSource@Wombat@@QAEXPBDPAVMamaSubscription@2@@Z)
3>MamaTransportMap.obj : error LNK2001: unresolved external symbol __imp__wtable_create
3>MamaSource.obj : error LNK2019: unresolved external symbol __imp__wtable_destroy referenced in function "public: virtual __thiscall Wombat::MamaSource::~MamaSource(void)" (??1MamaSource@Wombat@@UAE@XZ)
3>MamaSource.obj : error LNK2019: unresolved external symbol __imp__wtable_insert referenced in function "public: void __thiscall Wombat::MamaSource::addSubscription(char const *,class Wombat::MamaSubscription *)" (?addSubscription@MamaSource@Wombat@@QAEXPBDPAVMamaSubscription@2@@Z)
3>MamaTransportMap.obj : error LNK2001: unresolved external symbol __imp__wtable_insert
3>MamaSource.obj : error LNK2019: unresolved external symbol __imp__wtable_lookup referenced in function "public: void __thiscall Wombat::MamaSource::addSubscription(char const *,class Wombat::MamaSubscription *)" (?addSubscription@MamaSource@Wombat@@QAEXPBDPAVMamaSubscription@2@@Z)
3>MamaTransportMap.obj : error LNK2001: unresolved external symbol __imp__wtable_lookup
3>MamaSource.obj : error LNK2019: unresolved external symbol __imp__wtable_remove referenced in function "public: class Wombat::MamaSubscription * __thiscall Wombat::MamaSource::removeSubscription(char const *)" (?removeSubscription@MamaSource@Wombat@@QAEPAVMamaSubscription@2@PBD@Z)
3>MamaSource.obj : error LNK2019: unresolved external symbol __imp__wtable_for_each referenced in function "public: void __thiscall Wombat::MamaSource::activateSubscriptions(void)" (?activateSubscriptions@MamaSource@Wombat@@QAEXXZ)
3>D:\dev\lib\openmama\2.3.0new\OpenMAMA\Release\libmamacppmd.dll : fatal error LNK1120: 6 unresolved externals
========== Rebuild All: 2 succeeded, 1 failed, 0 skipped ==========

Regards,
Guy


Damian Maguire
 

Hey Guy, 

Thanks for raising this. From a glance at the logs, I assume you're running against 2.3.0. Can you give the HEAD of the next branch a try and see if it resolves your issues - Frank (cc'd) has recently reworked a lot of the Visual Studio solution stuff recently, so it's possible this issue has already been resolved. If not we'll need to take a closer look (though I suspect it's an issue with linking in libwombatcommon). 

Cheers, 

Damian


On Wed, May 7, 2014 at 8:24 PM, Guy <guy.tal@...> wrote:
Hi,
I have an issue building the mamacpp project using Visual Studio 2010 and 2012. The configuration is in Win32 Debug and Release.
In both cases I compile commonc, commoncpp, mamac and then mamacpp.

mamacpp always fails with errors pasted below.

Remark: Building with SCons seems to work fine, but I still have a need to work with the solution itself for some tasks.

In Visual Studio 2010 I get the following link errors:
1>Link:
1>     Creating library D:\dev\lib\openmama\2.3.0new\OpenMAMA\Debug\mamacpp.lib and object D:\dev\lib\openmama\2.3.0new\OpenMAMA\Debug\mamacpp.exp
1>MamaSource.obj : error LNK2019: unresolved external symbol __imp__wtable_destroy referenced in function "public: virtual __thiscall Wombat::MamaSource::~MamaSource(void)" (??1MamaSource@Wombat@@UAE@XZ)
1>MamaSource.obj : error LNK2019: unresolved external symbol __imp__wtable_insert referenced in function "public: void __thiscall Wombat::MamaSource::addSubscription(char const *,class Wombat::MamaSubscription *)" (?addSubscription@MamaSource@Wombat@@QAEXPBDPAVMamaSubscription@2@@Z)
1>MamaTransportMap.obj : error LNK2001: unresolved external symbol __imp__wtable_insert
1>MamaSource.obj : error LNK2019: unresolved external symbol __imp__wtable_lookup referenced in function "public: void __thiscall Wombat::MamaSource::addSubscription(char const *,class Wombat::MamaSubscription *)" (?addSubscription@MamaSource@Wombat@@QAEXPBDPAVMamaSubscription@2@@Z)
1>MamaTransportMap.obj : error LNK2001: unresolved external symbol __imp__wtable_lookup
1>MamaSource.obj : error LNK2019: unresolved external symbol __imp__wtable_create referenced in function "public: void __thiscall Wombat::MamaSource::addSubscription(char const *,class Wombat::MamaSubscription *)" (?addSubscription@MamaSource@Wombat@@QAEXPBDPAVMamaSubscription@2@@Z)
1>MamaTransportMap.obj : error LNK2001: unresolved external symbol __imp__wtable_create
1>MamaSource.obj : error LNK2019: unresolved external symbol __imp__wtable_remove referenced in function "public: class Wombat::MamaSubscription * __thiscall Wombat::MamaSource::removeSubscription(char const *)" (?removeSubscription@MamaSource@Wombat@@QAEPAVMamaSubscription@2@PBD@Z)
1>MamaSource.obj : error LNK2019: unresolved external symbol __imp__wtable_for_each referenced in function "public: void __thiscall Wombat::MamaSource::activateSubscriptions(void)" (?activateSubscriptions@MamaSource@Wombat@@QAEXXZ)
1>D:\dev\lib\openmama\2.3.0new\OpenMAMA\Debug\libmamacppmdd.dll : fatal error LNK1120: 6 unresolved externals
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:38.26
========== Build: 0 succeeded, 1 failed, 2 up-to-date, 0 skipped ==========

Similar errors are coming from Visual Studio 2012
3>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppBuild.targets(1137,5): warning MSB8012: TargetPath(D:\dev\lib\openmama\2.3.0new\OpenMAMA\Release\mamacpp.dll) does not match the Linker's OutputFile property value (D:\dev\lib\openmama\2.3.0new\OpenMAMA\Release\libmamacppmd.dll). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
3>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppBuild.targets(1139,5): warning MSB8012: TargetName(mamacpp) does not match the Linker's OutputFile property value (libmamacppmd). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
3>     Creating library D:\dev\lib\openmama\2.3.0new\OpenMAMA\Release\mamacpp.lib and object D:\dev\lib\openmama\2.3.0new\OpenMAMA\Release\mamacpp.exp
3>MamaSource.obj : error LNK2019: unresolved external symbol __imp__wtable_create referenced in function "public: void __thiscall Wombat::MamaSource::addSubscription(char const *,class Wombat::MamaSubscription *)" (?addSubscription@MamaSource@Wombat@@QAEXPBDPAVMamaSubscription@2@@Z)
3>MamaTransportMap.obj : error LNK2001: unresolved external symbol __imp__wtable_create
3>MamaSource.obj : error LNK2019: unresolved external symbol __imp__wtable_destroy referenced in function "public: virtual __thiscall Wombat::MamaSource::~MamaSource(void)" (??1MamaSource@Wombat@@UAE@XZ)
3>MamaSource.obj : error LNK2019: unresolved external symbol __imp__wtable_insert referenced in function "public: void __thiscall Wombat::MamaSource::addSubscription(char const *,class Wombat::MamaSubscription *)" (?addSubscription@MamaSource@Wombat@@QAEXPBDPAVMamaSubscription@2@@Z)
3>MamaTransportMap.obj : error LNK2001: unresolved external symbol __imp__wtable_insert
3>MamaSource.obj : error LNK2019: unresolved external symbol __imp__wtable_lookup referenced in function "public: void __thiscall Wombat::MamaSource::addSubscription(char const *,class Wombat::MamaSubscription *)" (?addSubscription@MamaSource@Wombat@@QAEXPBDPAVMamaSubscription@2@@Z)
3>MamaTransportMap.obj : error LNK2001: unresolved external symbol __imp__wtable_lookup
3>MamaSource.obj : error LNK2019: unresolved external symbol __imp__wtable_remove referenced in function "public: class Wombat::MamaSubscription * __thiscall Wombat::MamaSource::removeSubscription(char const *)" (?removeSubscription@MamaSource@Wombat@@QAEPAVMamaSubscription@2@PBD@Z)
3>MamaSource.obj : error LNK2019: unresolved external symbol __imp__wtable_for_each referenced in function "public: void __thiscall Wombat::MamaSource::activateSubscriptions(void)" (?activateSubscriptions@MamaSource@Wombat@@QAEXXZ)
3>D:\dev\lib\openmama\2.3.0new\OpenMAMA\Release\libmamacppmd.dll : fatal error LNK1120: 6 unresolved externals
========== Rebuild All: 2 succeeded, 1 failed, 0 skipped ==========

Regards,
Guy
_______________________________________________
Openmama-dev mailing list
Openmama-dev@....org
https://lists.openmama.org/mailman/listinfo/openmama-dev


Guy <guy.tal@...>
 

Hi Damian

Building mamacpp from next-branch worked perfectly out of the box.

Many thanks.

Guy

On 5/8/2014 10:07 AM, Damian Maguire wrote:
Hey Guy, 

Thanks for raising this. From a glance at the logs, I assume you're running against 2.3.0. Can you give the HEAD of the next branch a try and see if it resolves your issues - Frank (cc'd) has recently reworked a lot of the Visual Studio solution stuff recently, so it's possible this issue has already been resolved. If not we'll need to take a closer look (though I suspect it's an issue with linking in libwombatcommon). 

Cheers, 

Damian




Glenn McClements <gmcclements@...>
 

Good stuff.

We're planning to do a 2.3.1 release in the next few weeks so those changes will be in that versioned release. 

Glenn 

From: Guy <guy.tal@...>
Date: Thursday, 8 May 2014 09:48
To: Damian Maguire <damian@...>
Cc: "openmama-dev@..." <openmama-dev@...>
Subject: Re: [Openmama-dev] Issues building mamacpp with Visual Studio

Hi Damian

Building mamacpp from next-branch worked perfectly out of the box.

Many thanks.

Guy

On 5/8/2014 10:07 AM, Damian Maguire wrote:
Hey Guy, 

Thanks for raising this. From a glance at the logs, I assume you're running against 2.3.0. Can you give the HEAD of the next branch a try and see if it resolves your issues - Frank (cc'd) has recently reworked a lot of the Visual Studio solution stuff recently, so it's possible this issue has already been resolved. If not we'll need to take a closer look (though I suspect it's an issue with linking in libwombatcommon). 

Cheers, 

Damian




This message may contain confidential information and is intended for specific recipients unless explicitly noted otherwise. If you have reason to believe you are not an intended recipient of this message, please delete it and notify the sender. This message may not represent the opinion of IntercontinentalExchange Group, Inc. (ICE), NYSE Euronext or any of their subsidiaries or affiliates, and does not constitute a contract or guarantee. Unencrypted electronic mail is not secure and the recipient of this message is expected to provide safeguards from viruses and pursue alternate means of communication where privacy or a binding message is desired.