- This topic has 0 replies, 1 voice, and was last updated 17 years, 10 months ago by .
Viewing 0 reply threads
Viewing 0 reply threads
- The forum ‘C Programming’ is closed to new topics and replies.
Home › Forums › C Programming › templated functions & libraries
I created a templated func that works just fine when placed in a .H file or .CPP file, but when I place it in a .LIB file (and include the function prototype in the file using it) it won’t work.
For example:
1 2 3 4 | template <class T> void f(T var)<br /> {<br /> .... do something....; return;<br /> }</class> |
and template
But I get an error saying that the external function is undefined, or something like that (basically that it can’t access the function in the library).
I am using Borland C++BuilderX, which is a suite (not sure which version compiler) and I have gotten other functions to work w/ .libs and templated funcs to work while not in a .lib. How might I fix this problem?
Matthew Todd