Mail Archives: djgpp/1998/03/27/21:29:53
From: | y0000980 AT ws DOT rz DOT tu-bs DOT de (Andree Borrmann)
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Re: help - rsxntdj, win95 programming, general c q's
|
Date: | 26 Mar 1998 13:51:49 GMT
|
Organization: | TU Braunschweig, Germany
|
Lines: | 62
|
Distribution: | world
|
Message-ID: | <6fdmhl$gv9$1@rzcomm2.rz.tu-bs.de>
|
References: | <01bd58ae$8f967d00$239f23cb AT default>
|
NNTP-Posting-Host: | rzsrv2.rz.tu-bs.de
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
jo (johne AT nospam DOT cromnet DOT net DOT au) wrote:
: C:\DJGPP\MySource>gcc -Zwin32 test.c -o test.exe
: test.c:3: parse error before `WinMain'
: test.c:3: parse error before `hInstance'
: test.c: In function `WinMain':
: test.c:8: `NULL' undeclared (first use this function)
: test.c:8: (Each undeclared identifier is reported only once
: test.c:8: for each function it appears in.)
: test.c:8: `MB_OK' undeclared (first use this function)
Seems you don't have included "windows.h"...
: - Using DFE, to run the makefiles, in dir rsxntdj\sample\gui\cplus\ when
: the makefile is processing I receive the error makefile: 13: *** missing
: seperator
You (or your editor) messed up the makefile. Before commands there MUST be a
tabulator as a separator...
: - Could someone point me to a web page or other online resource for some
: beginner win95 programming with djgpp.
: - This one is driving me crazy,
: #include <stdio.h>
: #include <string.h>
: int main()
: {
: char bytes[10];
: strcpy(bytes, "0");
:
: char date[11];
: strcpy(date, "01:01:1980");
:
: return 0;
: }
You can't declare variables in the middle of a block in C! Only at the beginning.
You can do
{
char bytes[10];
strcpy(bytes, "0");
{
char date[11];
strcpy(date, "01:01:1980");
}
return 0;
}
but I don't think that's what you want to do, because "date" would only live in
the inner block...
Ciao,
Andree
- Raw text -