Tuesday, 27 February 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

casting - Why wasn't Tobey Maguire in The Amazing Spider-Man? - Movies & TV

In the Spider-Man franchise, Tobey Maguire is an outstanding performer as a Spider-Man and also reprised his role in the sequels Spider-Man...