public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* win32 api and using in Cygwin.
@ 2001-05-16 11:16 rob franz
  0 siblings, 0 replies; 3+ messages in thread
From: rob franz @ 2001-05-16 11:16 UTC (permalink / raw)
  To: cygwin

Hi,
This isn't a programming question, but I think more of a setup question...

I setup cygwin using the setup.exe from the web site.  Everything seems to 
be in order, but I am having some problems compiling programs that have 
elements of win32 in them. For example, in a simple program, I can get a 
message box to pop up with no problems, but simple data types such as HDC 
and PAINTSTRUCT are unrecognized and therefore treated as parse errors. I've 
included windows.h, and that should be all I need, right?  I've also tried 
adding compiler flags, such as
-mwindows, but i still get these data types treated as parse errors....

some code:

#include <windows.h>

int   WINAPI WinMain(
      HINSTANCE   hInstance,
      HINSTANCE   hPrevInstance,
      LPSTR       pszCmdLine,
      int         nCmdShow
  )
{
   WNDCLASS wndClass;

   wndClass.style = 0;
   ...
}

Just an example, but when I try to reference an attribute of wndClass, it 
will get treated as a parse error....

any ideas on what I'm doing wrong or has someone seen this before?  I'm very 
new to cygwin.

Thanks in advance,
ROb



_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com


--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Win32 api and using in Cygwin
  2001-05-17 10:27 Win32 " Mark Schoenberg
@ 2001-05-17 11:45 ` Earnie Boyd
  0 siblings, 0 replies; 3+ messages in thread
From: Earnie Boyd @ 2001-05-17 11:45 UTC (permalink / raw)
  To: Mark Schoenberg; +Cc: cygwin

Mark Schoenberg wrote:
> 
> Dear Rob,
> 
>      I am not sure that I can see your problem.  If the code below is in the
> file a.c or a.cpp, the command "gcc -o a a.c" or "gcc -o a a.cpp" compiles a.exe
> for me without any errors messages.  Executing a.exe, of course, results in
> nothing special happening.
> 

The current versions of gcc will find the windows include files
regardless that you didn't specify -mwin32.  Some prior versions only
included windows include files if you specified -mwin32.

I suggest upgrading to gcc-2.95.3-4.
-- 
Earnie.

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Win32 api and using in Cygwin
@ 2001-05-17 10:27 Mark Schoenberg
  2001-05-17 11:45 ` Earnie Boyd
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Schoenberg @ 2001-05-17 10:27 UTC (permalink / raw)
  To: cygwin

Dear Rob,

     I am not sure that I can see your problem.  If the code below is in the
file a.c or a.cpp, the command "gcc -o a a.c" or "gcc -o a a.cpp" compiles a.exe
for me without any errors messages.  Executing a.exe, of course, results in
nothing special happening.


   #include <windows.h>

   int   WINAPI WinMain(
         HINSTANCE   hInstance,
         HINSTANCE   hPrevInstance,
         LPSTR       pszCmdLine,
         int         nCmdShow
     )
   {
      WNDCLASS wndClass;

      wndClass.style = 0;
   }

Regards,

   Mark Schoenberg

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-05-17 11:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-16 11:16 win32 api and using in Cygwin rob franz
2001-05-17 10:27 Win32 " Mark Schoenberg
2001-05-17 11:45 ` Earnie Boyd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).