public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Native Win32 compiling... strange error
@ 2000-01-18 12:26 Joe Kraska
  2000-01-18 12:44 ` Matthew Brown
  2000-01-18 22:00 ` Terry Lincoln
  0 siblings, 2 replies; 4+ messages in thread
From: Joe Kraska @ 2000-01-18 12:26 UTC (permalink / raw)
  To: cygwin

Hi. Well, I read the fact and searched the archives the best I knew 
how. Here's what I'm trying to do:

Using the b20 standard release, I am attempting to compile a native 
windows application with gcc. The include files I am using are 
the ones in Microsoft's own SDK, and I am expecting to link 
with the libs there as well. I am, in fact, attempting to compile 
the "Brouhahah" example from (chapter 13?) _Inside Direct X_.
Here is, literally, what happens:

jkraska% gnumake --unix 
mkdir -p ./WIN98 
gcc -c -mno-cygwin -mwindows -g -I/g/sdk/Include -DNT brouhaha.C -o 
WIN98/brouhaha.o 
In file included from \g\sdk\Include\windef.h:166, 
from \g\sdk\Include\windows.h:171, 
from brouhaha.h:6, 
from brouhaha.C:1: 
\g\sdk\Include\winnt.h:705: #error Must define a target architecture. 
make: *** [WIN98/brouhaha.o] Error 1

Some clarification: "brouhaha.h" is the first file included by 
"brouhaha.C". "windows.h" is the first file included by "brouhaha.h". 
I'm unclear why what happens next happens. Obviously "winnt.h" is 
being included and a preprocessor #if/else combination is not happy. 
I am compiling under Windows 98, so I'm unclear why "winnt.h" is 
being included, but I am assuming right now that it's normal and 
somehow related to portability. But the failure to find a define 
is not normal, so am I doing something wrong???

Does anyone know?

It appears that winnt.h expects a #define to have been
#defined. It's a bit irregular that I should be expected to do
this myself, however, so I'm worried that I'm not invoking
the compiler correctly.


Joe Kraska 
San Diego 
CA



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

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

* Re: Native Win32 compiling... strange error
  2000-01-18 12:26 Native Win32 compiling... strange error Joe Kraska
@ 2000-01-18 12:44 ` Matthew Brown
  2000-01-24 18:31   ` Mumit Khan
  2000-01-18 22:00 ` Terry Lincoln
  1 sibling, 1 reply; 4+ messages in thread
From: Matthew Brown @ 2000-01-18 12:44 UTC (permalink / raw)
  To: cygwin, Joe Kraska

This one will go away if you define _M_IX86 on the command line. This is a MS-specific pre-defined macro in a set that identifies the target platform.

-- Matthew Brown

----- Original Message ----- 
From: "Joe Kraska" <jkraska@bbn.com>
To: <cygwin@sourceware.cygnus.com>
Sent: Tuesday, January 18, 2000 3:26 PM
Subject: Native Win32 compiling... strange error


> Hi. Well, I read the fact and searched the archives the best I knew 
> how. Here's what I'm trying to do:
> 
> Using the b20 standard release, I am attempting to compile a native 
> windows application with gcc. The include files I am using are 
> the ones in Microsoft's own SDK, and I am expecting to link 
> with the libs there as well. I am, in fact, attempting to compile 
> the "Brouhahah" example from (chapter 13?) _Inside Direct X_.
> Here is, literally, what happens:
> 
> jkraska% gnumake --unix 
> mkdir -p ./WIN98 
> gcc -c -mno-cygwin -mwindows -g -I/g/sdk/Include -DNT brouhaha.C -o 
> WIN98/brouhaha.o 
> In file included from \g\sdk\Include\windef.h:166, 
> from \g\sdk\Include\windows.h:171, 
> from brouhaha.h:6, 
> from brouhaha.C:1: 
> \g\sdk\Include\winnt.h:705: #error Must define a target architecture. 
> make: *** [WIN98/brouhaha.o] Error 1
> 
> Some clarification: "brouhaha.h" is the first file included by 
> "brouhaha.C". "windows.h" is the first file included by "brouhaha.h". 
> I'm unclear why what happens next happens. Obviously "winnt.h" is 
> being included and a preprocessor #if/else combination is not happy. 
> I am compiling under Windows 98, so I'm unclear why "winnt.h" is 
> being included, but I am assuming right now that it's normal and 
> somehow related to portability. But the failure to find a define 
> is not normal, so am I doing something wrong???
> 
> Does anyone know?
> 
> It appears that winnt.h expects a #define to have been
> #defined. It's a bit irregular that I should be expected to do
> this myself, however, so I'm worried that I'm not invoking
> the compiler correctly.
> 
> 
> Joe Kraska 
> San Diego 
> CA
> 
> 
> 
> --
> Want to unsubscribe from this list?
> Send a message to cygwin-unsubscribe@sourceware.cygnus.com
> 
> 


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

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

* Re: Native Win32 compiling... strange error
  2000-01-18 12:26 Native Win32 compiling... strange error Joe Kraska
  2000-01-18 12:44 ` Matthew Brown
@ 2000-01-18 22:00 ` Terry Lincoln
  1 sibling, 0 replies; 4+ messages in thread
From: Terry Lincoln @ 2000-01-18 22:00 UTC (permalink / raw)
  To: cygwin, Joe Kraska

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Joe,

Joe Kraska <jkraska@bbn.com> wrote:
> Hi. Well, I read the fact and searched the archives the best I
> knew  how. Here's what I'm trying to do:
> 
> Using the b20 standard release, I am attempting to compile a
> native  windows application with gcc. The include files I am
> using are 
> the ones in Microsoft's own SDK, and I am expecting to link 
> with the libs there as well. I am, in fact, attempting to compile
>  the "Brouhahah" example from (chapter 13?) _Inside Direct X_.
> Here is, literally, what happens:
> 
> jkraska% gnumake --unix 
> mkdir -p ./WIN98 
> gcc -c -mno-cygwin -mwindows -g -I/g/sdk/Include -DNT brouhaha.C
> -o WIN98/brouhaha.o  
                                                   ~~~~
! It could possibly be this little argument right here^ that says
you're compiling for NT.
> In file included from \g\sdk\Include\windef.h:166, 
> from \g\sdk\Include\windows.h:171, 
> from brouhaha.h:6, 
> from brouhaha.C:1: 
> \g\sdk\Include\winnt.h:705: #error Must define a target
> architecture.  make: *** [WIN98/brouhaha.o] Error 1
> 
> Some clarification: "brouhaha.h" is the first file included by 
> "brouhaha.C". "windows.h" is the first file included by
> "brouhaha.h".  I'm unclear why what happens next happens.
> Obviously "winnt.h" is  being included and a preprocessor
> #if/else combination is not happy.  I am compiling under Windows
> 98, so I'm unclear why "winnt.h" is  being included, but I am
> assuming right now that it's normal and  somehow related to
> portability. But the failure to find a define  is not normal, so
> am I doing something wrong???
> 
> Does anyone know?
> 
> It appears that winnt.h expects a #define to have been
> #defined. It's a bit irregular that I should be expected to do
> this myself, however, so I'm worried that I'm not invoking
> the compiler correctly.
> 
> 
> Joe Kraska 
> San Diego 
> CA
> 
> 
> 
> --
> Want to unsubscribe from this list?
> Send a message to cygwin-unsubscribe@sourceware.cygnus.com
> 
> 
Warm Regards,

W. Terry Lincoln
Senior Solution Developer [Linux Registered User #99583]
Ciber corporation
<mailto: WTerryLincoln@engineer.com>
<mailto: llincol1@rochester.rr.com>
< http://www.geocities.com/terry_lincoln >
< http://www.angelfire.com/ny/TerryLincoln >

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.2 for non-commercial use < http://www.pgp.com >
Comment: This is the PGP comment I have made.

iQA/AwUBOIU0tmdPbBTG5+8FEQL3uACePke8RsrHb7Ry8UgOn9JTEMFtCMgAoMIy
6WAJ8rCmujBKPPJzfGuJvDt+
=64bY
-----END PGP SIGNATURE-----



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

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

* Re: Native Win32 compiling... strange error
  2000-01-18 12:44 ` Matthew Brown
@ 2000-01-24 18:31   ` Mumit Khan
  0 siblings, 0 replies; 4+ messages in thread
From: Mumit Khan @ 2000-01-24 18:31 UTC (permalink / raw)
  To: Matthew Brown; +Cc: cygwin, Joe Kraska

On Tue, 18 Jan 2000, Matthew Brown wrote:

> This one will go away if you define _M_IX86 on the command line. This is a MS-specific pre-defined macro in a set that identifies the target platform.

I hopefully did the right thing for the next release. You should be able
to include winnt.h without having to include windows.h first (a practice
no so uncommon in existing code written for MSVC).

Regards,
Mumit



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

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

end of thread, other threads:[~2000-01-24 18:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-01-18 12:26 Native Win32 compiling... strange error Joe Kraska
2000-01-18 12:44 ` Matthew Brown
2000-01-24 18:31   ` Mumit Khan
2000-01-18 22:00 ` Terry Lincoln

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).