Hi Vince,

yes, the Fortran compiler of choice - it will automatically add
the Fortran specific libraries so that you do not need to care
about them: some of the undefined references have gone!

You need to add the plplotf77optsd.lib library too. This is
due to a problem in g77 wrt command-line arguments. (gfortran
may not suffer from it, but I am not sure we do a special case
for this one).

Regards,

Arjen

On 2010-04-02 13:18, Vincenzo Urso Miano wrote:
> Hi Arjen,
> 
> Maybe you mean g77. I don't have gfortran on my system. Let me remind
> you that I managed to compile this example as with cmake and make, as
> described in the previous post.
> 
> Anyway I tried to change the position of the library and use g77:
> 
> g77 -o test.exe x01f.f -IC:/plplot/include/plplot  -LC:/plplot/lib
> -lplplotf77d -lplplotf77cd  -lcsirocsa -lqsastime -lplplotd
> 
> it actually reduced the undef references to one:
> 
> C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccoK1ESu.o:x01f.f:(.text+0xe):
> undefined reference to `plparseopts_'
> collect2: ld returned 1 exit status
> 
> 
> Afterwards, I installed gfortran and it gives the same result.
> 
> gfortran -o test.exe x01f.f -IC:/plplot/include/plplot
>  -LC:/plplot/lib -lplplotf77d -lplplotf77cd  -lcsirocsa -lqsastime -lplplotd
> C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\cckLGBjo.o:x01f.f:(.text+0x25):
> undefined reference to `plparseopts_'
> collect2: ld returned 1 exit status
> 
> Probably need to move some other library
> thanks,
> Vince
> 
> ---------- Forwarded message ----------
> From: Arjen Markus <[email protected]>
> Date: 2010/4/2
> Subject: Re: [Plplot-general] [plplot] Linking my first source file.
> To: Vincenzo Urso Miano <[email protected]>
> Cc: [email protected]
> 
> 
> Hi Vince,
> 
> not sure if this is the cause, but you may need to change the
> order of the libraries. Put -plplotd after -lplplotf77cd.
> And link with gfortran, not gcc!
> 
> Regards,
> 
> Arjen
> 
> 
> On 2010-04-02 12:26, Vincenzo Urso Miano wrote:
>> Hello,
>>
>> I am trying to compile my first fortran source and link it with plplot.
>> Bear in mind that I managed to compile the examples running
>> ------
>> cmake -G "MinGW Makefiles"
>> make
>> -----
>> in the C:\plplot\share\plplot5.9.5\examples folder. That means that
>> plplot is built correctly and it works.
>>
>> To compile I type:
>> ----------------------
>> path=%PATH%;c:\plplot\bin;C:\plplot\lib\plplot5.9.5
>> cd E:\Workspace\temp\plplot
>> e:
>> gcc -o test.exe x01f.f -IC:/plplot/include/plplot  -LC:/plplot/lib
>> -lplplotd -lplplotf77d -lplplotf77cd -lcsirocsa -lqsastime
>> ---------------------
>>
>> Note that E:\Workspace\temp\plplot contains the source x01f.f.
>> here's the result:
>>
>> --------------------
>> C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccQUTbzm.o:x01f.f:(.text+0xe):
>> undefined reference to `plparseopts_'
>> C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccQUTbzm.o:x01f.f:(.text+0x2d):
>> undefined reference to `s_wsfe'
>> C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccQUTbzm.o:x01f.f:(.text+0x49):
>> undefined reference to `do_fio'
>> C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccQUTbzm.o:x01f.f:(.text+0x5c):
>> undefined reference to `G77_lnblnk_0'
>> C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccQUTbzm.o:x01f.f:(.text+0x73):
>> undefined reference to `do_fio'
>> C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccQUTbzm.o:x01f.f:(.text+0x78):
>> undefined reference to `e_wsfe'
>> C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccQUTbzm.o:x01f.f:(.text+0x117):
>> undefined reference to `s_stop'
>> C:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../libmingw32.a(main.o):main.c:(.tex
>> t+0xd2): undefined reference to `winm...@16'
>> collect2: ld returned 1 exit status
>> --------------------
>>
>> I don't know what's missing. Could you help me?
>> Thanks
>> Vince
>>
>> ------------------------------------------------------------------------------
>> Download Intel&#174; Parallel Studio Eval
>> Try the new software tools for yourself. Speed compiling, find bugs
>> proactively, and fine-tune applications for parallel performance.
>> See why Intel Parallel Studio got high marks during beta.
>> http://p.sf.net/sfu/intel-sw-dev
>> _______________________________________________
>> Plplot-general mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/plplot-general
>>
> 
> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Plplot-general mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/plplot-general
> 

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Plplot-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/plplot-general

Reply via email to