Hello,
I am actually ****ting a application from Windows to Mac using CodeWarrior.
I have some problems concerning the integration of the shared lib into
Excel
VBA.
I compiled a shared lib under CodeWarrior on the small code :
double fplus (double invalue)
{
return invalue + 1.0;
}
This function is ex****ted as the mangled name fplus__Fd (as I can see in
the PEFViewer)
I compared my shared lib to the CarbonLib, that comes with Microsoft
Office in /System/Library/CFMSup****t
MySharedLib and CarbonLib have the same features using GetFileInfo and
PEFViewer
When I try to call fplus in VBA (Mac Excel 2004), the call gets the Error
454 - code resource not found.
The call to the fabs in the CarbonLib works fine.
Both files are found, as there is no error 53 - File not found for
MySharedLib
Here is the vba example :
Declare Function fabs Lib "CarbonLib" (i As Double) As Double
Declare Function fplus__Fd Lib "MySharedLib" (i As Double) As Double
Sub test()
Dim fabval As Double
fabval = fabs(-345.45)
MsgBox " value " & fabval
fabval = fplus__Fd(234.3)
End Sub
---
Do you have a quick explanation how to do the integration ?
A simple example of some lines in C++ and some lines in VBA would be
great.
Or do you know a pointer to someone that could help me on this ?
Thanks in advance for your help.
Regards
Jürgen