TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Mark Lewis
from: Thomas Seeling
date: 1999-01-14 09:53:06
subject: making dmake with emx 0.9d

Hallo mark,

Am 10 Jan 99 um 15:23 schrieb mark lewis an David Noon:

 ml> In file included from extern.h:66,
 ml>                  from dmake.c:87:
 ml> emx\public.h:161: conflicting types for `_chdir'
 ml> H:\EMX\INCLUDE\stdlib.h:194: previous declaration of `_chdir'

identifiers should not begin with underscores, this is "reserved
namespace" in Ansi-/ISO-C. This is intended for compiler and library
writers who contribute to that particular compiler. From the distance (I
prefer Gnu make, not Dmake) I'd say that dmake uses an internal function
name of "_chdir" which is not allowed since it may conflict with
internal functions of the runtime library. You hit one of those
possibilities :)

 ml> the last two lines... they are saying that instead of...
 ml>   PUBLIC void
 ml>   main(argc, argv)

 ml> that i should maybe have...

 ml>   PUBLIC void
 ml>   int main(argc, argv)
Remove the "void" after PUBLIC and make sure that the program
exits with a well-defined exit code. In Ansi-C (this is synonym to ISO-C)
main *must* return an int. Most time it works with "void", and a
lot of books teach it that way, but it is definitely wrong. main() is
called by the runtime environment of the compiled program and is expected
to return an exit code of type "int".


Tschau...Thomas

--- GED3 3.00.Beta5+
* Origin: Die TeX-Box: +49-6036-980114 V.34/X.75 24h (2:2461/332.42)
SEEN-BY: 396/1 632/0 371 633/260 262 267 270 371 635/444 506 728 639/252
SEEN-BY: 670/218
@PATH: 2461/332 300 244/1634 1200 1500 396/1 633/260 635/506 728 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.