Page 1 of 1

Purebasic lib extern exports

Posted: Wed May 18, 2005 10:11 pm
by MushroomHead
I'm playing around with Purebasic's Library SDK and using the examples, have created a simple lib which returns int's, floats and strings. I want to know if it's possible to share variables between the lib and PB e.g. if I do something like this :-

Code: Select all

    extern int PB_TestVal;
How do I access the above variable inside PB? I have tried setting the value of TestVal inside the lib but everytime I try to retrive the contents, I get a zero (obviously it seems PB initializes a new variable of that name and is not accessing the lib?!?).