Page 1 of 3
Userlibs
Posted: Sun Jun 15, 2003 9:40 am
by Polo
Is there a way to do userlibs with VC++ 6 ? I hate LCC

Re: Userlibs
Posted: Sun Jun 15, 2003 12:36 pm
by tinman
Polo wrote:Is there a way to do userlibs with VC++ 6 ? I hate LCC :)
Probably yes, as long as you keep to the naming convention and create a .lib file. I think LCC was used as the example because it is free and easy to get access to, and PureBasic uses the linker from it. But you should be able to use any compiler.
Posted: Sun Jun 15, 2003 1:54 pm
by Polo
Can someone do an example ?
I don't know how I could do that ...
Posted: Sun Jun 15, 2003 6:33 pm
by Polo
Perhaps Fred can answer this ??
Posted: Mon Jun 16, 2003 7:35 pm
by Polo
Please

Posted: Mon Jun 16, 2003 8:56 pm
by ricardo
Wow, i never think about this, but could be very nice to develope PB libs from VC++.
I hope we can get some details of the conventions, the rules, etc.
Im working in two VC++ dlls to use it in PB (one for making swf flash movies on runtime from PB and i have one released ActiveX2Dll) and could be very nice to have a way to make it as libraries!!!
This could let me release it as freeware for PB users!!
Yes, please some one gives us some info!!
Posted: Mon Jun 16, 2003 10:17 pm
by tinman
ricardo wrote:I hope we can get some details of the conventions, the rules, etc.
Does nobody look in the "Library SDK" drawer?
Posted: Mon Jun 16, 2003 10:59 pm
by Saboteur
I read it a lot, but I don't get anything

. I am using DevC++, and I'm interested too.
How did you learn, tinman???
Posted: Mon Jun 16, 2003 11:16 pm
by traumatic
what's your problem?
the last time I made a pb-lib in vc there wasn't any difference to lcc.

Posted: Mon Jun 16, 2003 11:22 pm
by traumatic
well, ok...
it's e.g. extern void_stdcall PB_FuncName() (vc) instead of
extern _stdcall void PB_FuncName() (lcc) and you shouldn't
forget extern "C"
and sorry, editing my previous post didn't work somehow
Posted: Tue Jun 17, 2003 11:52 am
by Polo
Can you post your code ? I make the change but it doesn't work :
purebasic.obj .text: undefined reference to "_PB_Function@12"
Well ...
Posted: Tue Jun 17, 2003 1:05 pm
by tinman
Saboteur wrote:I read it a lot, but I don't get anything :oops:. I am using DevC++, and I'm interested too.
How did you learn, tinman???
I read the readme and just went for it, writing a library. If you can code in C then you should be able to understand all that it says quite easily. If not, well then I guess you need to learn two things :)
You should also take a look at the "ASM library" section of the PB resources site (
http://www.reelmediaproductions.com/pb). Although it says ASM library, I'm sure there are libraries written in C there which you can use as examples.
Posted: Tue Jun 17, 2003 4:14 pm
by Saboteur
Ops...
I want to show you some code

, but when compiling in Windows 2000, the library works fine (aarrgh).
With DevC++ seems there are no problem, but I have to try at home with Win98. Win98 hang up with my libraries.
When I have some time, I post a full example (if nobody do it before

).
Posted: Tue Jun 17, 2003 5:13 pm
by Polo
Yes, because I'm waiting to do that since a long time

Posted: Tue Jun 17, 2003 5:52 pm
by tinman
Saboteur wrote:When I have some time, I post a full example (if nobody do it before ;) ).
Look at the resources site. Both of my libraries have been written in DevC++ and compile fine on my Win98 PC. No-one else has complained about them not working, but then I doubt anyone uses them :)