Mail Archives: cygwin/1996/11/05/00:09:29
I just compiled a simple C++ program using the windows32api-0.1.2 header
files and had it fail to compiler with "syntax error before __attribute__"
in the header files. These errors seem to be related to functions which
return pointers and have the __attribute__((__stdcall__)) attribute (which
all the API functions have). It seems that a declaration like:
LPWSTR *
STDCALL
CommandLineToArgv (
...
Will not be properly interpreted by the C++ compiler (the C compiler has
no problem with it). Changing the prototype to
STDCALL
LPWSTR *
CommandLineToArgv (
...
Makes the errors go away, and seems to work correctly, but I wonder if it
might break something or otherwise be a bad idea to do it this way.
Since these header files have (apparently) been integrated into GCC for the
next release, presumably someone has already solved this. I would like to know
what the "official" solution is. Is it a change to the compiler code or just
in the header files? If in the header files is it the above change or
something different?
Thanks,
Colin.
------------------------------------------------------------------------------
Colin Peters ------------ Saga Univ. Dept. of Information Science, Saga, JAPAN
http://www.fu.is.saga-u.ac.jp/~colin/home.html - colin AT bird DOT fu DOT is DOT saga-u DOT ac DOT jp
$@%3%j%s(J $@%T!<%?!<%:(J - $@:42lBg3XM}9)3XIt>pJs2J3X2J>pJs4pAC3X9V:B(J
- Current favorite kanji: $@@2$l(J $@<G AT 8(J -
-
For help on using this list, send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
- Raw text -