This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

problem compiling with X and win32api both included


So, today I'm trying to compile perl-tk 800.024 under the most current
cygwin stuff installed by the setup.exe(dll version 1.3.22).  I found a
previous post (just a week or so ago) talking about the problems with
stub.c having different definitions for a bunch of the xlib stuff, so
I commented out the wrong defs in perl-tk's stub.c and tried again.
Now, I get this:

----------
make[1]: Entering directory `/tmp/Tk800.024/pTk'
gcc -c  -I..  -I. -Ibitmaps  -DPERL_USE_SAFE_PUTENV -fno-strict-aliasing -DUSEIM
PORTLIB -O2   -DVERSION=\"800.024\" -DXS_VERSION=\"800.024\"  "-I/usr/lib/perl5/
5.8.0/cygwin-multi-64int/CORE"  -D__WIN32__ -Wall -Wno-implicit-int -Wno-comment
 -Wno-unused -D__USE_FIXED_PROTOTYPES__ stubs.c
In file included from /usr/include/w32api/windows.h:87,
                 from Lang.h:194,
                 from tkPort.h:24,
                 from tk.h:71,
                 from tkInt.h:21,
                 from stubs.c:7:
/usr/include/w32api/winspool.h:239: unnamed fields of type other than struct
or union are not allowed
/usr/include/w32api/winspool.h:254: unnamed fields of type other than struct
or union are not allowed
/usr/include/w32api/winspool.h:275: unnamed fields of type other than struct
or union are not allowed
/usr/include/w32api/winspool.h:300: unnamed fields of type other than struct
or union are not allowed
/usr/include/w32api/winspool.h:446: unnamed fields of type other than struct
or union are not allowed
/usr/include/w32api/winspool.h:469: unnamed fields of type other than struct
or union are not allowed
make[1]: *** [stubs.o] Error 1
make[1]: Leaving directory `/tmp/Tk800.024/pTk'
make: *** [pTk/libpTk.a] Error 2
----------

I looked at winspool.h, and each error occurs inside of typedefs that
have a member element defined as "DWORD Status;".  Somewhere else, possibly
in these mail archives, I found that "Status" is an X11 type, which is
probably what's causing this problem.  I'm guessing that I could just
find all instances of "Status" in the win32api files and rename them to
something else, but that would likely cause problems with *something*
someday after I forget what I did. :)

Anyway, this appears to be a problem because the X11 headers and the
win32api headers are both included.  It's been a while since I did
anything useful with C, but is there a way to undefine the "Status"
datatype at the top of winspool.h or something similar?  I've been
searching around in my archived messages, but haven't found anything
useful yet.  I'd like to slap a GUI on this perl script, but this is
putting a bit of a crimp in that plan.  BTW, is the perl-GTK stuff
working on native win32 yet?  That'd be better, IMHO...  I guess that
the name clash above is still a bit of a problem even if I solve my
specific problem elsewhere. :)

Thanks.
--Danny

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]