os x - openlibrary

Everything else that doesn't fall into one of the other PB categories.
delikanli_19_82
User
User
Posts: 38
Joined: Tue Jun 21, 2011 6:11 pm

os x - openlibrary

Post by delikanli_19_82 »

hello guys,

i created a small test dll with a procedure:

Code: Select all

ProcedureDll IAmHere()
  MessageRequester("Really","I am here")
EndProcedure
And a test file:

Code: Select all

Prototype TestProc()

If OpenLibrary( 0, "testLIB.so" )
  Define Proc.TestProc = Getfunction( 0, "IamHere" )
EndIf

Proc()
Both files are in the same directory. also the compiled files are in the same directory.

But i cannot load the library. Error message: "invalid memory access".

OS X 10.6.8, PB 4.51

Has some one any idea?
User avatar
Rings
Moderator
Moderator
Posts: 1435
Joined: Sat Apr 26, 2003 1:11 am

Re: os x - openlibrary

Post by Rings »

delikanli_19_82 wrote: ProcedureDll IAmHere()
.....
Define Proc.TestProc = Getfunction( 0, "IamHere" )
case sensitive and you did not check the result of =GetFunction(...)
which should be a native adress in memory(for the dll-Proc)
SPAMINATOR NR.1
delikanli_19_82
User
User
Posts: 38
Joined: Tue Jun 21, 2011 6:11 pm

Re: os x - openlibrary

Post by delikanli_19_82 »

thanks
Post Reply