Tuesday, February 27, 2018

compiler construction - Compiling .cc files?

guys i am having a weird problem it has been working fine but suddenly messed up
Here is the problem. I have test.h and test.cc and mainP.cc.



In mainP.cc:



#ifndef test_H

#include "test.h"
#endif


in test.h:



#ifndef test_H
#define test_H



in test.cc:



#ifndef test_H
#include "test.h"
#endif


now when I say test tInstance; it gives me undefined reference to test::test();
I checked my def. constr. is public . everything looks ok to me. I am not sure what i wrong? i use g++ to compile it.

No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...