diff options
author | Steven Knight <knight@baldmt.com> | 2004-02-17 04:39:52 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2004-02-17 04:39:52 (GMT) |
commit | 744c41b71bd77daabd7ce8d7768a2217286d6911 (patch) | |
tree | 9d619592fa4212b5ba3e8b9f87f85beb4123bb04 /test | |
parent | 9f1dc774ff3ee1ddf5b62534e67c76201551f056 (diff) | |
download | SCons-744c41b71bd77daabd7ce8d7768a2217286d6911.zip SCons-744c41b71bd77daabd7ce8d7768a2217286d6911.tar.gz SCons-744c41b71bd77daabd7ce8d7768a2217286d6911.tar.bz2 |
Make the Library test work even with linkers that don't like mixing C programs with C++ libraries. (Chad Austin)
Diffstat (limited to 'test')
-rw-r--r-- | test/Library.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/Library.py b/test/Library.py index 76047b8..37641a8 100644 --- a/test/Library.py +++ b/test/Library.py @@ -34,7 +34,7 @@ env = Environment(LIBS = [ 'foo1', 'libfoo2' ], env.Library(target = 'foo1', source = 'f1.c') Library(target = 'libfoo2', source = Split('f2a.c f2b.c f2c.c')) libtgt=env.Library(target = 'foo3', source = ['f3a.c', 'f3b.c', 'f3c.cpp']) -env.Program(target = 'prog', source = [ 'prog.c', libtgt ]) +env.Program(target = 'prog', source = [ 'prog.cpp', libtgt ]) """) test.write('f1.c', r""" @@ -94,7 +94,9 @@ f3c(void) } """) -test.write('prog.c', r""" +test.write('prog.cpp', r""" +#include <stdio.h> +extern "C" { void f1(void); void f2a(void); void f2b(void); @@ -102,6 +104,7 @@ void f2c(void); void f3a(void); void f3b(void); void f3c(void); +} int main(int argc, char *argv[]) { |