|
From: Axel B. <th...@th...> - 2004-08-04 19:56:26
|
Hi folks, I did succeed in compiling gnuplot for windows including libgd. I simply commented out the setmode() line in the io.h include file of windows, and the compiler did not complain any more. BUT as I said the application crashes ... . EVEN with the /MD switch. Now I have done a little bit of debugging, and I have some steps in reproducing the error: 1. start wgnuplot 2. enter the sequence: set output "test.jpg" set term jpeg plot sin(x) 3. it will crash then in gd.trm, line 1755, calling gdImageJpg. according to ms visual studio the 2nd parameter (gpoutfile) is faulty - it's always the value 0x000010, one time it was 0x000005. ookay so far. If I could get this sorted out ... well, let's just say I'd be happy ;-) so if ANYONE out there has any idea of what's going wrong, where gpoutfile is set, and how I could solve this (I did link against /MD just as suggested from the programmers), I would be really happy. thanks, greetings and ciao, axel. |
|
From: Axel B. <new...@th...> - 2004-08-04 19:58:09
|
Hi folks, I did succeed in compiling gnuplot for windows including libgd. I simply commented out the setmode() line in the io.h include file of windows, and the compiler did not complain any more. BUT as I said the application crashes ... . EVEN with the /MD switch. Now I have done a little bit of debugging, and I have some steps in reproducing the error: 1. start wgnuplot 2. enter the sequence: set output "test.jpg" set term jpeg plot sin(x) 3. it will crash then in gd.trm, line 1755, calling gdImageJpg. according to ms visual studio the 2nd parameter (gpoutfile) is faulty - it's always the value 0x000010, one time it was 0x000005. ookay so far. If I could get this sorted out ... well, let's just say I'd be happy ;-) so if ANYONE out there has any idea of what's going wrong, where gpoutfile is set, and how I could solve this (I did link against /MD just as suggested from the programmers), I would be really happy. thanks, greetings and ciao, axel. |
|
From: BBands <bb...@ya...> - 2004-08-05 16:14:45
|
Hello Axel,
I have been helping maintain makefile.nt for win2k and
vc6 and was the one who put the /MT parameter in the
file to acommodate the pdf term.
I thought it would be of value to have a single
makefile.nt for vc6 and .NET, so I tried your change
to /MD. Results follow:
cl /c /G5 /O2 /MD /I. /nologo /D_Windows
/DHAVE_CONFIG_H /D__MSC__ /DUSE
_MOUSE /DPM3D /DHELPFILE=\"wgnuplot.hlp\"
/DHAVE_LIBPNG /DHAVE_LIBPDF /I..\\term
/I..\\src\\libpng /I..\\src\\zlib
/I..\\src\\pdflib\\pdflib term.c
term.c
C:\PROGRA~1\MICROS~3\VC98\INCLUDE\io.h(240) : error
C2375: 'setmode' : redefinition; different linkage
NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.
I am happy to help if I can.
--jab
=====
John Bollinger, CFA, CMT
www.BollingerBands.com
If you advance far enough, you arrive at the beginning.
__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail
|
|
From: Axel B. <th...@th...> - 2004-08-05 17:05:52
|
BBands wrote: > Hello Axel, > > I have been helping maintain makefile.nt for win2k and > vc6 and was the one who put the /MT parameter in the > file to acommodate the pdf term. > > C:\PROGRA~1\MICROS~3\VC98\INCLUDE\io.h(240) : error > C2375: 'setmode' : redefinition; different linkage > NMAKE : fatal error U1077: 'cl' : return code '0x2' > Stop. > > I am happy to help if I can. ah, my old friend, the redefinition bug - but now I'm happy someone else stumbled on this. I solved it by just commenting out the lines in io.h (during the compile), for I have no "original linkage" given from anything so I cannot say which exact thing is causing the compiler to say that. so if you can come up with something useful solving this I would be very happy. When commenting out the setmode() lines in io.h the compilation should work just fine, BUT the application crashes when using gd functions. This is - due to the gd author - because VS .NET links against MSVCR71.DLL, and not against MSVCRT.DLL, against which the gd.lib is linked. So: if you managed to compile gd with your version of gnuplot, pleeeaaaasseeeee tell me how :-) for you HAVE to do something different. pdf I haven't tested so far .... . if it's linked against the same lib as gd.dll it might just crash, too :-( greetings, axel. |
|
From: Hans-Bernhard B. <hb...@pc...> - 2004-08-05 08:42:40
|
On Wed, 4 Aug 2004, Axel Bock wrote: > Hi folks, > > I did succeed in compiling gnuplot for windows including libgd. I simply > commented out the setmode() line in the io.h include file of windows, That's pretty much guaranteed to be the wrong approach to solve whatever the actual problem was. Futzing around with the system headers is only going to create problems, or brush them under the carpet, but never solves anything. > according to ms visual studio the 2nd parameter (gpoutfile) is faulty - > it's always the value 0x000010, one time it was 0x000005. So inspect the call stack, work you way up and see what's happening. |