|
works fine for injecting c++ code into a tcl script, but not if the "-
pkg" option is used. The "critcl::language c++ option" adds the "-x
c++" option to the compile command line which forces gcc to interpret
all files as c++ code regardless of content or filename suffix. When
using "-pkg" some object files are included in the gcc build line and
gcc attempts to compile these as c++ code. The fix is to precede these
files by "-x none" which restores gcc to using the filename suffix to
determine what to do. (NOTE THAT MY PATCH DOES CONTAIN AN ERROR WHERE
THE "-x none" IS APPENDED TO THE COMMAND LINE. I'VE SINCE FOUND IT
SHOULD BE IN QUOTES AND PRECEDED BY A SPACE ie " -x none")
The patch also inserts appropriate declarations for structures and
functions defined externally. |