C
Chirag
Hi,
I am looking for an example that successfully calls a function in a .dylib
file from VBA in PPT 2004 running on Snow Leopard. I tried the following:
1. Created a simple class.dylib file in Xcode that exports just one function
"abc" that returns a constant integer.
2. In VBA, I "imported" the function as follows:
Declare Function abc Lib "class.dylib" Alias "_abc" () As Long
I get the following error when trying to call the function abc():
File not found "class.dylib"
I tried the following and its various combinations:
1. Tried to place the class.dylib file in various locations:
/usr/lib, ~/lib/, in the same folder as the .ppt file and ensured that
CurDir() returns the class.dylib path.
2. Tried to include the complete path to class.dylib file in the
"class.dylib" part of the declaration above as:
Declare Function abc Lib "Macintosh HD:usr:lib:class.dylib" Alias "_abc" ()
As Long
Declare Function abc Lib "/usr/lib/class.dylib" Alias "_abc" () As Long
3. I even removed the .dylib file extension in the declaration just in case
that could be the issue.
4. Since Rosetta is running PPT 2004, I thought that I would require a ppc
binary of class.dylib file to get it imported in PPT 2004. But that too
didn't work.
5. I also tried calling a function in libc.dylib but still get the same
"File not found libc.dylib" error.
- Chirag
I am looking for an example that successfully calls a function in a .dylib
file from VBA in PPT 2004 running on Snow Leopard. I tried the following:
1. Created a simple class.dylib file in Xcode that exports just one function
"abc" that returns a constant integer.
2. In VBA, I "imported" the function as follows:
Declare Function abc Lib "class.dylib" Alias "_abc" () As Long
I get the following error when trying to call the function abc():
File not found "class.dylib"
I tried the following and its various combinations:
1. Tried to place the class.dylib file in various locations:
/usr/lib, ~/lib/, in the same folder as the .ppt file and ensured that
CurDir() returns the class.dylib path.
2. Tried to include the complete path to class.dylib file in the
"class.dylib" part of the declaration above as:
Declare Function abc Lib "Macintosh HD:usr:lib:class.dylib" Alias "_abc" ()
As Long
Declare Function abc Lib "/usr/lib/class.dylib" Alias "_abc" () As Long
3. I even removed the .dylib file extension in the declaration just in case
that could be the issue.
4. Since Rosetta is running PPT 2004, I thought that I would require a ppc
binary of class.dylib file to get it imported in PPT 2004. But that too
didn't work.
5. I also tried calling a function in libc.dylib but still get the same
"File not found libc.dylib" error.
- Chirag