beginner needs help.

Tags:    c++ c++

Help.

I've just managed to compile a class.
When I try to implement this class in a program I get
C:\\WINDOWS\\TEMP\\ccJwtegb.o(.text+0x2a):test1.cpp: undefined reference to
`CString::CString(char const *)' error. I have no idea what this means, Im
guessing it has something to do with the linker but other than that Im lost.



4 svar postet i denne tråd vises herunder
1 indlæg har modtaget i alt 1 karma
Sorter efter stemmer Sorter efter dato
Help.

I've just managed to compile a class.
When I try to implement this class in a program I get
C:\\WINDOWS\\TEMP\\ccJwtegb.o(.text+0x2a):test1.cpp: undefined reference to
`CString::CString(char const *)' error. I have no idea what this means, Im
guessing it has something to do with the linker but other than that Im lost.


Jep. Det er linkeren der er noget galdt med hvad jeg ved.
Vis du ved noget om en Compiler så ved du også at mange(de fleste)
Compilere skriver en .O fil til linkeren men hvad den er til ved
jeg ikke. Men jeg skal vide hvilken Compiler du bruger.

MingW har jeg det ikke godt med. Du burde nok bruge en mere
advanceret compiler såsom Borland C++ eller VC++.

MH.

The-Freak

Livet er for kort til at kede sig.

Using Dev-C++ v4.0
Have no idea what compiler it uses, tryed looking in help file but couldnt find anything.

MH.

The-Freak

Livet er for kort til at kede sig.



Help.

I've just managed to compile a class.
When I try to implement this class in a program I get
C:\\WINDOWS\\TEMP\\ccJwtegb.o(.text+0x2a):test1.cpp: undefined reference to
`CString::CString(char const *)' error. I have no idea what this means, Im
guessing it has something to do with the linker but other than that Im lost.



Jep. Det er linkeren der er noget galdt med hvad jeg ved.
Vis du ved noget om en Compiler så ved du også at mange(de fleste)
Compilere skriver en .O fil til linkeren men hvad den er til ved
jeg ikke. Men jeg skal vide hvilken Compiler du bruger.


MH.

The-Freak

Livet er for kort til at kede sig.



Help.

I've just managed to compile a class.
When I try to implement this class in a program I get
C:\\WINDOWS\\TEMP\\ccJwtegb.o(.text+0x2a):test1.cpp: undefined reference to
`CString::CString(char const *)' error. I have no idea what this means, Im
guessing it has something to do with the linker but other than that Im lost.


Jep. Det er linkeren der er noget galdt med hvad jeg ved.
Vis du ved noget om en Compiler så ved du også at mange(de fleste)
Compilere skriver en .O fil til linkeren men hvad den er til ved
jeg ikke. Men jeg skal vide hvilken Compiler du bruger.


MH.

The-Freak

Livet er for kort til at kede sig.


Using Dev-C++ v4.0
Have no idea what compiler it uses, tryed looking in help file but couldnt find anything.




Help.

I've just managed to compile a class.
When I try to implement this class in a program I get
C:\\WINDOWS\\TEMP\\ccJwtegb.o(.text+0x2a):test1.cpp: undefined reference to
`CString::CString(char const *)' error. I have no idea what this means, Im
guessing it has something to do with the linker but other than that Im lost.


You probably left out an important include. It would be a lot easier to help if you included the source, and the compiler command you used.

.o files contains object code, which is fragments of code that the computer understands directly. In this stage however no linking with external libraries has been done, and all addresses allocated to variables and functions are relative to the object code.

The next process of making a fully executable file, is linking the object code so that the addresses are now relative to the full program, and functions/variables declared in external libraries are available to the program.


regards.,

Jakob Justsen



t