Skip to content

Commit

Permalink
small fix for python 2.6
Browse files Browse the repository at this point in the history
in 2.6, get_config_vars("LDCXXSHARED") gives you [None], so just use the C linker and link against the C++ runtime by hand.
  • Loading branch information
Joe Jordan committed Feb 13, 2014
1 parent f90c2b8 commit b260119
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,12 @@ def _linker_vars(file_exts, link_to):
runtime_libs = ""
cxx = False
if 'cpp' in file_exts:
linking_compiler = get_config_vars("LDCXXSHARED")[0]
tmp = get_config_vars("LDCXXSHARED")[0]
if tmp:
linking_compiler = tmp
else:
# if linking using the C compiler, make sure we also link against the C++ runtime.
runtime_libs = "-lstdc++"
cxx = True
if 'f90' in file_exts:
if cxx:
Expand Down

0 comments on commit b260119

Please sign in to comment.