Newbie problem with the String class

Martin Wiebusch marwie at gmx.net
Tue Feb 8 23:12:34 GMT 2000


Hi, I'm new to KDevelop. I was trying to write a simple C++ program
(that "Hello world" stuff). It looks like that:

#include <iostream.h>
#include <stdlib.h>
#include <String.h>

int main(int argc, char** argv)
{
  String s = "Hello world";

  cout << s << endl;
  return EXIT_SUCCESS;
}

Now, when I select "Compile file" everything works fine, but when I
select "Make" or "Rebuild all" I get following error messages:

undefined reference to 'String::String(char const *)'
undefined reference to 'String::~String(void)'
undefined reference to 'String::~String(void)'

(Yes, I get the last one twice) There ist a file "String.h" in the
directory /usr/include/g++/ and in that file the String class and the
above mentioned constructor and destructor are defined. 

Has anyone an idea of what's going wrong there?




More information about the KDevelop mailing list