Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Linking problems

g_vaz
Beginner
585 Views
Hello everybody:

I cannot link my code with my created .a libraries. However if I link directly with the .o files that are inside the .a files than it links. Is there any trick when considering user created .a libraries?

Thanks.

Guilherme Vaz
0 Kudos
2 Replies
Lorri_M_Intel
Employee
585 Views
There *shouldn't* be a difference between linking against .o and .a.
Can you post the error(s) you got, what version of Intel Fortran you are using, and what Linux distribution you have.
Thanks -
0 Kudos
g_vaz
Beginner
585 Views
I have Fedora Linux 3, ifort v8.1. First it was very difficult to link with the .a libraries that were in different folders. The options -L -l seem not to work (or I am doing something wrong and different to what what I use to do in Unix and a different compiler) and so I did manually: ifort procal_main.o -o procal ../IoLib/libIo.a If I do that it complains (several times): procal_main.o(.text+0x10a): In function `MAIN__': : undefined reference to `init_procal_' But if I copy all .o to the local folder and do: ifort procal_main.o *.o -o procal it works. Can you maybe give me a hint? Thanks. Guilherme
0 Kudos
Reply