From eaec140585b8b2ef5e85299a009904674207ef1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20K=C3=B6ppe?= Date: Sun, 27 Aug 2000 20:25:54 +0000 Subject: [PATCH] Include library (`-l') files at the beginning, rather than at the end. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@694 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Source/SWIG1.1/main.cxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Source/SWIG1.1/main.cxx b/Source/SWIG1.1/main.cxx index 0206a6d20..476cdce53 100644 --- a/Source/SWIG1.1/main.cxx +++ b/Source/SWIG1.1/main.cxx @@ -387,17 +387,19 @@ int SWIG_main(int argc, char *argv[], Language *l) { { DOH *cpps; int i; + DOH *fs = NewString(""); DOH *ds = Swig_include(input_file); if (!ds) { Printf(stderr,"Unable to find '%s'\n", input_file); SWIG_exit(1); } - Seek(ds,0,SEEK_END); for (i = 0; i < Len(libfiles); i++) { - Printf(ds,"\n%%include \"%s\"\n", Getitem(libfiles,i)); + Printf(fs,"\n%%include \"%s\"\n", Getitem(libfiles,i)); } - Seek(ds,0,SEEK_SET); - cpps = Preprocessor_parse(ds); + Append(fs, ds); + Delete(ds); + Seek(fs,0,SEEK_SET); + cpps = Preprocessor_parse(fs); if (cpp_only) { Printf(stdout,"%s", cpps); while (freeze);