C++ to PB
-
- User
- Posts: 21
- Joined: Sun Aug 10, 2003 11:45 am
- Location: France
- Contact:
C++ to PB
Does there is a utility to convert a C++ header (external DLL declaration) into PureBasic?
Patrice Terrier
objreader@gmail.com
http://www.objreader.com
Addon: WinLIFT (Skin Engine), GDImage (Graphic library), ObjReader (3D engine)
objreader@gmail.com
http://www.objreader.com
Addon: WinLIFT (Skin Engine), GDImage (Graphic library), ObjReader (3D engine)
Re: C++ to PB
Not that I am aware of, but that does not mean it doesn't exist. It would be a very handy thing.
Best wishes to the PB community. Thank you for the memories. 
Re: C++ to PB
I just browsed http://purearea.net/pb/english/index.htm and did not see anything that stood out.
Best wishes to the PB community. Thank you for the memories. 
Re: C++ to PB
PureBasic\SDK\Header Converter\Header Converter.exe
-
- User
- Posts: 21
- Joined: Sun Aug 10, 2003 11:45 am
- Location: France
- Contact:
Re: C++ to PB
Thank you for the answers.
Unfortunatly I couldn't get "Header Converter.exe" to work with my C++ Visual Studio 2022 headers.
Unfortunatly I couldn't get "Header Converter.exe" to work with my C++ Visual Studio 2022 headers.
Patrice Terrier
objreader@gmail.com
http://www.objreader.com
Addon: WinLIFT (Skin Engine), GDImage (Graphic library), ObjReader (3D engine)
objreader@gmail.com
http://www.objreader.com
Addon: WinLIFT (Skin Engine), GDImage (Graphic library), ObjReader (3D engine)
Re: C++ to PB
I couldn't get it to convert a C header or maybe we're not understanding "Header Converter.exe" and it's intended purpose, it might be for just general purpose header conversions that doesn't take into account the nuances of more complex headers and it's bailing out, as I've given it a header output folders not sure what 'validation files path' is in aide of at a guess it might be something to cross check structures or what have you are of the right sizes, but as I said I've not been able to get it to output anything, is the source available for header converter.exe?Patrice Terrier wrote: Fri Nov 17, 2023 1:48 pm Thank you for the answers.
Unfortunatly I couldn't get "Header Converter.exe" to work with my C++ Visual Studio 2022 headers.
Re: C++ to PB
It's a very old tool which was useful at time to mass convert constants and structs, but it's probably not working anymore with current headers. I will remove it from the SDK
Re: C++ to PB
Why remove it, you can still use it for old header files.Fred wrote: Thu Nov 30, 2023 3:23 pm It's a very old tool which was useful at time to mass convert constants and structs, but it's probably not working anymore with current headers. I will remove it from the SDK
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Re: C++ to PB
If people insert beer I will write a header converter, I have already scoped out a solution a few months ago that will work but I've not had the motivation to do it and I was waiting to see where Fred's heading with 6.10 but I've come to the conclusion an auto importer would actually be more beneficial than including c directly as it requires a full c compiler suite or at least the right system headers. It will take around 6 to 8 weeks to do. But will probably get results in a week it's dealing with edge cases and ambiguities that will take time as you've got to find them.
Re: C++ to PB
@Idle,
Where should I send the beer

Where should I send the beer


My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Re: C++ to PB
Pour it in the funnel that's attached to the hose in my mouth.
Re: C++ to PB
Beer+ ( generic beer, unless there is a specific place/brand for said pitcher/Barrel of beer)
google Translate;Makes my jokes fall flat- Fait mes blagues tombent à plat- Machte meine Witze verpuffen- Eh cumpari ci vo sunari
Re: C++ to PB
now that would be of immense help I'm (as you might know) forever trying to 'Purify' all sorts of .libs/.dlls the most time consuming part is converting .h files their a nightmare when you don't exactly know what a type a variable is supposed to be, sometimes it's like a treasure hunt trying to nail down what someone has typedef as lollipop only to discover an hour later that it's simply at unsigned intidle wrote: Thu Nov 30, 2023 8:17 pm If people insert beer I will write a header converter, I have already scoped out a solution a few months ago that will work but I've not had the motivation to do it and I was waiting to see where Fred's heading with 6.10 but I've come to the conclusion an auto importer would actually be more beneficial than including c directly as it requires a full c compiler suite or at least the right system headers. It will take around 6 to 8 weeks to do. But will probably get results in a week it's dealing with edge cases and ambiguities that will take time as you've got to find them.

if I understand 6.10 direction properly it sounds like when I've simplified it down to being just able to include .lib files as is, which will still require some sort of .h translation for structs, constants, enums and so on anyway, I've thought about it myself from time to time over the years I left it for a more skilled programmer to do as it's quite an involved project which requires a god like understanding of C.
Re: C++ to PB
I don't know what Fred's doing yet but I've recently come to the conclusion that trying to import c libs with my hacks doesn't always work which I think is a conflict between the c system headers what gcc expects vs mingw llvm, so we would need a copy of the c headers and c system headers for that to work. I've found a couple of ways to get the required information to do the job but I'm still not 100% decided on which way to go. One needs a llvm install and the other is a stand alone tool based on llvm tools. It's output isn't exactly human friendly to read but it'll be fine in codeInner wrote: Fri Dec 01, 2023 2:23 amnow that would be of immense help I'm (as you might know) forever trying to 'Purify' all sorts of .libs/.dlls the most time consuming part is converting .h files their a nightmare when you don't exactly know what a type a variable is supposed to be, sometimes it's like a treasure hunt trying to nail down what someone has typedef as lollipop only to discover an hour later that it's simply at unsigned intidle wrote: Thu Nov 30, 2023 8:17 pm If people insert beer I will write a header converter, I have already scoped out a solution a few months ago that will work but I've not had the motivation to do it and I was waiting to see where Fred's heading with 6.10 but I've come to the conclusion an auto importer would actually be more beneficial than including c directly as it requires a full c compiler suite or at least the right system headers. It will take around 6 to 8 weeks to do. But will probably get results in a week it's dealing with edge cases and ambiguities that will take time as you've got to find them.
if I understand 6.10 direction properly it sounds like when I've simplified it down to being just able to include .lib files as is, which will still require some sort of .h translation for structs, constants, enums and so on anyway, I've thought about it myself from time to time over the years I left it for a more skilled programmer to do as it's quite an involved project which requires a god like understanding of C.
Re: C++ to PB
Ideally the most perfect path from one perspective is not to need converting anything at all just include use and abuseidle wrote: Fri Dec 01, 2023 4:26 amI don't know what Fred's doing yet but I've recently come to the conclusion that trying to import c libs with my hacks doesn't always work which I think is a conflict between the c system headers what gcc expects vs mingw llvm, so we would need a copy of the c headers and c system headers for that to work. I've found a couple of ways to get the required information to do the job but I'm still not 100% decided on which way to go. One needs a llvm install and the other is a stand alone tool based on llvm tools. It's output isn't exactly human friendly to read but it'll be fine in codeInner wrote: Fri Dec 01, 2023 2:23 amnow that would be of immense help I'm (as you might know) forever trying to 'Purify' all sorts of .libs/.dlls the most time consuming part is converting .h files their a nightmare when you don't exactly know what a type a variable is supposed to be, sometimes it's like a treasure hunt trying to nail down what someone has typedef as lollipop only to discover an hour later that it's simply at unsigned intidle wrote: Thu Nov 30, 2023 8:17 pm If people insert beer I will write a header converter, I have already scoped out a solution a few months ago that will work but I've not had the motivation to do it and I was waiting to see where Fred's heading with 6.10 but I've come to the conclusion an auto importer would actually be more beneficial than including c directly as it requires a full c compiler suite or at least the right system headers. It will take around 6 to 8 weeks to do. But will probably get results in a week it's dealing with edge cases and ambiguities that will take time as you've got to find them.
if I understand 6.10 direction properly it sounds like when I've simplified it down to being just able to include .lib files as is, which will still require some sort of .h translation for structs, constants, enums and so on anyway, I've thought about it myself from time to time over the years I left it for a more skilled programmer to do as it's quite an involved project which requires a god like understanding of C.



