[CMake] getting undefined error to my own libs.

Eric Noulard eric.noulard at gmail.com
Tue Dec 29 10:16:41 EST 2009


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