Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compile error on my cygwin x86-64 #12

Open
Thomas-Tsai opened this issue Nov 23, 2015 · 2 comments
Open

compile error on my cygwin x86-64 #12

Thomas-Tsai opened this issue Nov 23, 2015 · 2 comments

Comments

@Thomas-Tsai
Copy link

There are some define errors on my new windows 7 (64) cygwin x86-64 (with Cygwin dll 2.3.0)

conflicting types for BOOL, INT64, PLONG64....
any idea?

the configure and make log here:

$ ./configure --enable-win32
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
./configure: line 3464: AX_CFLAGS_WARN_ALL: command not found
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for X11... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: executing depfiles commands

make

$ make
make all-am
make[1]: Entering directory '/home/P645/x2x-dev'
gcc -DHAVE_CONFIG_H -I. -DWIN_2_X -g -O2 -MT x2x.o -MD -MP -MF .deps/x2x.Tpo -c -o x2x.o x2x.c
In file included from /usr/include/w32api/windef.h:8:0,
from /usr/include/w32api/windows.h:69,
from x2x.c:100:
/usr/include/w32api/minwindef.h:131:15: error: conflicting types for 'BOOL'
typedef int BOOL;
^
In file included from /usr/include/X11/extensions/dpms.h:33:0,
from x2x.c:94:
/usr/include/X11/Xmd.h:120:16: note: previous declaration of 'BOOL' was here
typedef CARD8 BOOL;
^
In file included from /usr/include/w32api/winnt.h:143:0,
from /usr/include/w32api/minwindef.h:163,
from /usr/include/w32api/windef.h:8,
from /usr/include/w32api/windows.h:69,
from x2x.c:100:
/usr/include/w32api/basetsd.h:32:44: error: conflicting types for 'INT64'
**MINGW_EXTENSION typedef signed __int64 INT64,_PINT64;
^
In file included from /usr/include/X11/extensions/dpms.h:33:0,
from x2x.c:94:
/usr/include/X11/Xmd.h:97:14: note: previous declaration of 'INT64' was here
typedef long INT64;
^
In file included from /usr/include/w32api/winnt.h:143:0,
from /usr/include/w32api/minwindef.h:163,
from /usr/include/w32api/windef.h:8,
from /usr/include/w32api/windows.h:69,
from x2x.c:100:
/usr/include/w32api/basetsd.h:192:43: error: expected identifier or '(' before ',' token
__MINGW_EXTENSION typedef __int64 LONG64,_PLONG64;
^
In file included from /usr/include/w32api/minwindef.h:163:0,
from /usr/include/w32api/windef.h:8,
from /usr/include/w32api/windows.h:69,
from x2x.c:100:
/usr/include/w32api/winnt.h:1509:60: error: unknown type name 'Value'
LONG64 InterlockedAdd64(LONG64 volatile Addend,LONG64 Value);
^
/usr/include/w32api/winnt.h:1514:74: error: unknown type name 'Value'
__forceinline LONG64 InterlockedAdd64(LONG64 volatile *Addend,LONG64 Value) { return InterlockedExchangeAdd64(Addend,Value) + Value; }
^
In file included from /usr/include/w32api/minwindef.h:163:0,
from /usr/include/w32api/windef.h:8,
from /usr/include/w32api/windows.h:69,
from x2x.c:100:
/usr/include/w32api/winnt.h:1575:69: error: expected ')' before '
' token
LONG64 Multiply128(LONG64 Multiplier,LONG64 Multiplicand,LONG64 _HighProduct);
^
/usr/include/w32api/winnt.h:1581:69: error: expected ')' before 'BYTE'
LONG64 MultiplyExtract128(LONG64 Multiplier,LONG64 Multiplicand,BYTE Shift);
^
/usr/include/w32api/winnt.h:1585:82: error: expected ')' before 'BYTE'
__CRT_INLINE LONG64 MultiplyExtract128(LONG64 Multiplier,LONG64 Multiplicand,BYTE Shift) {
^
In file included from /usr/include/w32api/minwindef.h:163:0,
from /usr/include/w32api/windef.h:8,
from /usr/include/w32api/windows.h:69,
from x2x.c:100:
/usr/include/w32api/winnt.h:3606:2: error: unknown type name 'PLONG64'
PLONG64 pInt64;
^
In file included from x2x.c:87:0:
/usr/include/w32api/winnt.h:5170:15: error: two or more data types in declaration specifiers
DWORD64 Status;
^
/usr/include/w32api/winnt.h:5309:13: error: two or more data types in declaration specifiers
DWORD Status;
^
In file included from x2x.c:87:0:
/usr/include/w32api/rpcdce.h:142:88: error: expected ';', ',' or ')' before 'int'
typedef void __RPC_API RPC_OBJECT_INQ_FN(UUID *ObjectUuid,UUID *TypeUuid,RPC_STATUS *Status);
^
In file included from /usr/include/w32api/rpc.h:82:0,
from /usr/include/w32api/windows.h:88,
from x2x.c:100:
/usr/include/w32api/rpcdce.h:210:51: error: unknown type name 'RPC_OBJECT_INQ_FN'
RPCRTAPI RPC_STATUS RPC_ENTRY RpcObjectSetInqFn(RPC_OBJECT_INQ_FN *InquiryFn);
^
In file included from x2x.c:87:0:
/usr/include/w32api/rpcdce.h:471:145: error: expected ';', ',' or ')' before 'int'
typedef void (__RPC_API *RPC_AUTH_KEY_RETRIEVAL_FN)(void *Arg,unsigned short *ServerPrincName,unsigned __LONG32 KeyVer,void *_Key,RPC_STATUS Status);
^
In file included from /usr/include/w32api/rpc.h:82:0,
from /usr/include/w32api/windows.h:88,
from x2x.c:100:
/usr/include/w32api/rpcdce.h:473:112: error: unknown type name 'RPC_AUTH_KEY_RETRIEVAL_FN'
RPCRTAPI RPC_STATUS RPC_ENTRY RpcServerRegisterAuthInfoA(RPC_CSTR ServerPrincName,unsigned __LONG32 AuthnSvc,RPC_AUTH_KEY_RETRIEVAL_FN GetKeyFn,void *Arg);
^
/usr/include/w32api/rpcdce.h:474:112: error: unknown type name 'RPC_AUTH_KEY_RETRIEVAL_FN'
RPCRTAPI RPC_STATUS RPC_ENTRY RpcServerRegisterAuthInfoW(RPC_WSTR ServerPrincName,unsigned __LONG32 AuthnSvc,RPC_AUTH_KEY_RETRIEVAL_FN GetKeyFn,void *Arg);
^
In file included from x2x.c:87:0:
/usr/include/w32api/rpcdce.h:513:81: error: expected ';', ',' or ')' before 'int'
RPCRTAPI signed int RPC_ENTRY UuidCompare(UUID *Uuid1,UUID *Uuid2,RPC_STATUS *Status);
^
/usr/include/w32api/rpcdce.h:515:72: error: expected ';', ',' or ')' before 'int'
RPCRTAPI int RPC_ENTRY UuidEqual(UUID *Uuid1,UUID *Uuid2,RPC_STATUS *Status);
^
/usr/include/w32api/rpcdce.h:516:69: error: expected ';', ',' or ')' before 'int'
RPCRTAPI unsigned short RPC_ENTRY UuidHash(UUID *Uuid,RPC_STATUS *Status);
^
/usr/include/w32api/rpcdce.h:517:59: error: expected ';', ',' or ')' before 'int'
RPCRTAPI int RPC_ENTRY UuidIsNil(UUID *Uuid,RPC_STATUS *Status);
^
/usr/include/w32api/rpcdce.h:547:140: error: expected ';', ',' or ')' before 'int'
typedef int (__RPC_API *RPC_MGMT_AUTHORIZATION_FN)(RPC_BINDING_HANDLE ClientBinding,unsigned __LONG32 RequestedMgmtOperation,RPC_STATUS *Status);
^
In file included from /usr/include/w32api/rpc.h:82:0,
from /usr/include/w32api/windows.h:88,
from x2x.c:100:
/usr/include/w32api/rpcdce.h:555:59: error: unknown type name 'RPC_MGMT_AUTHORIZATION_FN'
RPCRTAPI RPC_STATUS RPC_ENTRY RpcMgmtSetAuthorizationFn(RPC_MGMT_AUTHORIZATION_FN AuthorizationFn);
^
In file included from x2x.c:87:0:
/usr/include/w32api/rpcdcep.h:220:62: error: two or more data types in declaration specifiers
RPCRTAPI __LONG32 RPC_ENTRY I_RpcMapWin32Status(RPC_STATUS Status);
^
/usr/include/w32api/rpcasync.h:118:11: error: two or more data types in declaration specifiers
ULONG Status;
^
/usr/include/w32api/rpcnsip.h:21:81: error: two or more data types in declaration specifiers
RPCNSAPI void RPC_ENTRY I_RpcNsRaiseException(PRPC_MESSAGE Message,RPC_STATUS Status);
^
/usr/include/w32api/rpcndr.h:691:160: error: two or more data types in declaration specifiers
RPCRTAPI RPC_STATUS RPC_ENTRY NdrMapCommAndFaultStatus(PMIDL_STUB_MESSAGE pStubMsg,unsigned __LONG32 *pCommStatus,unsigned __LONG32 *pFaultStatus,RPC_STATUS Status);
^
In file included from /usr/include/w32api/ole2.h:18:0,
from /usr/include/w32api/wtypes.h:12,
from /usr/include/w32api/winscard.h:10,
from /usr/include/w32api/windows.h:97,
from x2x.c:100:
/usr/include/w32api/oleauto.h:123:40: error: expected ')' before 'BYTE'
WINOLEAUTAPI VarUI1FromI8(LONG64 i64In,BYTE *pbOut);
^
/usr/include/w32api/oleauto.h:138:39: error: expected ')' before 'SHORT'
WINOLEAUTAPI VarI2FromI8(LONG64 i64In,SHORT *psOut);
^
/usr/include/w32api/oleauto.h:153:39: error: expected ')' before 'LONG'
WINOLEAUTAPI VarI4FromI8(LONG64 i64In,LONG *plOut);
^
/usr/include/w32api/oleauto.h:167:43: error: expected declaration specifiers or '...' before '
' token
WINOLEAUTAPI VarI8FromUI1(BYTE bIn,LONG64 pi64Out);
^
/usr/include/w32api/oleauto.h:168:43: error: expected declaration specifiers or '...' before '
' token
WINOLEAUTAPI VarI8FromI2(SHORT sIn,LONG64 pi64Out);
^
/usr/include/w32api/oleauto.h:169:42: error: expected declaration specifiers or '...' before '
' token
WINOLEAUTAPI VarI8FromI4(LONG lIn,LONG64 pi64Out);
^
/usr/include/w32api/oleauto.h:170:45: error: expected declaration specifiers or '...' before '
' token
WINOLEAUTAPI VarI8FromR4(FLOAT fltIn,LONG64 pi64Out);
^
/usr/include/w32api/oleauto.h:171:46: error: expected declaration specifiers or '...' before '
' token
WINOLEAUTAPI VarI8FromR8(DOUBLE dblIn,LONG64 pi64Out);
^
/usr/include/w32api/oleauto.h:172:41: error: expected declaration specifiers or '...' before '
' token
WINOLEAUTAPI VarI8FromCy(CY cyIn,LONG64 pi64Out);
^
/usr/include/w32api/oleauto.h:173:47: error: expected declaration specifiers or '...' before '
' token
WINOLEAUTAPI VarI8FromDate(DATE dateIn,LONG64 pi64Out);
^
/usr/include/w32api/oleauto.h:174:85: error: expected declaration specifiers or '...' before '
' token
WINOLEAUTAPI VarI8FromStr(OLECHAR strIn,LCID lcid,unsigned __LONG32 dwFlags,LONG64 *pi64Out);
^
/usr/include/w32api/oleauto.h:175:64: error: expected declaration specifiers or '...' before '
' token
WINOLEAUTAPI VarI8FromDisp(IDispatch pdispIn,LCID lcid,LONG64 *pi64Out);
^
/usr/include/w32api/oleauto.h:176:55: error: expected declaration specifiers or '...' before '
' token
WINOLEAUTAPI VarI8FromBool(VARIANT_BOOL boolIn,LONG64 pi64Out);
^
/usr/include/w32api/oleauto.h:177:42: error: expected declaration specifiers or '...' before '
' token
WINOLEAUTAPI VarI8FromI1(CHAR cIn,LONG64 pi64Out);
^
/usr/include/w32api/oleauto.h:178:46: error: expected declaration specifiers or '...' before '
' token
WINOLEAUTAPI VarI8FromUI2(USHORT uiIn,LONG64 pi64Out);
^
/usr/include/w32api/oleauto.h:179:45: error: expected declaration specifiers or '...' before '
' token
WINOLEAUTAPI VarI8FromUI4(ULONG ulIn,LONG64 pi64Out);
^
/usr/include/w32api/oleauto.h:180:49: error: expected declaration specifiers or '...' before '
' token
WINOLEAUTAPI VarI8FromUI8(ULONG64 ui64In,LONG64 pi64Out);
^
/usr/include/w32api/oleauto.h:181:50: error: expected declaration specifiers or '...' before '
' token
WINOLEAUTAPI VarI8FromDec(DECIMAL pdecIn,LONG64 *pi64Out);
^
/usr/include/w32api/oleauto.h:182:44: error: expected declaration specifiers or '...' before '
' token
WINOLEAUTAPI VarI8FromInt(INT intIn,LONG64 *pi64Out);
^
/usr/include/w32api/oleauto.h:186:39: error: expected ')' before 'FLOAT'
WINOLEAUTAPI VarR4FromI8(LONG64 i64In,FLOAT *pfltOut);
^
/usr/include/w32api/oleauto.h:201:39: error: expected ')' before 'DOUBLE'
WINOLEAUTAPI VarR8FromI8(LONG64 i64In,DOUBLE *pdblOut);
^
/usr/include/w32api/oleauto.h:216:41: error: expected ')' before 'DATE'
WINOLEAUTAPI VarDateFromI8(LONG64 i64In,DATE *pdateOut);
^
/usr/include/w32api/oleauto.h:231:39: error: expected ')' before 'CY'
WINOLEAUTAPI VarCyFromI8(LONG64 i64In,CY *pcyOut);
^
/usr/include/w32api/oleauto.h:246:41: error: expected ')' before 'LCID'
WINOLEAUTAPI VarBstrFromI8(LONG64 i64In,LCID lcid,unsigned __LONG32 dwFlags,BSTR *pbstrOut);
^
/usr/include/w32api/oleauto.h:261:41: error: expected ')' before 'VARIANT_BOOL'
WINOLEAUTAPI VarBoolFromI8(LONG64 i64In,VARIANT_BOOL *pboolOut);
^
/usr/include/w32api/oleauto.h:276:39: error: expected ')' before 'CHAR'
WINOLEAUTAPI VarI1FromI8(LONG64 i64In,CHAR *pcOut);
^
/usr/include/w32api/oleauto.h:291:40: error: expected ')' before 'USHORT'
WINOLEAUTAPI VarUI2FromI8(LONG64 i64In,USHORT *puiOut);
^
/usr/include/w32api/oleauto.h:306:40: error: expected ')' before 'ULONG'
WINOLEAUTAPI VarUI4FromI8(LONG64 i64In,ULONG *plOut);
^
/usr/include/w32api/oleauto.h:321:41: error: expected ')' before 'ULONG64'
WINOLEAUTAPI VarUI8FromI8(LONG64 ui64In,ULONG64 *pi64Out);
^
/usr/include/w32api/oleauto.h:337:40: error: expected ')' before 'DECIMAL'
WINOLEAUTAPI VarDecFromI8(LONG64 i64In,DECIMAL pdecOut);
^
/usr/include/w32api/oleauto.h:353:39: error: expected ')' before 'LONG'
WINOLEAUTAPI VarI4FromI8(LONG64 i64In,LONG plOut);
^
In file included from /usr/include/w32api/ole2.h:18:0,
from /usr/include/w32api/wtypes.h:12,
from /usr/include/w32api/winscard.h:10,
from /usr/include/w32api/windows.h:97,
from x2x.c:100:
/usr/include/w32api/oleauto.h:505:36: error: unknown type name 'lRight'
STDAPI VarCyMulI8(CY cyLeft,LONG64 lRight,LPCY pcyResult);
^
In file included from x2x.c:87:0:
/usr/include/w32api/winspool.h:56:11: error: two or more data types in declaration specifiers
DWORD Status;
^
/usr/include/w32api/winspool.h:80:11: error: two or more data types in declaration specifiers
DWORD Status;
^
/usr/include/w32api/winspool.h:240:11: error: two or more data types in declaration specifiers
DWORD Status;
^
/usr/include/w32api/winspool.h:256:11: error: two or more data types in declaration specifiers
DWORD Status;
^
/usr/include/w32api/winspool.h:282:11: error: two or more data types in declaration specifiers
DWORD Status;
^
/usr/include/w32api/winspool.h:308:11: error: two or more data types in declaration specifiers
DWORD Status;
^
x2x.c:399:1: error: expected '=', ',', ';', 'asm' or '__attribute
' before 'WinMain'
WinMain (HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpCmd, int nShow)
^
x2x.c: In function 'InitDpyInfo':
x2x.c:1146:42: error: 'GWL_USERDATA' undeclared (first use in this function)
SetWindowLong(pDpyInfo->bigwindow, GWL_USERDATA, (LONG) pDpyInfo);
^
x2x.c:1146:42: note: each undeclared identifier is reported only once for each function it appears in
x2x.c:1146:56: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
SetWindowLong(pDpyInfo->bigwindow, GWL_USERDATA, (LONG) pDpyInfo);
^
x2x.c:1147:57: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
SetWindowLong(pDpyInfo->edgewindow, GWL_USERDATA, (LONG) pDpyInfo);
^
x2x.c: In function 'DoWakeUp':
x2x.c:1440:30: warning: passing argument 3 of 'DPMSInfo' from incompatible pointer type
if (!DPMSInfo(dpy, &state, &onoff))
^
In file included from x2x.c:94:0:
/usr/include/X11/extensions/dpms.h:47:15: note: expected 'BOOL ' but argument is of type 'BOOL *'
extern Status DPMSInfo(Display *, CARD16 *, BOOL *);
^
x2x.c: In function 'WinProcessMessage':
x2x.c:2689:54: error: 'GWL_USERDATA' undeclared (first use in this function)
PDPYINFO pDpyInfo = (PDPYINFO) GetWindowLong(hwnd, GWL_USERDATA);
^
x2x.c: In function 'SendKeyEvent':
x2x.c:3361:9: warning: 'XKeycodeToKeysym' is deprecated (declared at /usr/include/X11/Xlib.h:1687) [-Wdeprecated-declarations]
if (XKeycodeToKeysym(pShadow->dpy, keycode, winShift ? 1:0) != keysym){
^
x2x.c:3363:11: warning: 'XKeycodeToKeysym' is deprecated (declared at /usr/include/X11/Xlib.h:1687) [-Wdeprecated-declarations]
if (XKeycodeToKeysym(pShadow->dpy,keycode,winShift ? 0:1) == keysym){
^
x2x.c: In function 'ProcessSelectionNotifyW':
x2x.c:3521:51: warning: cast from pointer to integer of different size -Wpointer-to-int-casttype, format, (int)nitems, (int)prop,
^
Makefile:440: recipe for target 'x2x.o' failed
make[1]: *
* [x2x.o] Error 1
make[1]: Leaving directory '/home/P645/x2x-dev'
Makefile:328: recipe for target 'all' failed
make: *** [all] Error 2

@tharrrk
Copy link

tharrrk commented Feb 7, 2017

Same here...
Win10 64bit (CYGWIN_NT-10.0)
2.7.0(0.306/5/3) 2017-02-03 22:17 x86_64 Cygwin
x2x source from git master (2017-02-07)

Tried to re-arrange includes, define _NO_BOOL_TYPEDEF, etc.
Seems the problem lays inside cygwin/X11 headers anyway...

@dottedmag
Copy link
Owner

Sorry, new Cygwin seems to have broken it. Please let me know if you can manage to build it — I haven't had a Cygwin environment handy for a long time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants