<font size=2 face="sans-serif">With templates it's easiest to declare
and implement in one file. The compiler likes this. Anything else you try
requires extra work. Unless you're working in an embedded environment I
don't see how executable size should even be a concern.</font>
<br><font size=2 face="sans-serif">---------------------------------------------------------<br>
Aaron Wright</font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>&quot;eial@cs.bgu.ac.il&quot;
&lt;eial@cs.bgu.ac.il&gt;</b> </font>
<p><font size=1 face="sans-serif">12/29/2009 09:11 AM</font>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td><font size=1 face="sans-serif">Aaron_Wright@selinc.com</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td><font size=1 face="sans-serif">cmake@cmake.org</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td><font size=1 face="sans-serif">Re: [CMake] getting undefined error
to my own libs.</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><font size=3>I'm trying to refrain from using that because it can bloat
up the executable size... unless you can tell me otherwise. in general
the program will be compiled using g++ for now, maybe I'll add support
for windows compiler later.<br>
also, I'm trying to keep the definitions to the header files and the code
to the src files.</font>
<br><font size=3 color=#4f4f4f>On <i>Tue 29 Dec 18:59 2009</i> <b>Aaron_Wright@selinc.com</b>
wrote:</font>
<br><font size=2 face="sans-serif">Just put the implementation of the template
class in the declaration. Get that to work, then try to get fancy if you
want to.</font><font size=3> </font><font size=2 face="sans-serif"><br>
---------------------------------------------------------<br>
Aaron Wright</font><font size=3> <br>
<br>
</font>
<table width=100%>
<tr valign=top>
<td width=97%><font size=1 face="sans-serif"><b>&quot;eial@cs.bgu.ac.il&quot;
&lt;eial@cs.bgu.ac.il&gt;</b> <br>
Sent by: cmake-bounces@cmake.org</font><font size=3> </font>
<p><font size=1 face="sans-serif">12/29/2009 08:54 AM</font><font size=3>
</font>
<td width=2%></table>
<p>
<table width=100%>
<tr valign=top>
<td width=13%>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td width=86%><font size=1 face="sans-serif">Eric Noulard &lt;eric.noulard@gmail.com&gt;</font><font size=3>
</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td><font size=1 face="sans-serif">cmake@cmake.org</font><font size=3>
</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td><font size=1 face="sans-serif">Re: [CMake] getting undefined error
to my own libs.</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br><font size=3><br>
<br>
<br>
</font><tt><font size=2><br>
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: </font></tt><a href="http://www.parashift.com/c++-faq-lite/templates.html#faq-35.13"><tt><font size=2 color=blue><u>http://www.parashift.com/c++-faq-lite/templates.html#faq-35.13</u></font></tt></a><tt><font size=2>
I see that what I've did is the same, isn't it? <br>
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.<br>
when I add extern to the deceleration in the header, I get this error:
storage class specified for `Array`<br>
<br>
On Tue 29 Dec 17:16 2009 Eric Noulard wrote:<br>
&gt; 2009/12/29 eial@cs.bgu.ac.il &lt;eial@cs.bgu.ac.il&gt;:<br>
&gt; &gt; hello Eric, thanks for the response.<br>
&gt; &gt; 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).<br>
&gt; &gt; here are the array files content: </font></tt><a href=http://codepad.org/klDWMowB><tt><font size=2 color=blue><u>http://codepad.org/klDWMowB</u></font></tt></a><tt><font size=2><br>
&gt; <br>
&gt; I assume the content of the .hpp is between #ifndef CARRAY_HPP<br>
&gt; then the code is the .cpp file.<br>
&gt; <br>
&gt; The trouble comes from the fact that your class is a template one,<br>
&gt; so that the content of the .cpp file may not be compiled independently<br>
&gt; &quot;as-is&quot; because it must be instantiated first.<br>
&gt; <br>
&gt; I invite you to read this:<br>
&gt; </font></tt><a href="http://www.parashift.com/c++-faq-lite/templates.html#faq-35.12"><tt><font size=2 color=blue><u>http://www.parashift.com/c++-faq-lite/templates.html#faq-35.12</u></font></tt></a><tt><font size=2><br>
&gt; and may be this one too:<br>
&gt; </font></tt><a href=http://corfield.org/index.cfm/event/cplusplus.section/section/ptexp><tt><font size=2 color=blue><u>http://corfield.org/index.cfm/event/cplusplus.section/section/ptexp</u></font></tt></a><tt><font size=2><br>
&gt; <br>
&gt; Note that the &quot;export keyword&quot; solution may not be a good
one<br>
&gt; because many compilers do not implement it, beginning with gcc:<br>
&gt; </font></tt><a href=http://gcc.gnu.org/bugs/#nonbugs_cxx><tt><font size=2 color=blue><u>http://gcc.gnu.org/bugs/#nonbugs_cxx</u></font></tt></a><tt><font size=2><br>
&gt; <br>
&gt; &gt; beside a strange typo that I've done, I don't thing I've miss
configured it somehow.<br>
&gt; <br>
&gt; I think may be you did not played a lot with templated classes.<br>
&gt; (just a guess I may be wrong).<br>
&gt; <br>
&gt; Concerning this issue, I'm pretty sure this is not a CMake one.<br>
&gt; <br>
&gt; -- <br>
&gt; Erk<br>
&gt; Membre de l'April - « promouvoir et défendre le logiciel libre » -<br>
&gt; </font></tt><a href=http://www.april.org/><tt><font size=2 color=blue><u>http://www.april.org</u></font></tt></a><tt><font size=2><br>
&gt; <br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
Powered by </font></tt><a href=www.kitware.com><tt><font size=2 color=blue><u>www.kitware.com</u></font></tt></a><tt><font size=2><br>
<br>
Visit other Kitware open-source projects at </font></tt><a href=http://www.kitware.com/opensource/opensource.html><tt><font size=2 color=blue><u>http://www.kitware.com/opensource/opensource.html</u></font></tt></a><tt><font size=2><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: </font></tt><a href=http://www.cmake.org/Wiki/CMake_FAQ><tt><font size=2 color=blue><u>http://www.cmake.org/Wiki/CMake_FAQ</u></font></tt></a><tt><font size=2><br>
<br>
Follow this link to subscribe/unsubscribe:</font></tt><font size=3 color=blue><u><br>
</u></font><a href=http://www.cmake.org/mailman/listinfo/cmake><tt><font size=2 color=blue><u>http://www.cmake.org/mailman/listinfo/cmake</u></font></tt></a><font size=3>
</font>
<br><tt><font size=3><br>
<br>
</font></tt>
<br>