Page 1 of 1

Gdiplus.dll dependency from 5.40?

Posted: Thu Mar 17, 2016 5:09 pm
by Ramses800
I stumbled onto a problem when I fired up a Windows 2000 to test my PB 5.41-program.
I got a message saying that the file GDIPLUS.DLL can“t be located, and yes, that file does not exist on a standard Windows 2000.
However, an older(v5.31) PB-program worked just fine previously so I started investigating what exactly I had done that required gdiplus.dll.
And found absolutely nothing.
So more testing followed and I could conclude with a simple program like below:

Code: Select all

 ; Shows possible flags of ButtonGadget in action...
  If OpenWindow(0, 0, 0, 222, 200, "ButtonGadgets", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
    ButtonGadget(0, 10, 10, 200, 20, "Standard Button")
    ButtonGadget(1, 10, 40, 200, 20, "Left Button", #PB_Button_Left)
    ButtonGadget(2, 10, 70, 200, 20, "Right Button", #PB_Button_Right)
    ButtonGadget(3, 10,100, 200, 60, "Multiline Button  (longer text gets automatically wrapped)", #PB_Button_MultiLine)
    ButtonGadget(4, 10,170, 200, 20, "Toggle Button", #PB_Button_Toggle)
    Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
  EndIf
that with PB 5.31, this will generate an executable with no gdiplus.dll dependency.
With PB 5.40/5.41/5.42 this will generate an executable with gdiplus.dll dependency.

So something changed within PB between 5.31 and 5.40.

My problem is that I want to run my software on Windows 2000....

Any suggestions would be really appreciated!

Re: Gdiplus.dll dependency from 5.40?

Posted: Thu Mar 17, 2016 5:27 pm
by jack

Re: Gdiplus.dll dependency from 5.40?

Posted: Thu Mar 17, 2016 5:29 pm
by Fred
Minimum requirement for PB 5.40 is Windows XP. GDIPlus is used for vector drawing library, if you need it on Win2000 you can install it: from there https://www.microsoft.com/en-us/downloa ... x?id=18909

Re: Gdiplus.dll dependency from 5.40?

Posted: Thu Mar 17, 2016 5:34 pm
by fryquez
Why no use the older Version. if you need support that old OS.

Or Compile to ASM and remove the 5 linse with "VectorDrawing" in it's name and recompile.

Re: Gdiplus.dll dependency from 5.40?

Posted: Thu Mar 17, 2016 5:35 pm
by Ramses800
It did.
I must admit though, that I was hoping for a way to remain true to the stand-alone aspect of Purebasic with no additional libraries needed.....

Re: Gdiplus.dll dependency from 5.40?

Posted: Thu Mar 17, 2016 5:39 pm
by Fred
Well, Windows 2000 is no more supported by modern PB version, like Win95/Win98/NT4/Millenium. That said, you can still stick to 5.31 if you want to support Win2000.

Re: Gdiplus.dll dependency from 5.40?

Posted: Thu Mar 17, 2016 5:42 pm
by Ramses800
fryquez wrote:Why no use the older Version. if you need support that old OS.
There are some features of 5.40+ that I use, and in future software, I might use even more.
fryquez wrote: Or Compile to ASM and remove the 5 linse with "VectorDrawing" in it's name and recompile.
This sound interesting but I cant find anything in the helpfiles about how to Compile to ASM?

Re: Gdiplus.dll dependency from 5.40?

Posted: Thu Mar 17, 2016 5:48 pm
by fryquez
Search the help file for "Using the command line compiler"

There is /COMMENTED to create an ASM file.

And there is /REASM to compile that ASM file.

Re: Gdiplus.dll dependency from 5.40?

Posted: Thu Mar 17, 2016 5:55 pm
by Ramses800
Found it!
The concept works with my small test program(from above)!

Even stranger though, is that if I just compile the test program to ASM and re-assemble it again without a removing the Vectordrawing lines, the file dependencies are still there(looking at it with Dependency Walker) but it actually works on the standard Windows 2000 target?

Trying it out on the "real" program, is seems the compiler are having problems with some of the newer builtin constants for version information

Code: Select all

Error: in included file 'f:\ACD\DOC\AFD\Dropbox\ACD\DOC\
ic\TagDebug++\SRC\modLicence.pb'
Line 147 - Constant not found: #pb_editor_productname.