Mail Archives: djgpp/1998/04/11/23:32:47
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 -