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
This commit is contained in:
parent
49e32d9bec
commit
eaec140585
1 changed files with 6 additions and 4 deletions
|
|
@ -387,17 +387,19 @@ int SWIG_main(int argc, char *argv[], Language *l) {
|
||||||
{
|
{
|
||||||
DOH *cpps;
|
DOH *cpps;
|
||||||
int i;
|
int i;
|
||||||
|
DOH *fs = NewString("");
|
||||||
DOH *ds = Swig_include(input_file);
|
DOH *ds = Swig_include(input_file);
|
||||||
if (!ds) {
|
if (!ds) {
|
||||||
Printf(stderr,"Unable to find '%s'\n", input_file);
|
Printf(stderr,"Unable to find '%s'\n", input_file);
|
||||||
SWIG_exit(1);
|
SWIG_exit(1);
|
||||||
}
|
}
|
||||||
Seek(ds,0,SEEK_END);
|
|
||||||
for (i = 0; i < Len(libfiles); i++) {
|
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);
|
Append(fs, ds);
|
||||||
cpps = Preprocessor_parse(ds);
|
Delete(ds);
|
||||||
|
Seek(fs,0,SEEK_SET);
|
||||||
|
cpps = Preprocessor_parse(fs);
|
||||||
if (cpp_only) {
|
if (cpp_only) {
|
||||||
Printf(stdout,"%s", cpps);
|
Printf(stdout,"%s", cpps);
|
||||||
while (freeze);
|
while (freeze);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue