Enivironments WIndows 10 Home
Msys2
MinGW W64
gcc 6.3.0 dwarf thread model win32 (from MinGW w64 site)
On 64 bit platform I did not see the below link error:
g++ -L/c/Programs/gplibs32_gcc630/lib -s -L/c/Programs/Qt/5.7.1_mgw32_630/lib -mconsole -L/c/Program\ Files\ \(x86\)/HTML\ Help\ Workshop/lib -L. -o gnuplot.exe
<snip>
wd2d.co
<snip>
wd2d.co:wd2d.cpp:(.text+0x6586): undefined reference to `PTOpenProvider'
wd2d.co:wd2d.cpp:(.text+0x65b5): undefined reference to `PTConvertDevModeToPrintTicket'
wd2d.co:wd2d.cpp:(.text+0x65cb): undefined reference to `PTCloseProvider'
collect2.exe: error: ld returned 1 exit status
make[1]: *** [Makefile:630: gnuplot.exe] Error 1
Any suggestions?
You have to regenerate the
prntvpt.libfor 32bit. Simply delete that file and re-run make. I will addprntvpt.libtomake clean.`For me, prntvpt.lib prntvpt.def which is generated by gendef gives undefined reference errors for 32 bit build. I tried def file generated by pexports and it does not give undefined reference errors.
Last edit: Tatsuro MATSUOKA 2017-07-12
Thus
The above works for me.
Weird. The -r option doesn't hurt here either. But I still get identical output for the DEF file. Could you please post yours for comparison?
I am running 32bit builds in the MINGW32 shell of MSYS2. Whereas I do the 64bit builds in the MINGW64 shell. What are you using?
Last edit: Bastian Märkisch 2017-07-13
I am using MinGW w64 32bit complier in the MINGW32 shell of MSYS2 for 32 bit build
and
using MinGW w64 64bit complier in the MINGW64 shell of MSYS2 for 64 bit build
Note: MinGW w64 compliers (32 and 64 bit) are not downloaded from MSYS2 but from MinGW w64 project.
On my MINGW32 shell of MSYS2
On MINGW64 shell of MSYS2
In my case, -r is required for MINGW32 shell
I think your gendef is getting confused about the calling convention. Could you please try if it works to use the
-aoption (--assume-stdcall) instead of-r?I tried on MinGW32 shell.
Last edit: Tatsuro MATSUOKA 2017-07-13
Not really, that still gives @N appendices. I will add your patch to CVS. It still works for me that way.
Thanks!
Revised version of the patch now in CVS.
Todat I have met a link error on MinGW W64 32 bit build.
????
Anywar I deleted -r option from gendef command and link went well.
link is OK. But I have met runtime error.
(Tranalated from Japanese)
Hmmmm
I have execute date specific comit cvs code. On the source code at ChangeLog date 2017-07-30, link goes well with gendef with -r option. The code chages on 2017-07-31 may affect the link error this time but I cannot figure out why.
Last edit: Tatsuro MATSUOKA 2017-08-02
The change on 2017-07-31:
src/win/wd2d.cpp: Missing WINAPI call type for print ticket API.
is the point of MinGW w64 32 bit build trouble at this time.
Deleting WINAPI make build successful again.
Can I locally revert this change?
I have tried printing on 32 bit and 64bit. On 32 bit print hangs but it does not hang on 64bit.
Perhaps add of WINAPI are really required but I could not have any solution for runtime error
using def file without -r option.
Tatsuro, I am sure that
WINAPIaka__stdcallis the correct calling convention. So something is wrong about the def or lib file, but I haven't figured out what yet. I suggest you revert to using D2d 1.0 only for 32bit builds at the moment. That will disable printing via D2d and use GDI+ instead.Btw. if you link to the lib file from the Windows SDK instead of the one created locally, everyhing seems to work fine.
Thanks for the reply. At the momend I I revert yo D2d 1.0 only for 32bit builds at the moment.
I will try the Windows SDK in the future.
I installed windows SDK and copy prntvpt.lib to my local lib directory for gnuplot 32 bit build and modified Makefile. D2d 1.1 works! Thanks!
Third, now hopefully correct attempt:
Fixed in CVS.
Tha ks! I have confirmed the change this time gives expected results for direct 2D 1.1.