This location is automatically searched by Excel. !DEC$ ATTRIBUTES C, DECORATE, ALIAS:'mySub' ::mySubĬompile the fortran code: ifort -dynamiclib -m32 mySub.for and rename myLib.dylib (how do I make it name it in the commandline?) Place myLib.dylib in ~/lib folder (create it in your home directory). Private Declare Sub mySub Lib "myLib.dylib" (ByVal myString As String, StringLength As Long) 'strings usually are passed a hidden 2nd string lengthĬall mySub(str, Len(str)) ' also seen as mySub(str, 8&) - which I also have no success with I can get functions to work passing doubles and singles. Even code that works in MS Visual Studio and Intel Fortran does not work with strings on the Mac side as it appears it should with minor changes. I have a lot of existing Excel VBA code calling DLL's on Windows and I want to port these to Mac Excel. I have searched the forums as well as the net at large and learned a lot, but some sample code would help tremendously for me. Workbooks with these custom functions can be saved as XLAM files and made available to all workbooks. Microsoft Office 2011 for Mac now allows VBA calls to external dynamic libraries.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |