[GCC-XML]Trouble w/ gccxml on cygwin, gcc3.2
Steven Levitt
slevitt at siac.com
Mon Sep 8 17:18:49 EDT 2003
I'm having some kind of compiler configuration problem when running gccxml
on Cygwin with GCC 3.2. The version of gccxml I am using is the one
included in the latest CableSwig.
Among other things, when parsing the standard header files, gccxml seems
not to understand the "dllimport" directive that's on some declarations. I
don't know what combination of #defines or options will get gccxml to parse
this correctly. Adding "-Ddllimport=" doesn't do the job.
Here's a simple example that gccxml can't seem to parse:
#include <iostream>
namespace TestCableSwig
{
class Test
{
public:
void test() { std::cout << "test\n" ; }
} ;
}
Here's the output from gccxml --print:
GCC-XML version 0.5.0
Configuration settings:
GCCXML_CONFIG="/cygdrive/c/Documents and Settings/Steven/.gccxml/config"
GCCXML_COMPILER="g++"
GCCXML_CXXFLAGS=" "
GCCXML_EXECUTABLE="/usr/local/lib/CableSwig/bin/gccxml_cc1plus"
GCCXML_FLAGS="-D_X86_=1 -D__HAVE_BUILTIN_SETJMP__=1 -D__tune_pentium2__=1
-D__unix__=1 -Dunix=1 -D__i386__=1 -D__SIZE_TYPE__=unsigned int
-D__GNUC_PATCHLEVEL__=0 -D_stdcall=__attribute__((__stdcall__))
-D__CYGWIN__=1 -D__unix=1 -D__USER_LABEL_PREFIX__=_ -D__STDC_HOSTED__=1
-D__stdcall=__attribute__((__stdcall__)) -D__EXCEPTIONS=1 -D__GXX_WEAK__=1
-D__tune_i686__=1 -D__WCHAR_TYPE__=short unsigned int
-D__WINT_TYPE__=unsigned int -D__GNUC__=3 -D_cdecl
=__attribute__((__cdecl__)) -D__tune_pentium3__=1 -D__tune_pentiumpro__=1
-D__fastcall=__attribute__((__fastcall__)) -D_fastcall
=__attribute__((__fastcall__)) -D__CYGWIN32__=1 -D__cplusplus=1
-D__DEPRECATED=1 -D__GNUG__=3 -D__GXX_ABI_VERSION=102 -Di386=1
-D__GNUC_MINOR__=2 -D__STDC__=1 -D__PTRDIFF_TYPE__=int
-D__REGISTER_PREFIX__= -D__cdecl=__attribute__((__cdecl__))
-D__NO_INLINE__=1 -D__i386=1 -D__VERSION__="3.2 20020927 (prerelease)"
#define __declspec(x) __attribute__((x)) -I/usr/include/w32api
-I/usr/include/c++/3.2 -I/usr/include/c++/3.2/i686-pc-cygwin
-I/usr/include/c++/3.2/backward -I/usr/local/include
-I/usr/lib/gcc-lib/i686-pc-cygwin/3.2/include -I/usr/include -include
/usr/local/lib/CableSwig/share/gccxml-0.5/GCC/3.3/gccxml_builtins.h "
GCCXML_USER_FLAGS=""
GCCXML_ROOT="/usr/local/lib/CableSwig/share/gccxml-0.5"
Here is the output from running " /usr/local/lib/CableSwig/bin/gccxml -I.
Test.hpp -fxml-start=TestCableSwig -fxml=Test.xml":
/usr/local/lib/CableSwig/bin/gccxml -I. Test.hpp -fxml-start=TestCableSwig
-fxml=Test.xml
In file included from /usr/include/c++/3.2/ctime:51,
from /usr/include/c++/3.2/cwchar:51,
from /usr/include/c++/3.2/bits/fpos.h:45,
from /usr/include/c++/3.2/iosfwd:46,
from /usr/include/c++/3.2/ios:44,
from /usr/include/c++/3.2/ostream:45,
from /usr/include/c++/3.2/iostream:45,
from Test.hpp:1:
/usr/include/time.h:98: `dllimport' was not declared in this scope
/usr/include/time.h:98: syntax error before `_timezone'
/usr/include/time.h:99: `dllimport' was not declared in this scope
/usr/include/time.h:99: redefinition of `int __declspec'
/usr/include/time.h:98: `int __declspec' previously defined here
/usr/include/time.h:99: syntax error before `int'
/usr/include/time.h:100: `dllimport' was not declared in this scope
/usr/include/time.h:100: redefinition of `int __declspec'
/usr/include/time.h:99: `int __declspec' previously defined here
/usr/include/time.h:100: syntax error before `char'
In file included from /usr/include/c++/3.2/cctype:49,
from /usr/include/c++/3.2/bits/localefwd.h:48,
from /usr/include/c++/3.2/ios:48,
from /usr/include/c++/3.2/ostream:45,
from /usr/include/c++/3.2/iostream:45,
from Test.hpp:1:
/usr/include/ctype.h:39: `dllimport' was not declared in this scope
/usr/include/ctype.h:39: redefinition of `int __declspec'
/usr/include/time.h:100: `int __declspec' previously defined here
/usr/include/ctype.h:39: syntax error before `char'
In file included from /usr/include/c++/3.2/cstdlib:52,
from /usr/include/c++/3.2/bits/stl_algobase.h:67,
from /usr/include/c++/3.2/memory:54,
from /usr/include/c++/3.2/string:48,
from /usr/include/c++/3.2/bits/localefwd.h:49,
from /usr/include/c++/3.2/ios:48,
from /usr/include/c++/3.2/ostream:45,
from /usr/include/c++/3.2/iostream:45,
from Test.hpp:1:
/usr/include/stdlib.h:45: `dllimport' was not declared in this scope
/usr/include/stdlib.h:45: redefinition of `int __declspec'
/usr/include/ctype.h:39: `int __declspec' previously defined here
/usr/include/stdlib.h:45: syntax error before `int'
In file included from /usr/include/errno.h:6,
from /usr/include/c++/3.2/cerrno:48,
from /usr/include/c++/3.2/bits/locale_facets.tcc:38,
from /usr/include/c++/3.2/locale:46,
from /usr/include/c++/3.2/bits/ostream.tcc:37,
from /usr/include/c++/3.2/ostream:275,
from /usr/include/c++/3.2/iostream:45,
from Test.hpp:1:
/usr/include/sys/errno.h:20: `dllimport' was not declared in this scope
/usr/include/sys/errno.h:20: redefinition of `int __declspec'
/usr/include/stdlib.h:45: `int __declspec' previously defined here
/usr/include/sys/errno.h:20: syntax error before `char'
/usr/include/sys/errno.h:21: `dllimport' was not declared in this scope
/usr/include/sys/errno.h:21: redefinition of `int __declspec'
/usr/include/sys/errno.h:20: `int __declspec' previously defined here
/usr/include/sys/errno.h:21: syntax error before `int'
/usr/include/sys/errno.h:23: `dllimport' was not declared in this scope
/usr/include/sys/errno.h:23: redefinition of `int __declspec'
/usr/include/sys/errno.h:21: `int __declspec' previously defined here
/usr/include/sys/errno.h:23: syntax error before `char'
/usr/include/sys/errno.h:24: `dllimport' was not declared in this scope
/usr/include/sys/errno.h:24: redefinition of `int __declspec'
/usr/include/sys/errno.h:23: `int __declspec' previously defined here
/usr/include/sys/errno.h:24: syntax error before `int'
In file included from /usr/include/c++/3.2/cmath:51,
from /usr/include/c++/3.2/bits/locale_facets.tcc:41,
from /usr/include/c++/3.2/locale:46,
from /usr/include/c++/3.2/bits/ostream.tcc:37,
from /usr/include/c++/3.2/ostream:275,
from /usr/include/c++/3.2/iostream:45,
from Test.hpp:1:
/usr/include/math.h:26: `dllimport' was not declared in this scope
/usr/include/math.h:26: redefinition of `int __declspec'
/usr/include/sys/errno.h:24: `int __declspec' previously defined here
/usr/include/math.h:26: syntax error before `__infinity'
/usr/include/math.h:356: `dllimport' was not declared in this scope
/usr/include/math.h:356: redefinition of `int __declspec'
/usr/include/math.h:26: `int __declspec' previously defined here
/usr/include/math.h:356: syntax error before `enum'
-----------------------------------------
This message and its attachments may contain privileged and confidential information. If you are not the intended recipient(s), you are prohibited from printing, forwarding, saving or copying this email. If you have received this e-mail in error, please immediately notify the sender and delete this e-mail and its attachments from your computer.
More information about the gccxml
mailing list