From: Hans-Bernhard Broeker Newsgroups: comp.os.msdos.djgpp Subject: Re: Newbie to DJGPP: linke error undefined reference to main Date: 4 Oct 2002 18:16:32 GMT Organization: Aachen University of Technology (RWTH) Lines: 19 Message-ID: References: NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de X-Trace: nets3.rz.RWTH-Aachen.DE 1033755392 4162 137.226.32.75 (4 Oct 2002 18:16:32 GMT) X-Complaints-To: abuse AT rwth-aachen DOT de NNTP-Posting-Date: 4 Oct 2002 18:16:32 GMT Originator: broeker@ To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Sams wrote: [...] You main problem is the misconception that DJGPP were a Windows compiler. It isn't --- it's a DOS compiler. > When I link it (gcc -o dsapi3.dll dsapi3.o) I got these messages This action, thus, doesn't make sense. DLL's are a windows-specific thing. BTW, even on windows, you wouldn't usually generate a DLL quite as straightforwardly as what you're trying. The error message about undefined references to 'main' are consequential errors, then: a DLL might not need a main program, but DJGPP can't make DLLs. It makes DOS programs, which do require a main() function. -- Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de) Even if all the snow were burnt, ashes would remain.