Page 1 of 1
Namespaces are halting me!
Posted: Sun Jun 27, 2004 10:05 pm
by Moonshine
Ive been desperately trying to find various DLLs to work with PB but all use namespaces and so I cant really try to interface them. All I would like is if PB had support for namespaces (just when dealing with external DLLs) and I could probably get a multitude of them working. Why does the world have to be so.... C++?

Posted: Wed Jul 07, 2004 10:52 am
by blueznl
what *are* namespaces?
Posted: Wed Jul 07, 2004 11:28 am
by Edwin Knoppert
>actually, i've never been much in seven of nine
You wish
Well , not that pretty though..
Posted: Wed Jul 07, 2004 2:36 pm
by Moonshine
>actually, i've never been much in seven of nine
You wish
Well , not that pretty though..
What the hell?
what *are* namespaces?
Namespaces are an OO feature of C++ and the like - they are a measure to prevent two libs clashing when both libs have a command with the same name. An example would be DLL1 and DLL2 - imagine these both had a command called GetString() or something like that. If you typed GetString() into your prog that was using both these libs, bad things would happen because it wouldnt know which DLL you were referring to. Therefore the DLL's use namespaces - in C++ it would look like DLL1::GetString() and DLL2::GetString(). this way it knows which you mean and problems are avoided.
Basically every DLL Ive found uses namespaces and without an equivalent in PB, they cant really be used. For example in the Irrlicht 3d engine it uses the namespaces irr::, irr::core, irr::gui, irr::io, irr::scene and irr:video whereby classes are contained within these namespaces.
Its only a small thing and I just thought PB might benefit from the compatibility.
Posted: Wed Jul 07, 2004 3:11 pm
by Edwin Knoppert
>What the hell?
Naah, heaven

Posted: Wed Jul 07, 2004 3:31 pm
by blueznl
it's heaven of nine
if it only would be seven of mine
oh darn, getting poetic on my age...
Posted: Wed Jul 07, 2004 5:43 pm
by dmoc
oh darn, getting poetic on my age...
I have to say with much sadness, it be the first sign of madness!
Posted: Wed Jul 07, 2004 6:51 pm
by ivory
As a work around, if you desperately need access to a library, I suppose someone could write a C++ wrapper to call the namespace functions and export non-namespace functions.
And if someone fluent in C++ provides that for you, I think MS provides C++ compilers free to download (I don't know if they are .net, or if namespaces requires .net). I imagine, with one program in hand, as a template, others would not be too difficult.