delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Message-Id: | <200207081848.g68Im4347588@pilot12.cl.msu.edu> |
Date: | Mon, 08 Jul 2002 14:48:04 EDT |
To: | Alessandro Di Bella <alessandro DOT di DOT bella AT blackpearl DOT com> |
Subject: | Re: probem compiling with win32api headers |
From: | Harold L Hunt <huntharo AT msu DOT edu> |
Cc: | cygwin AT cygwin DOT com |
You have lots of problems, but one simple one is that you need to include <windows.h> before selecting individual includes like <winreg.h>. Harold Alessandro Di Bella <alessandro DOT di DOT bella AT blackpearl DOT com> said: > Hi all, > I'm new to cygwin and I just started using gcc for win32. I'm trying to > understand how to use the win32api but whenever I import a header from that > directory I get something like: > > $ g++ -mno-cygwin -o test.exe test.cpp -advapi32 > In file included from test.cpp:1: > /usr/include/w32api/winreg.h:41: syntax error before `;' > /usr/include/w32api/winreg.h:43: syntax error before `;' > /usr/include/w32api/winreg.h:44: syntax error before `;' > /usr/include/w32api/winreg.h:45: syntax error before `;' > /usr/include/w32api/winreg.h:46: syntax error before `;' > /usr/include/w32api/winreg.h:49: syntax error before `;' > /usr/include/w32api/winreg.h:50: syntax error before `;' > /usr/include/w32api/winreg.h:51: syntax error before `;' > /usr/include/w32api/winreg.h:52: syntax error before `;' > /usr/include/w32api/winreg.h:54: syntax error before `AbortSystemShutdownA' > /usr/include/w32api/winreg.h:55: syntax error before `AbortSystemShutdownW' > /usr/include/w32api/winreg.h:56: syntax error before > `InitiateSystemShutdownA' > /usr/include/w32api/winreg.h:57: syntax error before > `InitiateSystemShutdownW' > /usr/include/w32api/winreg.h:58: syntax error before `RegCloseKey' > /usr/include/w32api/winreg.h:59: syntax error before `RegConnectRegistryA' > /usr/include/w32api/winreg.h:60: syntax error before `RegConnectRegistryW' > /usr/include/w32api/winreg.h:61: syntax error before `RegCreateKeyA' > /usr/include/w32api/winreg.h:62: syntax error before `RegCreateKeyExA' > /usr/include/w32api/winreg.h:63: syntax error before `RegCreateKeyExW' > /usr/include/w32api/winreg.h:64: syntax error before `RegCreateKeyW' > /usr/include/w32api/winreg.h:65: syntax error before `RegDeleteKeyA' > /usr/include/w32api/winreg.h:66: syntax error before `RegDeleteKeyW' > /usr/include/w32api/winreg.h:67: syntax error before `RegDeleteValueA' > /usr/include/w32api/winreg.h:68: syntax error before `RegDeleteValueW' > /usr/include/w32api/winreg.h:69: syntax error before `RegEnumKeyA' > /usr/include/w32api/winreg.h:70: syntax error before `RegEnumKeyW' > /usr/include/w32api/winreg.h:71: syntax error before `RegEnumKeyExA' > /usr/include/w32api/winreg.h:72: syntax error before `RegEnumKeyExW' > /usr/include/w32api/winreg.h:73: syntax error before `RegEnumValueA' > /usr/include/w32api/winreg.h:74: syntax error before `RegEnumValueW' > /usr/include/w32api/winreg.h:75: syntax error before `RegFlushKey' > /usr/include/w32api/winreg.h:76: syntax error before `RegGetKeySecurity' > /usr/include/w32api/winreg.h:77: syntax error before `RegLoadKeyA' > /usr/include/w32api/winreg.h:78: syntax error before `RegLoadKeyW' > /usr/include/w32api/winreg.h:79: syntax error before > `RegNotifyChangeKeyValue' > /usr/include/w32api/winreg.h:80: syntax error before `RegOpenKeyA' > /usr/include/w32api/winreg.h:81: syntax error before `RegOpenKeyExA' > /usr/include/w32api/winreg.h:82: syntax error before `RegOpenKeyExW' > /usr/include/w32api/winreg.h:83: syntax error before `RegOpenKeyW' > /usr/include/w32api/winreg.h:84: syntax error before `RegQueryInfoKeyA' > /usr/include/w32api/winreg.h:85: syntax error before `RegQueryInfoKeyW' > /usr/include/w32api/winreg.h:86: syntax error before > `RegQueryMultipleValuesA' > /usr/include/w32api/winreg.h:87: syntax error before > `RegQueryMultipleValuesW' > /usr/include/w32api/winreg.h:88: syntax error before `RegQueryValueA' > /usr/include/w32api/winreg.h:89: syntax error before `RegQueryValueExA' > /usr/include/w32api/winreg.h:90: syntax error before `RegQueryValueExW' > /usr/include/w32api/winreg.h:91: syntax error before `RegQueryValueW' > /usr/include/w32api/winreg.h:92: syntax error before `RegReplaceKeyA' > /usr/include/w32api/winreg.h:93: syntax error before `RegReplaceKeyW' > /usr/include/w32api/winreg.h:94: syntax error before `RegRestoreKeyA' > /usr/include/w32api/winreg.h:95: syntax error before `RegRestoreKeyW' > /usr/include/w32api/winreg.h:96: syntax error before `RegSaveKeyA' > /usr/include/w32api/winreg.h:97: syntax error before `RegSaveKeyW' > /usr/include/w32api/winreg.h:98: syntax error before `RegSetKeySecurity' > /usr/include/w32api/winreg.h:99: syntax error before `RegSetValueA' > /usr/include/w32api/winreg.h:100: syntax error before `RegSetValueExA' > /usr/include/w32api/winreg.h:101: syntax error before `RegSetValueExW' > /usr/include/w32api/winreg.h:102: syntax error before `RegSetValueW' > /usr/include/w32api/winreg.h:103: syntax error before `RegUnLoadKeyA' > /usr/include/w32api/winreg.h:104: syntax error before `RegUnLoadKeyW' > > > this is test.cpp: > > #include <winreg.h> > > void main (int argc, char *argv[]) > { > > } > > Can someone help please? > > > Thanks > > Alessandro > > > Alessandro Di Bella > Software Developer > Blackpearl EU > Unit 20a, Becket Way Park West Business Park > Duiblin 12 - Ireland > Tel +353 1 6166715 > Fax +353 1 6166711 > > > -- > 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/ > > -- 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |