DLL exporting only certain templatized functions
<p>Hey all, so this seems to be a rather strange issue to me. I have a very simple templatized container class which is part of a DLL. The entire class is defined in a header file, to allow automatic template generation. Now another part of the DLL actually requests a certain template type to be generated, so the code should exist within the DLL. However, when using the object from another executable, the constructor/destructor, plus multiple other functions work, however 2 functions are not found by the linker. Following are is the code for these two functions, as well as for a working function.</p>

<pre><code>const T** getData() const
{
 return m_data;
}

int getNumRows() const
{
 return m_nRows;
}

int getNumCols() const
{
 return m_nCols;
}
</code></pre>

<p>So the getNumRows() and getNumCols() functions are not found by the linker, however the getData() function is. Is this a common problem, do the functions need to have a templatized parameter in order to be generated?</p>

<p>@1 800 INFORMATION</p>

<p>I have exported this from the DLL via a standard macro:</p>

<pre><code>#ifdef ACORE_EXPORTS
#define ACORE_API __declspec(dllexport)
#else
#define ACORE_API __declspec(dllimport)
#endif
</code></pre>

<p>And at the class definition:</p>

<pre><code>template &lt; class T &gt;
class ACORE_API matrix
</code></pre>
