From: stevenknight Date: Tue, 17 Feb 2004 04:39:52 +0000 (+0000) Subject: Make the Library test work even with linkers that don't like mixing C programs with... X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b37c59aa3d6d36136802686d409adcc495390830;p=scons.git Make the Library test work even with linkers that don't like mixing C programs with C++ libraries. (Chad Austin) git-svn-id: http://scons.tigris.org/svn/scons/trunk@903 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- diff --git a/test/Library.py b/test/Library.py index 76047b8e..37641a86 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 +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[]) {