|
From: William S F. <ws...@fu...> - 2008-07-23 07:54:29
|
sunil kumar wrote: > I am generating SWIG C++ file using interface file and the > auto-generated C++ file size is greater than 18MB and source lines in > the files is 529374. When compiler tries to compile this huge file, it > throws the following error > > SMILSWIG.cpp: In function `(static initializers for SMILSWIG.cpp)': > SMILSWIG.cpp:529374: internal compiler error: in final_scan_insn, at > final.c:1794 > Please submit a full bug report, > with preprocessed source if appropriate. > See < URL:http://bugzilla.redhat.com/bugzilla > <url:http:%2F%2Fbugzilla.redhat.com%2Fbugzilla>> for instructions. > > > I can't split my SWIG interface file into two and generate two seperate > c++ files because I am going to have one shared library with two perl > modules. > > So, i need a way to generate one SWIG perl module and multiple SWIG C++ > files (which will be lesser in file size and source code lines) using > one interface file. This way I can use multiple generated SWIG C++ files > to build the shared library. > > Please do let me know how to go about resovling this issue. I really > appreciate your help. > You could try reduce the amount of generated code using -small. If the code is still too big, consider removing wrapper methods/classes that you don't really need, eg through use of %ignore or just %include the files you absolutely need. Otherwise you'll need to invoke SWIG multiple times on different interface files and use %import, then compile the resulting wrapper files into either one or more shared objects, although I'm not entirely sure if you can compile multiple wrapper files into one shared object for Perl. William |