[swift-users] Linking errors with latest git versions...

Marc Neeley neeleym at ociweb.com
Mon Mar 26 16:49:58 CEST 2012


Well I found an answer to my own question. In investigating the recent
changes to the SCons configuration options for building Swiften, I noticed
in the file:

%SWIFT_ROOT%\BuildTools\SCons\SConscript.boot  there is a new entry as
follows:

 

vars.Add(BoolVariable("set_iterator_debug_level", "Set
_ITERATOR_DEBUG_LEVEL=0", "yes"))

 

This is set to "yes" by default and in the VC++ world an
_ITERATOR_DEBUG_LEVEL=0  translates to RELEASE.

So my solution was to go to the config.py file and place an entry of:

 

set_iterator_debug_level="false"

 

This puts the build back in a debug level build and all is good with linking
my application with Swiften.lib

 

Marc

 

From: swift-users-bounces at swift.im [mailto:swift-users-bounces at swift.im] On
Behalf Of Marc Neeley
Sent: Monday, March 26, 2012 1:06 AM
To: swift-users at swift.im
Subject: Re: [swift-users] Linking errors with latest git versions...

 

In executing swiften-config.exe -cflags I get the following:

 

c:\dev\tools\swift\Swiften\Config>swiften-config --cflags

/DBOOST_ALL_NO_LIB /DBOOST_SYSTEM_NO_DEPRECATED /DBOOST_FILESYSTEM_VERSION=2
/D_

WIN32_WINNT=0x0501 /DIDNA_STATIC /DXML_STATIC /D_ITERATOR_DEBUG_LEVEL=0
/Ic:/dev

/tools/swift/Swiften/Config/../.. /Ic:/dev/tools/swift/Swiften/Config/../..
/Ic:

/dev/tools/swift/Swiften/Config/../..\3rdParty\LibIDN\src
/Ic:/dev/tools/swift/S

wiften/Config/../..\3rdParty\LibIDN\stubs\win32
/Ic:/dev/tools/swift/Swiften/Con

fig/../..\3rdParty\ZLib\src
/Ic:/dev/tools/swift/Swiften/Config/../..\3rdParty\E

xpat\src /Ic:\OpenSSL-Win32\include

 

Obviously the /D_ITERATOR_DEBUG_LEVEL=0 is set such that the conflict will
occur.  Is there a flag for SCons that I can use to set this to 2?

 

Thanks,

Marc

 

From: Marc Neeley [mailto:neeleym at ociweb.com] 
Sent: Sunday, March 25, 2012 7:00 PM
To: swift-users at swift.im
Subject: Linking errors with latest git versions...

 

I pulled down the latest Swift git repo content and built it. It claims
everything built ok and I got clean libs, etc.  When I built my project
using the new Swiften.lib I get a stream of linking errors that follow the
same pattern as shown below:

 

Swiften_Boost.lib(connection.obj) : error LNK2038: mismatch detected for
'_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in
MessageEngine.obj

 

Of course MessageEngine.obj is my code and Swiften_Boost.lib is from the
build of the Swift source. This is occurring for Swiften.lib  as well. The
error above typically is an indicator that one is being built with release
in mind and the other in debug. My project is being built with Debug on and
I was building cleanly with a pull from Feb 9, 2012 just yesterday. Has
something changed in scons such that the debug version is not the default?
Is there a switch for scons to force a debug build of the Swift libs?

 

Thanks,

 

Marc Neeley

Principal Software Engineer

Object Computing, Inc.

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: </lists/pipermail/swift-users/attachments/20120326/c53c2eaa/attachment-0001.htm>


More information about the swift-users mailing list