How to user libraries

How to user libraries

I have a program which calls several subroutines which are included in a user created library (.lib).
How do I make sure that the library is included with the compile/link so that the code will be able to execute the library subroutines? I have tried the following:
1. Included the library file (.lib) as a file in the project using Project/Add to Project/Files... menu option.
2. Using the Project/Settings menu option and the Link tab I specified the library name in the Object library modules text box and added the path to the library in the Additional Library path text box.
3. Copied the library file to the WINNTsystem32 directory.
4. Using the Tools/Options menu option and the Directories tab I added the path name of the library.
The program errors off when it tries to execute the first call to a subroutine in the library. Any help will be greatly appreciated. Thanks.


publicaciones de 2 / 0 nuevos
Último envío
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.

1) and 2) are OK. 3) does nothing -- don't do it. 4) is related with 2 -- if you enter a path there you must also specify name of the lib in 2); if you don't, you must specify full path of the lib in 2).

I don't think errors you get have anything to do with the way how you're telling linker where to get library. You can add path to .lib's source files in Directories/Source Files dialog so you can debug it.

If your library consists of MODULEs, you must also incorporate .mod files from the .lib in "Project Settings/Fortran/Preprocessor/Additional Include Paths" or "Tools/Options/Directories/Source files" -- but you couldn't even build your project if that's the case.


Deje un comentario

Por favor inicie sesión para agregar un comentario. ¿No es socio? Únase ya