[CMake] getting undefined error to my own libs.

eial at cs.bgu.ac.il eial at cs.bgu.ac.il
Tue Dec 29 11:54:01 EST 2009


ok, I've read the links, let say I'm not use the export option, when I look at the how to avoid link errors here: http://www.parashift.com/c++-faq-lite/templates.html#faq-35.13 I see that what I've did is the same, isn't it? 
I'm not sure where to follow from here... if I've did what they say and I still get a undefined error, then I must have miss configured cmake.
when I add extern to the deceleration in the header, I get this error: storage class specified for `Array`

On Tue 29 Dec 17:16 2009 Eric Noulard wrote:
> 2009/12/29 eial at cs.bgu.ac.il <eial at cs.bgu.ac.il>:
> > hello Eric, thanks for the response.
> > I'd like to solve the Array issue first, then the boost because I have a feeling it is a different one because when I disable the relevant code it doesn't generates the error even when other parts of the program (such as the threadpool).
> > here are the array files content: http://codepad.org/klDWMowB
> 
> I assume the content of the .hpp is between #ifndef CARRAY_HPP
> then the code is the .cpp file.
> 
> The trouble comes from the fact that your class is a template one,
> so that the content of the .cpp file may not be compiled independently
> "as-is" because it must be instantiated first.
> 
> I invite you to read this:
> http://www.parashift.com/c++-faq-lite/templates.html#faq-35.12
> and may be this one too:
> http://corfield.org/index.cfm/event/cplusplus.section/section/ptexp
> 
> Note that the "export keyword" solution may not be a good one
> because many compilers do not implement it, beginning with gcc:
> http://gcc.gnu.org/bugs/#nonbugs_cxx
> 
> > beside a strange typo that I've done, I don't thing I've miss configured it somehow.
> 
> I think may be you did not played a lot with templated classes.
> (just a guess I may be wrong).
> 
> Concerning this issue, I'm pretty sure this is not a CMake one.
> 
> -- 
> Erk
> Membre de l'April - « promouvoir et défendre le logiciel libre » -
> http://www.april.org
> 






More information about the CMake mailing list