Purebasic lib extern exports

Just starting out? Need help? Post your questions and find answers here.
MushroomHead
User
User
Posts: 15
Joined: Wed Apr 27, 2005 2:55 pm

Purebasic lib extern exports

Post 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?!?).