Mac OSX PB users

Mac OSX specific forum
SEO
Enthusiast
Enthusiast
Posts: 178
Joined: Fri Dec 09, 2005 11:42 pm
Location: Sweden
Contact:

Post by SEO »

Hi again,

CarbonLib - I get in problem the pbsoimporter generate an error msg 'Cant Open File and the hang....


Dylibs -
Here is an testDylib

Code: Select all

#include "SampleDylib.h"
#include <string.h>

int addFunction( int a, int b ) {
      return a + b;
  }


  int stringLength( char *str ) {
      return strlen(str);
  }
  

two functions that return an integer

How do i assign the returned value to myValue??


Code: Select all

If OpenLibrary(0, "test.dynlib") 
  FunctionPointer = IsFunction(0, "MyFunc") 
  If FunctionPointer 
  CallFunctionFast(FunctionPointer, Arg1, Arg2) 
  EndIf 
EndIf

More next day, thanks.. time for sleep...
Regards,
SEO
Fred
Administrator
Administrator
Posts: 16686
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

1) Which commandline did you typed for the CarbonLib stuff ?

2) just do:

Code: Select all

ReturnValue = CallFunctionFast(....)
Of course in IsFunction() you have to put the name of your function (here "addFunction" or "stringLength").
SEO
Enthusiast
Enthusiast
Posts: 178
Joined: Fri Dec 09, 2005 11:42 pm
Location: Sweden
Contact:

Post by SEO »

Carbon -
/Development/purebasic/compilers/pbsoimporter carbonx.pbl /TO /Development/purebasic


Dylibs, Thanks.. I should compile my dylib and check if it works..

Regards,
SEO
SEO
Enthusiast
Enthusiast
Posts: 178
Joined: Fri Dec 09, 2005 11:42 pm
Location: Sweden
Contact:

Post by SEO »

Sorry I forgotten..

I have the .pbl file in the same folder as pbsoimporter
Fred
Administrator
Administrator
Posts: 16686
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

could you try to put an absolute path for the 'carbonx' file ?
dmoc
Enthusiast
Enthusiast
Posts: 739
Joined: Sat Apr 26, 2003 12:40 am

Post by dmoc »

I did test it some time ago, sure I posted something about results (I think?), but since my interest is limited to OpenGL support I may not have done a very thorough test. Can anyone tell me if they have had any success with PB+OpenGL on 10.3?
SEO
Enthusiast
Enthusiast
Posts: 178
Joined: Fri Dec 09, 2005 11:42 pm
Location: Sweden
Contact:

Post by SEO »

Hi again,

Using an Absolute path:
Then pbsoimporter working using about 70% CPU and Memory growing up from 3MB to after 3-4 minutes to about 90MB of RAM...

Working and working without an End, Why??
Looks like an LineEndings problem....

1 - Save the textfiles with DOS linebreaks!
Then I get an new error in one second ....
Something like "Can't create .... /linux/......

2 - Created an linux folder .... And then it look to works...

Regards,
SEO
Post Reply