PDA

View Full Version : How to access a libsofa.a from a C++ program?



jamadagni
19th March 2006, 10:48
I have created a library libsofa.a from numerous *.o files which were compiled from *.f (Fortran) files using GCC 4.1.

I would like to use the functions provided by this library in my C++ program.

Please tell me how I am to do it. Thank you.

dimitri
19th March 2006, 11:03
Just link your program with the library, qmake can help, use LIBS (http://doc.trolltech.com/4.1/qmake-variable-reference.html#libs). Does this help?

jamadagni
19th March 2006, 11:30
Just link your program with the library, qmake can help, use LIBS (http://doc.trolltech.com/4.1/qmake-variable-reference.html#libs). Does this help?
Yep, but if I need to pass the fortran function variables, arrays etc, can I use and pass C variables and they will be properly recognized?