- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I am trying to compile a program with ifort on a mac intel (os X) and I want to link a library that I have generated:
Thanks in advance for any suggestion!
I am trying to compile a program with ifort on a mac intel (os X) and I want to link a library that I have generated:
ifort -Vaxlib -O3 -W0 -arch x86_64 cosmo.o main.f90I got the following message:
-L/Users/alain/ablancha/util/F90 -lmylib90 -o toto
ld64 warning: in /Users/alain/ablancha/util/F90/libmylib90.a, file is not of required architectureThe library has been obtained by:
ifort -c -u -w -O3 -vec-report0 -arch x86_64 example.f90the option
ar -cr libmylib90.a *.o
ranlib libmylib90.a
-arch x86_64was added in a attempt to solve the problem, but this had no effect. A friend of mine has no problem with the same operation on linux.
Thanks in advance for any suggestion!
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ifort uses (only) environment paths to make the choice between 32- and 64-bit compilation.
The -Vaxlib option went away long before mac was supported.
It does look as if the .a has a 32-bit object. You should be able to find it by
file *.o
The -Vaxlib option went away long before mac was supported.
It does look as if the .a has a 32-bit object. You should be able to find it by
file *.o
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for this comment.
Indeed, it seems to have something to do with the 32-bit versus 64.
I first thought to have download a wrong version of ifort.
But this seems not to be the explanation. When I compile with :
Indeed, it seems to have something to do with the 32-bit versus 64.
I first thought to have download a wrong version of ifort.
But this seems not to be the explanation. When I compile with :
-u -w -O3 -vec-report0 -m32aand ask for file *.O, I got:
Mach-O 64-bit object x86_64which I understand as the compilation was 64-bit, while my mac is an Intel Core 2 Duo, so a 32 bit proc. Could this be the source of the trouble ? I do not know what 32-bit and 64-bit compilation actually mean. Is this related to the architecture of the proc ? Than I would expect to have a "32-bit object".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There's only one download for Mac which provides both the 32-bit and 64-bit compilers and libraries. You select the one you want with the appropriate "source" command - the path with /fc/ for 32-bit and the path with /fce/ for 64-bit.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you very much that has solved the issue.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page