This is a really frustrating error. I've tried everything I can think of and it still doesn't link properly.
Now, I have three headers: aux.h, start.h and dataf.h, and each one is wrapped in inclusion guards. I have two source files: aotrn.cpp and dataf.cpp. Now, dataf.cpp needs to include aux.h and dataf.h, and aotrn.cpp (at the moment) only needs start.h.
I get the following error:
I don't want to post the source up as that would mean posting 5 files each more than about 30 lines./tmp/ccYdCaoB.o(.text+0x0): In function `KillGame(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
: multiple definition of `KillGame(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
/tmp/ccZuFcvP.o(.text+0x0): first defined here
/tmp/ccYdCaoB.o(.text+0x50): In function `wait_ms(long)':
: multiple definition of `wait_ms(long)'
/tmp/ccZuFcvP.o(.text+0x50): first defined here
/tmp/ccYdCaoB.o(.text+0x80): In function `fcout(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
: multiple definition of `fcout(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
/tmp/ccZuFcvP.o(.text+0x80): first defined here
/tmp/ccYdCaoB.o(.text+0x100): In function `File_Encrypt(char*, char*)':
: multiple definition of `File_Encrypt(char*, char*)'
/tmp/ccZuFcvP.o(.text+0x100): first defined here
/tmp/ccYdCaoB.o(.text+0x210): In function `ForkExecute(char*)':
: multiple definition of `ForkExecute(char*)'
/tmp/ccZuFcvP.o(.text+0x210): first defined here
collect2: ld returned 1 exit status
make: *** [AoTRN] Error 1
*edit*
Oh yeah, I'm using G++ 3.3.5



LinkBack URL
About LinkBacks


