I don't know the specifics of the IDE you are using. However, regardless of whether func.lib is a static library or an implementation library, there has to be a place in the linker's settings for adding the location on disk (path) of the func.lib file. Furthermore, there has to be another setting for specifying linker flags or linker include libraries. You will type func in this setting (I know you do not need to specify the .lib part for gcc). Often times, the linker settings are found bundled with the compiler settings in many IDEs. I would appreciate it if someone posts the specific instructions for turbo c++. Alternatively, you can create a small Makefile for your project that includes the LDFLAG and feed it to gcc through make.
Why is it that you are experiencing this issue? Well, the #include directive is only used for header files. The way the traditional compilation process work is that you write some code, let's say in test.cc. Then, you feed this code file to a compiler, such as g++. The compiler doesn't need to know whether func.lib exists. Instead, it just needs to know the type return by the function you invoke and the number of arguments and their types in such function. At this stage, the compiler finds this information in func.h, which is the header file where you declared int prime(int) and long fact(long). The compiler spews out the machine-code representation of what you wrote and calls the linker. The linker is a program that works like a sort of book assembler. Each machine-code representation (.o, .obj, .lib, and .a files) are similar to book chapters. The linker starts sticking the code you wrote(which is now in the form of .o) together in order to produce the book called YourProgram (which is of the form .exe if working in a Windows environment). However, once in a while, it will find references to chapters you did not wrote or you wrote separately (func.lib) and it won't know what to do. If you specified the filepath to func.lib in your settings, it will be the same as if you told the linker, "Look, the chapter of the book you are desperately looking for is in this other book. Please, make a copy of it and stick it into the book you are currently assembling!" That's what the compiler does. Its product is the working program you can then run! I hope this analogy clarifies the process and gives you a hint as to what you must find in the compiler's/ linker's setting feature of your IDE. Maybe, try googling for "turbo c++ linker settings menu"? Cheers!
P.S. I forgot to say that the #include directive actually tells the compiler to call another program that searches for the header file (technically speaking a text file) you specify and copy and paste it on your source code (noname00.cpp?). This is the same program that later edits the cpp file by interpreting other directives like #ifdef #endif macro blocks!