c++ - undefined reference 'OpenNIProcessor::run()' -


i have created header file 'openniprocessor.h' , have declared run() method in headerfile.

the error-message is: main.cpp: undefined reference 'openniprocessor::run()'

openniprocessor.h

class openniprocessor {     public:         void cloud_cb_ (const pcl::pointcloud<pcl::pointxyzrgba>::constptr &cloud);         void run();     protected:     private: }; 

openniprocessor.cpp

class openniprocessor {     public:     void cloud_cb_ (const pcl::pointcloud<pcl::pointxyzrgba>::constptr &cloud)     {         ....     }      void run ()     {      ....     } } 

main.cpp

int main() {     openniprocessor v;     v.run();     return(0); } 

you have rewrite code in file openniprocessor.cpp follows:

void openniprocessor::cloud_cb_                    (const pcl::pointcloud<pcl::pointxyzrgba>::constptr &cloud)     {         ....     }      void openniprocessor::run ()     {      ....     } 

Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -