Re: C++ and Fortran - Help linking files
Re: C++ and Fortran - Help linking files
- Subject: Re: C++ and Fortran - Help linking files
- From: Roland King <email@hidden>
- Date: Sat, 12 Nov 2016 10:37:26 +0800
From what you have written below it seems you have a bigger issue that you’re not actually linking the fortran compiled output with the C at all. In which case the reason those symbols aren’t found is because you’re not giving the linker a module which contains them, whatever they are called. What’s the compile line for the fortran and what’s the link line. If you are compiling them then the .o files are somewhere in the DerivedData folder for the project which indeed is under ~/Library.
Finally, I realize I may be on a wild goose chase with regard the linker issue.
Swift is going to require the LLVM linker whereas fortran will require gfortran or gcc.
Oh well. I was hoping to put a GUI on my command line program.
I may need to go the f2c route. Convert the fortran code to C and then link it with a bridging file to Swift.
Thanks for your help, David
The linker doesn’t matter all, is there even an LLVM linker, I don’t remember whether there is or it just uses ld like everything else. Either way that’s irrelevant, if you provide the object files (.o) with the correct exported external names (BIND or some other method) it doesn’t matter if you wrote them in C, C++, FORTRAN, assembler or French, the linker will link them.
I think you should go back to looking at the actual commands issued during the build to see what’s going on, it looks to me like you’re not including the object files at all. |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden