From 796dee6f9eda56c649b2b2528c3d91ab2f8045c3 Mon Sep 17 00:00:00 2001 From: "Gustavo J. A. M. Carneiro" Date: Sat, 17 Jan 2009 16:58:42 +0000 Subject: [PATCH] On native win32, we cannot use -D_DEBUG when compiling Python extensions --- bindings/python/wscript | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/bindings/python/wscript b/bindings/python/wscript index bd74e470b..69825e2b6 100644 --- a/bindings/python/wscript +++ b/bindings/python/wscript @@ -434,7 +434,15 @@ def build(bld): pymod.target = 'ns3/_ns3' pymod.name = 'ns3module' pymod.uselib_local = "ns3" - pymod.env.append_value('CXXDEFINES', ['NS_DEPRECATED=', 'NS3_DEPRECATED_H']) + + defines = list(pymod.env['CXXDEFINES']) + defines.extend(['NS_DEPRECATED=', 'NS3_DEPRECATED_H']) + if Options.platform == 'win32': + try: + defines.remove('_DEBUG') # causes undefined symbols on win32 + except ValueError: + pass + pymod.env['CXXDEFINES'] = defines # copy the __init__.py file to the build dir. waf can't handle # this, it's against waf's principles to have build dir files