Hi, I've got this strange error that's only sometimes when I build app; why only sometimes? thanks...
linking ../bin/person (g++)
main.o: In function `main':main.cpp.text+0xf2): undefined reference to `Person::setName(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
collect2: ld returned 1 exit status
make[1]: *** [../bin/person] Error 1
make[1]: Target `first' not remade because of errors.
make: *** [sub-src] Error 2
make: Target `first' not remade because of errors.
*** Exited with status: 2 ***Qt Code:
class Person{ private: string name; .................... }; inline void Person::setName(const string n) { name = n; } p.setName("we we we\n");To copy to clipboard, switch view to plain text mode
Bookmarks