public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Undefined reference to template function ...
@ 2011-05-30  8:32 Her, Il
  2011-05-31  8:53 ` Ian Lance Taylor
  0 siblings, 1 reply; 8+ messages in thread
From: Her, Il @ 2011-05-30  8:32 UTC (permalink / raw)
  To: gcc-help


Hello, gcc-help.

I experienced "undefined reference to template function ." when I am compiling my program
with gcc 4.1.2. 

Almost everyone says 
that's because template functions weren't be implemented in the same unit where they are
prototyped. (I used .cpp file for implementation and .h file for declaration).

But, It works if I use gcc 3.4.6 compiler without any change of options.
Why is this happening?...
I am working with my customer, I can't make them understand the common rule for using template
because it works on gcc 3.4.6.

Can you explain this situation to me? 
(Something like it is changed after 4.0 or you have any options to avoid this.)

Please, help me.

Thank you.

Her, Il
Technology Consulting
Technology Service Korea

TEL  : +82-2-2199-4475
Mobile : +82-10-4765-5597
il.her@hp.com


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-06-01 13:23 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-30  8:32 Undefined reference to template function Her, Il
2011-05-31  8:53 ` Ian Lance Taylor
2011-05-31 12:21   ` Her, Il
2011-05-31 12:44     ` Axel Freyn
2011-05-31 15:29     ` Ian Lance Taylor
2011-06-01  1:03       ` Her, Il
2011-06-01  8:45         ` Axel Freyn
2011-06-01 13:23           ` Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).