Home Forums C Programming templated functions & libraries

Viewing 0 reply threads
  • Author
    • #1957

      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:

      and  template void f(T var);  for the prototype.
      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

Viewing 0 reply threads
  • The forum ‘C Programming’ is closed to new topics and replies.