Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Codewarrior Palm > _foo referenced...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 705 of 718
Post > Topic >>

_foo referenced from _bar is undefined (again)

by "kordeul" <tkragelj@[EMAIL PROTECTED] > Aug 1, 2006 at 11:53 PM

Hi all

I get this linker error in my project and I'm unable to find the reason
for it. I checked all topics in this list but without any success. The
problem looks like this (this is a simplified version with just the
basic code related to the error):

---- Arrays.h ----

template <class T>
class Array
{
public:
   Array();
};

---- Arrays.cpp ----

template <class T>
Array<T>::Array()
{
}

---- MyApp.cpp ----

#include "Arrays.h"

void SomeFunc()
{
    Array<int>* array = new Array<int>();
}

This compiles ok, but the linker complains with the error:
"MyApp.cpp: 'Array<int>::Array()' referenced rom 'SomeFunc' is
undefined."

I use CW 8.2 and SDK 5r3. I can solve the problem by moving all Array
related functions to the Array.h and inline them, but it looks like I
always end with this problem after a while (with a different class).
What am I missing?
 




 1 Posts in Topic:
_foo referenced from _bar is undefined (again)
"kordeul" <t  2006-08-01 23:53:40 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 25 19:50:20 CDT 2008.