Userlibs

Everything else that doesn't fall into one of the other PB categories.
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Userlibs

Post by Polo »

Is there a way to do userlibs with VC++ 6 ? I hate LCC :)
User avatar
tinman
PureBasic Expert
PureBasic Expert
Posts: 1102
Joined: Sat Apr 26, 2003 4:56 pm
Location: Level 5 of Robot Hell
Contact:

Re: Userlibs

Post 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.
If you paint your butt blue and glue the hole shut you just themed your ass but lost the functionality.
(WinXPhSP3 PB5.20b14)
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Post by Polo »

Can someone do an example ?
I don't know how I could do that ...
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Post by Polo »

Perhaps Fred can answer this ??
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Post by Polo »

Please :?:
ricardo
Addict
Addict
Posts: 2438
Joined: Fri Apr 25, 2003 7:06 pm
Location: Argentina

Post 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!!
ARGENTINA WORLD CHAMPION
User avatar
tinman
PureBasic Expert
PureBasic Expert
Posts: 1102
Joined: Sat Apr 26, 2003 4:56 pm
Location: Level 5 of Robot Hell
Contact:

Post 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?
If you paint your butt blue and glue the hole shut you just themed your ass but lost the functionality.
(WinXPhSP3 PB5.20b14)
Saboteur
Enthusiast
Enthusiast
Posts: 273
Joined: Fri Apr 25, 2003 7:09 pm
Location: (Madrid) Spain
Contact:

Post by Saboteur »

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???
[:: PB Registered ::]

Win10 Intel core i5-3330 8GB RAM Nvidia GTX 1050Ti
traumatic
PureBasic Expert
PureBasic Expert
Posts: 1661
Joined: Sun Apr 27, 2003 4:41 pm
Location: Germany
Contact:

Post by traumatic »

what's your problem?
the last time I made a pb-lib in vc there wasn't any difference to lcc.

:?:
Good programmers don't comment their code. It was hard to write, should be hard to read.
traumatic
PureBasic Expert
PureBasic Expert
Posts: 1661
Joined: Sun Apr 27, 2003 4:41 pm
Location: Germany
Contact:

Post 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
Good programmers don't comment their code. It was hard to write, should be hard to read.
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Post 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 ...
User avatar
tinman
PureBasic Expert
PureBasic Expert
Posts: 1102
Joined: Sat Apr 26, 2003 4:56 pm
Location: Level 5 of Robot Hell
Contact:

Post 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.
If you paint your butt blue and glue the hole shut you just themed your ass but lost the functionality.
(WinXPhSP3 PB5.20b14)
Saboteur
Enthusiast
Enthusiast
Posts: 273
Joined: Fri Apr 25, 2003 7:09 pm
Location: (Madrid) Spain
Contact:

Post by Saboteur »

Ops...
I want to show you some code :twisted:, 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 ;) ).
[:: PB Registered ::]

Win10 Intel core i5-3330 8GB RAM Nvidia GTX 1050Ti
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Post by Polo »

Yes, because I'm waiting to do that since a long time :cry:
User avatar
tinman
PureBasic Expert
PureBasic Expert
Posts: 1102
Joined: Sat Apr 26, 2003 4:56 pm
Location: Level 5 of Robot Hell
Contact:

Post 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 :)
If you paint your butt blue and glue the hole shut you just themed your ass but lost the functionality.
(WinXPhSP3 PB5.20b14)
Post Reply