www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/09/12/13:49:45

Message-ID: <3237A1AE.7C36@teleport.com>
Date: Wed, 11 Sep 1996 22:38:57 -0700
From: Aron Faegre <faegre AT teleport DOT com>
Reply-To: faegre AT teleport DOT com
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: Problem compiling

I don't understand why I am getting a lot of errors using gcc where I
didn't get any when compiling this program under borland turbo c++. 
Every time I use a variable outside of function main() it gives the
error: 'variable' undefined.  You will see from the list of errors every
time I use the struct square it also gives me more errors.  I'm trying
to figure out what's wrong.

what it shows when I compile with -v:
Reading specs from c:/djgpp/lib/specs
gcc version 2.8.1
 c:/djgpp/lib/gcc-lib/djgpp\2.81\cpp.exe -lang-c -v -undef -D__GNUC__=2
-D__GNUC_MINOR__=8 -Dunix -Di386 -DGO32 -DMSDOS -DDJGPP=2
-DDJGPP_MINOR=1 -D__unix__ -D__i386__ -D__GO32__ -D__MSDOS__
-D__DJGPP__=2 -D__DJGPP_MINOR__=1 -D__unix -D__i386 -D__GO32 -D__MSDOS
-D__DJGPP=2 -D__DJGPP_MINOR=1 oldgmeng.c c:/djgpp/tmp\ccaaebgl
GNU CPP version 2.8.1 (80386, BSD syntax)
#include "..." search starts here:
#include <...> search starts here:
 c:/djgpp/include
 c:/djgpp/lib/gcc-lib/djgpp/2.81/include
 c:/djgpp/include
End of search list.
 c:/djgpp/lib/gcc-lib/djgpp\2.81\cc1.exe c:/djgpp/tmp\ccaaebgl -quiet
-dumpbase oldgmeng.c -version -o c:/djgpp/tmp\ccbaebgl
GNU C version 2.8.1 (djgpp) compiled by GNU C version 2.8.1.
oldgmeng.c:19: parse error before `square'
oldgmeng.c:19: warning: data definition has no type or storage class
oldgmeng.c:26: parse error before `&'
oldgmeng.c: In function `go_dir':
oldgmeng.c:29: `godir' undeclared (first use in this function)
oldgmeng.c:29: (Each undeclared identifier is reported only once
oldgmeng.c:29: for each function it appears in.)
oldgmeng.c:30: `y' undeclared (first use in this function)
oldgmeng.c:32: `x' undeclared (first use in this function)
oldgmeng.c: At top level:
oldgmeng.c:41: parse error before `&'
oldgmeng.c: In function `check_wall':
oldgmeng.c:44: request for member `wall' in something not a structure or
union
oldgmeng.c:45: request for member `wall' in something not a structure or
union
oldgmeng.c:46: request for member `wall' in something not a structure or
union
oldgmeng.c:47: request for member `wall' in something not a structure or
union
oldgmeng.c:48: request for member `wall' in something not a structure or
union
oldgmeng.c:49: request for member `wall' in something not a structure or
union
oldgmeng.c:50: request for member `wall' in something not a structure or
union
oldgmeng.c:51: request for member `wall' in something not a structure or
union
oldgmeng.c:52: request for member `wall' in something not a structure or
union
oldgmeng.c:53: request for member `wall' in something not a structure or
union
oldgmeng.c:54: request for member `wall' in something not a structure or
union
oldgmeng.c:55: request for member `wall' in something not a structure or
union
oldgmeng.c:56: request for member `wall' in something not a structure or
union
oldgmeng.c:57: request for member `wall' in something not a structure or
union
oldgmeng.c:58: request for member `wall' in something not a structure or
union
oldgmeng.c:59: request for member `wall' in something not a structure or
union
oldgmeng.c:60: request for member `wall' in something not a structure or
union
oldgmeng.c:61: request for member `wall' in something not a structure or
union
oldgmeng.c:62: request for member `wall' in something not a structure or
union
oldgmeng.c:63: request for member `wall' in something not a structure or
union
oldgmeng.c:64: request for member `wall' in something not a structure or
union
oldgmeng.c:65: request for member `wall' in something not a structure or
union
oldgmeng.c:66: request for member `wall' in something not a structure or
union
oldgmeng.c:67: request for member `wall' in something not a structure or
union
oldgmeng.c:70: request for member `wall' in something not a structure or
union
oldgmeng.c:72: `x' undeclared (first use in this function)
oldgmeng.c:72: `y' undeclared (first use in this function)
oldgmeng.c: At top level:
oldgmeng.c:78: parse error before `&'
oldgmeng.c: In function `exits':
oldgmeng.c:83: `error' undeclared (first use in this function)
oldgmeng.c:84: `y' undeclared (first use in this function)
oldgmeng.c:85: `x' undeclared (first use in this function)
oldgmeng.c: At top level:
oldgmeng.c:115: parse error before `&'
oldgmeng.c: In function `get_dir':
oldgmeng.c:120: request for member `item' in something not a structure
or union
oldgmeng.c:122: `hp' undeclared (first use in this function)
oldgmeng.c:123: `dir' undeclared (first use in this function)
oldgmeng.c:169: `x' undeclared (first use in this function)
oldgmeng.c:169: `y' undeclared (first use in this function)
oldgmeng.c: In function `main':
oldgmeng.c:204: request for member `desc' in something not a structure
or union
oldgmeng.c:205: request for member `desc' in something not a structure
or union
oldgmeng.c:206: request for member `desc' in something not a structure
or union
oldgmeng.c:207: request for member `desc' in something not a structure
or union
oldgmeng.c:208: request for member `desc' in something not a structure
or union
oldgmeng.c:209: request for member `desc' in something not a structure
or union
oldgmeng.c:210: request for member `desc' in something not a structure
or union
oldgmeng.c:211: request for member `desc' in something not a structure
or union
oldgmeng.c:212: request for member `desc' in something not a structure
or union
oldgmeng.c:213: request for member `desc' in something not a structure
or union
oldgmeng.c:214: request for member `desc' in something not a structure
or union
oldgmeng.c:215: request for member `desc' in something not a structure
or union
oldgmeng.c:216: request for member `desc' in something not a structure
or union
oldgmeng.c:217: request for member `desc' in something not a structure
or union
oldgmeng.c:218: request for member `desc' in something not a structure
or union
oldgmeng.c:225: request for member `desc' in something not a structure
or union
oldgmeng.c:231: warning: comparison is always 0 due to limited range of
data type
oldgmeng.c:235: warning: comparison is always 0 due to limited range of
data type

go32-v2:
DPMI memory available: 19699 Kb
DPMI swap space available: 7937 Kb

autoexec.bat:
SET CLASSPATH=C:\EasyPhoto\PhotoDeluxe 2.0\AdobeConnectables
SET CLASSPATH=c:\Brendan\heat\navbar;%CLASSPATH%
@C:\PROGRA~1\NORTON~2\NAVBOOT.EXE /STARTUP
                            
@ECHO OFF
C:\SOUND144\UTILITY\AZCAL.EXE
PROMPT $P$G
PATH C:\WINDOWS;C:\WINDOWS\COMMAND;C:\
SMARTDRV.EXE /X
LH C:\WINDOWS\COMMAND\MSCDEX.EXE /D:MSCD0001 /M:20 /S /L:D
SET DIRCMD=/O
SET TEMP=C:\PBTOOLS\WINTEMP
LH C:\BRENDAN\MFD\MF.EXE
SET WINPMT=[WINDOWS] $P$G
SET BLASTER=A220 I5 D1 T4
SET GALAXY=A220 I5 D1 K10 P530 T6
SET SOUND=C:\SOUND144
IF EXIST C:\VGA\CLMODE.EXE C:\VGA\CLMODE T640=60 T800=60 T1024=87
T1280=0
REM                           
REM               
REM                         
                         
SET PATH=C:\DJGPP\BIN;C:\WINDOWS;C:\WINDOWS\COMMAND;C:\ 
SET DJGPP=C:\DJGPP\DJGPP.ENV

config.sys:
DEVICE=C:\WINDOWS\HIMEM.SYS
DEVICEHIGH=C:\WINDOWS\EMM386.EXE 5125 H=160
DOS=HIGH,UMB
FILES=40
BUFFERSHIGH=20
STACKSHIGH=0,0
FCBSHIGH=1
DEVICEHIGH=C:\WINDOWS\MOUSE.SYS
DEVICEHIGH=C:\PBTOOLS\NEC_IDE.SYS /D:MSCD0001

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019