Afficher un message
Vieux 26/02/2008, 18h55   #2
red floyd
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Undefined symbols error for barebones OO attempt

prlawrence wrote:
> Hello, new C++ programmer here.
>
> I am receiving an "Undefined symbols" error. The stubbed out code
> below produces the error.
>
> Perhaps I have misunderstood the correct syntax for creating my
> OcciDml object? Or do I need to pass more arguments to g++?
>
> Thank you for any hints,
> Phil Lawrence
>
> $ ls
> OcciDml.cpp OcciDml.h occi_dump.cpp
>
> $ g++ occi_dump.cpp
> Undefined symbols:
> "OcciDml::displayAllRows(std::basic_string<cha r,
> std::char_traits<char>, std::allocator<char> > const&,
> std::basic_string<char, std::char_traits<char>, std::allocator<char> >
> const&)", referenced from:
> _main in cc0Rv5BL.o
> "OcciDml::OcciDml(std::basic_string<char, std::char_traits<char>,
> std::allocator<char> > const&)", referenced from:
> _main in cc0Rv5BL.o
> "OcciDml::~OcciDml()", referenced from:
> _main in cc0Rv5BL.o
> _main in cc0Rv5BL.o
> ld: symbol(s) not found
> collect2: ld returned 1 exit status
>
> [redacted]


While this properly belongs in gnu.g++., I'm in a generous mood
today. You didn't compile OcciDml.cpp with occi_dump.cpp, so of course
the symbols defined there aren't found.
  Réponse avec citation
 
Page generated in 0,86656 seconds with 9 queries