www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/04/11/23:32:47

From: ptwitche AT eznet DOT net (Ryan Twitchell)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: More RHIDE trouble...
Date: Sun, 12 Apr 1998 02:15:00 GMT
Message-ID: <35301dfe.33269768@news.eznet.net>
References: <352fb0d3 DOT 5318573 AT news DOT eznet DOT net> <352FF271 DOT 422D AT plinet DOT com>
NNTP-Posting-Host: dialup158.roc-tc5n.eznet.net
Lines: 29
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

The "bad command or file name" error occurs right before the message
"no errors" at the end of compile. The "multiple definition of main"
error comes from the linker. The Message Window says this:
"Error: foo.o: In function 'main': 
Error: foo.cpp(.text+0x14): multiple definition of 'main'
Error: foo.o(.text+0x14):foo.cpp: first defined here"

	Ryan Twitchell

On Sat, 11 Apr 1998 15:45:05 -0700, Charles Terry <cterry AT plinet DOT com>
wrote:
>The IDE is worth the trouble, any platform has its learning curve
>and if you really want a headache try the alternative "EMACS".
>
>Anyway we need to know when you get the bad command or file name?
>use the -v option in the compiler options.
>Also you should never put an include file in the project window,
>an include file is used to set definitions and macros that effectively
>become a part of the file they are included with, whereas if they
>are in the project window they are treated as code to be compiled
>independently.  Also the dj compiler decides what to to with a
>file based on its extention, I'm not sure what it would try to do
>compiling an *.h file.
>When you get the main redefinition message doesn't it say where the
>first definition was?
>
>Charles Terry
>

- Raw text -


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