M
mike
I am writing some c++ code and have been stuck in the linking
process. I get an error of multiple definition of `__' when linking.
I would post this in the gcc usenet, but I think it is more of a c++
syntax problem than a linker problem. Here is my setup, I have a
class which is divided into a header and a source file, the source
file includes the header for the class (like it should). I then have
another source file that includes my main function. This source file
also includes the header for the class. The header file has the
proper
#ifndef SOMETHING_H
#define SOMETHING_H
.............
#endif
but when I link, I get the error:
obj/something.o.bss+0x0): multiple definition of `__'
obj/main.o.bss+0x0): first defined here
if I take out the include of "something.h" in my main.cpp, and any
class instances, then it all links just fine.
Any ideas what I am missing?
process. I get an error of multiple definition of `__' when linking.
I would post this in the gcc usenet, but I think it is more of a c++
syntax problem than a linker problem. Here is my setup, I have a
class which is divided into a header and a source file, the source
file includes the header for the class (like it should). I then have
another source file that includes my main function. This source file
also includes the header for the class. The header file has the
proper
#ifndef SOMETHING_H
#define SOMETHING_H
.............
#endif
but when I link, I get the error:
obj/something.o.bss+0x0): multiple definition of `__'
obj/main.o.bss+0x0): first defined here
if I take out the include of "something.h" in my main.cpp, and any
class instances, then it all links just fine.
Any ideas what I am missing?