Mail Archives: djgpp/1998/04/12/09:30:40
Ryan Twitchell wrote:
>
> 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
>
That combination for main would come from
a command like
g++ foo.o foo.cpp -o foo.exe
but rhide doesn't ever generate that type of command -since
it uses its builtin make it uses a compile step
g++ foo.cpp -o foo.o
then a link
g++ -o foo.exe foo.o
so- ????
Why is Rhide trying to link the same file twice!?!?
One possibility would be that you have your objects being written
to a different directory than your source and all the neccesary
path specs are not given to Rhide.
Another is that you've got the object file and the source file
both specified in the project (but I think this was covered earlier
in this thread?).
If the above doesn't point to any solution, I would suggest
deleteing the project file (foo.grp?),
Create a new project foo.grp in the same directory as the
source file, put just the source file in the project, and try it.
Make sure rhide is being opened in the same directory as the source.
You can have various paths fo files in rhide but I'd suggest
making it as simple as possible to start to get the bug out.
Project files (I don't know there structure) somtime get corrupted
I had an occurence where rhide was rebooting the computer due to
a corrupt *.grp file.
good luck
Charles Terry
- Raw text -