- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Hi, I'm trying to link a library to my fortran code in this way:
ifort main.f90 -o main -L/home/dirLib my_lib.a
I certainly know that my_lib.a is in that directory and there's no blank space between -L and the name of the directory but I receive this message
ld: my_lib.a: No such file: No such file or directory
Thanks
ifort main.f90 -o main -L/home/dirLib my_lib.a
I certainly know that my_lib.a is in that directory and there's no blank space between -L and the name of the directory but I receive this message
ld: my_lib.a: No such file: No such file or directory
Thanks
Link kopiert
2 Antworten
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
This is a standard Unix/linux feature. -Lyourlibdir works with the special syntax -lyourlib, which searches for yourlibdir/libyourlib.a and libyourlib.so. In addition, linux ld doesn't handle non-standard variations in order of options. Details may be found in 'info ld'. If you don't want to use the -L syntax, you simply give the full path name of the library:
ifort -o main main.f90 /home/dirLib/my_lib.a
ifort -o main main.f90 /home/dirLib/my_lib.a
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Thanks a lot, now it works ok
Antworten
Themen-Optionen
- RSS-Feed abonnieren
- Thema als neu kennzeichnen
- Thema als gelesen kennzeichnen
- Diesen Thema für aktuellen Benutzer floaten
- Lesezeichen
- Abonnieren
- Drucker-Anzeigeseite