Page 3 of 3

Posted: Wed Dec 14, 2005 1:23 am
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

Posted: Wed Dec 14, 2005 1:31 am
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").

Posted: Wed Dec 14, 2005 1:39 am
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

Posted: Wed Dec 14, 2005 1:41 am
by SEO
Sorry I forgotten..

I have the .pbl file in the same folder as pbsoimporter

Posted: Wed Dec 14, 2005 12:00 pm
by Fred
could you try to put an absolute path for the 'carbonx' file ?

Posted: Wed Dec 14, 2005 1:00 pm
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?

Posted: Wed Dec 14, 2005 1:07 pm
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