Hi Keith and Eli Thank you for your help. I will certainly avoid mingwrt-5.3.1, and avoid libmingwex-2.dll like the plague, or at least like covid19. That done I am still unsure about your comment on my link command: gcc -o x03.exe x03.o C:\plplot32\lib\libcsirocsa.a C:\plplot32\lib\ libplplot.a C:\plplot32\lib\libqsastime.a -mconsole -mwindows -lm It produces: C:\Pete\PlPXmpl>x03.exe Plotting Options: < 1> wingcc Win32 GCC device < 2> ps PostScript File (monochrome) < 3> psc PostScript File (color) < 4> xfig Xfig file < 5> null Null device < 6> mem User-supplied memory device < 7> svg Scalable Vector Graphics (SVG 1.1) Enter device number or keyword: 2 Enter graphics output file name: x03.ps C:\Pete\PlPXmpl> and a lovely graphics picture in x03.ps. No error messages. What's not to like? Would you like to see it? If I omit the -mwindows part I get, not surprisingly a set of error messages: C:\Pete\PlPXmpl>gcc -o x03.exe x03.o C:\plplot32\lib\libcsirocsa.a C:\plplot32\lib\libplplot.a C:\plplot32\lib\libqsastime.a -mconsole -lm c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\plplot32\lib\libplplot.a(wingcc.c.obj):wingcc.c:(.text+0x316): undefined reference to `SetBkColor at 8' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\plplot32\lib\libplplot.a(wingcc.c.obj):wingcc.c:(.text+0x36f): undefined reference to `ExtTextOutA at 32' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\plplot32\lib\libplplot.a(wingcc.c.obj):wingcc.c:(.text+0x38d): undefined reference to `SetBkColor at 8' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\plplot32\lib\libplplot.a(wingcc.c.obj):wingcc.c:(.text+0x405): undefined reference to `SelectObject at 8' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\plplot32\lib\libplplot.a(wingcc.c.obj):wingcc.c:(.text+0x493): undefined reference to `BitBlt at 36' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\plplot32\lib\libplplot.a(wingcc.c.obj):wingcc.c:(.text+0x4b4): undefined reference to `SelectObject at 8' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\plplot32\lib\libplplot.a(wingcc.c.obj):wingcc.c:(.text+0x6e3): undefined reference to `SetBkColor at 8' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\plplot32\lib\libplplot.a(wingcc.c.obj):wingcc.c:(.text+0x73c): undefined reference to `ExtTextOutA at 32' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\plplot32\lib\libplplot.a(wingcc.c.obj):wingcc.c:(.text+0x75a): undefined reference to `SetBkColor at 8' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\plplot32\lib\libplplot.a(wingcc.c.obj):wingcc.c:(.text+0xc1d): undefined reference to `GetDeviceCaps at 8' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\plplot32\lib\libplplot.a(wingcc.c.obj):wingcc.c:(.text+0xc3b): undefined reference to `GetDeviceCaps at 8' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\plplot32\lib\libplplot.a(wingcc.c.obj):wingcc.c:(.text+0xc6f): undefined reference to `GetDeviceCaps at 8' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\plplot32\lib\libplplot.a(wingcc.c.obj):wingcc.c:(.text+0xc8d): undefined reference to `GetDeviceCaps at 8' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\plplot32\lib\libplplot.a(wingcc.c.obj):wingcc.c:(.text+0xe5e): undefined reference to `SetPolyFillMode at 8' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\plplot32\lib\libplplot.a(wingcc.c.obj):wingcc.c:(.text+0xe7c): undefined reference to `SetPolyFillMode at 8' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\plplot32\lib\libplplot.a(wingcc.c.obj):wingcc.c:(.text+0xf5f): undefined reference to `SelectObject at 8' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\plplot32\lib\libplplot.a(wingcc.c.obj):wingcc.c:(.text+0xfa1): undefined reference to `Polyline at 12' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\plplot32\lib\libplplot.a(wingcc.c.obj):wingcc.c:(.text+0xfcf): undefined reference to `SetPixel at 16' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\plplot32\lib\libplplot.a(wingcc.c.obj):wingcc.c:(.text+0xff0): undefined reference to `SelectObject at 8' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\plplot32\lib\libplplot.a(wingcc.c.obj):wingcc.c:(.text+0x1107): undefined reference to `SelectObject at 8' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\plplot32\lib\libplplot.a(wingcc.c.obj):wingcc.c:(.text+0x1134): undefined reference to `Polyline at 12' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\plplot32\lib\libplplot.a(wingcc.c.obj):wingcc.c:(.text+0x1155): undefined reference to `SelectObject at 8' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\plplot32\lib\libplplot.a(wingcc.c.obj):wingcc.c:(.text+0x129d): undefined reference to `CreateSolidBrush at 4' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\plplot32\lib\libplplot.a(wingcc.c.obj):wingcc.c:(.text+0x12c9): undefined reference to `CreatePen at 12' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\plplot32\lib\libplplot.a(wingcc.c.obj):wingcc.c:(.text+0x12ed): undefined reference to `SelectObject at 8' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\plplot32\lib\libplplot.a(wingcc.c.obj):wingcc.c:(.text+0x1313): undefined reference to `SelectObject at 8' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\plplot32\lib\libplplot.a(wingcc.c.obj):wingcc.c:(.text+0x133e): undefined reference to `Polygon at 12' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\plplot32\lib\libplplot.a(wingcc.c.obj):wingcc.c:(.text+0x135f): undefined reference to `SelectObject at 8' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\plplot32\lib\libplplot.a(wingcc.c.obj):wingcc.c:(.text+0x1373): undefined reference to `DeleteObject at 4' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\plplot32\lib\libplplot.a(wingcc.c.obj):wingcc.c:(.text+0x138e): undefined reference to `SelectObject at 8' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\plplot32\lib\libplplot.a(wingcc.c.obj):wingcc.c:(.text+0x139c): undefined reference to `DeleteObject at 4' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\plplot32\lib\libplplot.a(wingcc.c.obj):wingcc.c:(.text+0x13e1): undefined reference to `DeleteDC at 4' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\plplot32\lib\libplplot.a(wingcc.c.obj):wingcc.c:(.text+0x1402): undefined reference to `DeleteObject at 4' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\plplot32\lib\libplplot.a(wingcc.c.obj):wingcc.c:(.text+0x1416): undefined reference to `CreateCompatibleDC at 4' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\plplot32\lib\libplplot.a(wingcc.c.obj):wingcc.c:(.text+0x146d): undefined reference to `CreateCompatibleBitmap at 12' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\plplot32\lib\libplplot.a(wingcc.c.obj):wingcc.c:(.text+0x1499): undefined reference to `SelectObject at 8' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\plplot32\lib\libplplot.a(wingcc.c.obj):wingcc.c:(.text+0x1507): undefined reference to `BitBlt at 36' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\plplot32\lib\libplplot.a(wingcc.c.obj):wingcc.c:(.text+0x1528): undefined reference to `SelectObject at 8' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\plplot32\lib\libplplot.a(wingcc.c.obj):wingcc.c:(.text+0x17d0): undefined reference to `DeleteDC at 4' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\plplot32\lib\libplplot.a(wingcc.c.obj):wingcc.c:(.text+0x181c): undefined reference to `DeleteObject at 4' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\plplot32\lib\libplplot.a(wingcc.c.obj):wingcc.c:(.text+0x1bd9): undefined reference to `DeleteObject at 4' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\plplot32\lib\libplplot.a(wingcc.c.obj):wingcc.c:(.text+0x1c18): undefined reference to `CreatePen at 12' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\plplot32\lib\libplplot.a(wingcc.c.obj):wingcc.c:(.text+0x1e82): undefined reference to `SetROP2 at 8' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\plplot32\lib\libplplot.a(wingcc.c.obj):wingcc.c:(.text+0x1ea0): undefined reference to `SetROP2 at 8' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\plplot32\lib\libplplot.a(wingcc.c.obj):wingcc.c:(.text+0x222f): undefined reference to `GetDeviceCaps at 8' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\plplot32\lib\libplplot.a(wingcc.c.obj):wingcc.c:(.text+0x2253): undefined reference to `GetDeviceCaps at 8' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\plplot32\lib\libplplot.a(wingcc.c.obj):wingcc.c:(.text+0x22f9): undefined reference to `GetDeviceCaps at 8' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\plplot32\lib\libplplot.a(wingcc.c.obj):wingcc.c:(.text+0x2317): undefined reference to `GetDeviceCaps at 8' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\plplot32\lib\libplplot.a(wingcc.c.obj):wingcc.c:(.text+0x2351): undefined reference to `GetDeviceCaps at 8' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\plplot32\lib\libplplot.a(wingcc.c.obj):wingcc.c:(.text+0x236f): more undefined references to `GetDeviceCaps at 8' follow c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\plplot32\lib\libplplot.a(wingcc.c.obj):wingcc.c:(.text+0x24b9): undefined reference to `PrintDlgA at 4' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\plplot32\lib\libplplot.a(wingcc.c.obj):wingcc.c:(.text+0x25be): undefined reference to `StartDocA at 8' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\plplot32\lib\libplplot.a(wingcc.c.obj):wingcc.c:(.text+0x25dd): undefined reference to `EndDoc at 4' collect2.exe: error: ld returned 1 exit status While if I omit the -mconsole part, I get: C:\Pete\PlPXmpl>gcc -o x03.exe x03.o C:\plplot32\lib\libcsirocsa.a C:\plplot32\lib\libplplot.a C:\plplot32\lib\libqsastime.a -mwindows -lm C:\Pete\PlPXmpl>x03.exe C:\Pete\PlPXmpl> Indeed no contradiction, no error messages but no interaction and NO graphics. So in view of your comments I obviously need your help. What would you suggest I write for my linking command? The pair of commands -mconsole -mwindows was suggested in a help text when I first started to use plplot back in the mists of time. Unfortunately I can't find it now but it seems to have been working ok for a long time. Also, perhaps you could give a reference to these Windows commands (presumably they are system .dll's) as I cannot find any specs for them. Best Wishes, Peter Williams -- Peter Williams petes****@gmail***** -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://lists.osdn.me/mailman/archives/mingw-users/attachments/20200602/36fe1579/attachment-0001.html>