Hi Werner,

right, my Fortran compiler is usually gfortran or g95 - g77 is a very
old compiler that is no longer actively maintained. I can imagine
that the compiler does not produce import libraries - shared libraries
under Windows simply have too many pecularities, so they are probably
beyond g77's capabilities. dlltool is the way forward here.

As to x23f: the trim() function is not a FORTRAN 77 function. It was
introduced in Fortran 90. (This does not show up when you use an F90
compiler - sigh)

I will look into this one.

Regards,

Arjen

On 2009-03-19 22:08, Werner Smekal wrote:
> Hi Arjen,
>>>   
>> Well, the cause of the problem is clear now: when linking the Fortran 
>> bindings
>> into a DLL, gfortran would need the option -Wl,-out-implib,... (or 
>> something
>> similar) to produce the missing library.
>>
>> This option _is_ present in the gcc part to create the DLL 
>> libplplotf77cd.dll.
> I revisited this problem, since it still exists and wanted at least to 
> make it work.
>>
>> I checked to see if I could easily add it, but I have not found a 
>> specific CMake
>> module for gfortran under Windows.
> I tried to change the Windows-g77.cmake module but was not successful in 
> adding this -Wl,-out-implib - I think this is maybe not possible, since 
> there is no Fortran statement to export a symbol. I tried to add a .def 
> file, but also no success.
>>
>> So my question now is: Should I go ahead and add such module for this 
>> particular
>> combination (as part of general modules) or add it to the 
>> CMakeLists.txt file as
>> a special case. Or is there another way I should proceed?
>>
>> More details on the platform:
>> - I am running CMake in an ordinary DOS-box under Windows XP.
>> - I make sure that gcc and gfortran are in the path, so that CMake 
>> will pick up
>>   these compilers.
>> - I use the "MinGW Makefiles" output option to generate the makefiles.
>>
>> (This differs from the situation where I run CMake via MSYS. MSYS and
>> MinGW are explicitly distinguished in the CMake modules, but I am not
>> sure how the above situation is characterised)
> I added now a custom post-build target, which runs dlltool to create the 
> import library. Works great so far. Arjen, could you test that. Only 
> implemented for f77 so far, f95 would be straight forward. If we manage 
> to improve the cmake files we can remove it again.
> 
> Example 23 doesn't compile now. I get the following message:
> 
> [ 77%] Building Fortran object examples/f77/CMakeFiles/x23f.dir/x23f.f.obj
> Z:\DevZone\PLdev\build\gcc\debug\examples\f77\x23f.f: In program `x23f':
> Z:\DevZone\PLdev\build\gcc\debug\examples\f77\x23f.f:320: warning:
>        &     trim(family(ifamily+1))//' '//trim(style(istyle+1))//' '//
>              ^
> Reference to unimplemented intrinsic `TRIM' at (^) (assumed EXTERNAL)
> Z:\DevZone\PLdev\build\gcc\debug\examples\f77\x23f.f:320:
>        &     trim(family(ifamily+1))//' '//trim(style(istyle+1))//' '//
>              ^
> Invalid declaration of or reference to symbol `trim' at (^) [initially 
> seen at (^)]
> mingw32-make[2]: *** [examples/f77/CMakeFiles/x23f.dir/x23f.f.obj] Error 1
> mingw32-make[1]: *** [examples/f77/CMakeFiles/x23f.dir/all] Error 2
> mingw32-make: *** [all] Error 2
> 
> My Fortran knowledge is not very exhaustive. Any ideas?
> 
> Best Regards,
> Werner
>>
>> Regards,
>>
>> Arjen
>>
>> ------------------------------------------------------------------------
>>
>> -------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Moblin Your Move Developer's 
>> challenge
>> Build the coolest Linux based applications with Moblin SDK & win great 
>> prizes
>> Grand prize is a trip for two to an Open Source event anywhere in the 
>> world
>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Plplot-devel mailing list
>> Plplot-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/plplot-devel
>>   
> 
> 


Delft Hydraulics, GeoDelft, the Subsurface and Groundwater unit of TNO and 
parts of Rijkswaterstaat have joined forces in a new independent institute for 
delta technology, Deltares. Deltares combines knowledge and experience in the 
field of water, soil and the subsurface. We provide innovative solutions to 
make living in deltas, coastal areas and river basins safe, clean and 
sustainable. 

 

DISCLAIMER: This message is intended exclusively for the addressee(s) and may 
contain confidential and privileged information. If you are not the intended 
recipient please notify the sender immediately and destroy this message. 
Unauthorized use, disclosure or copying of this message is strictly prohibited.
The foundation 'Stichting Deltares', which has its seat at Delft, The 
Netherlands, Commercial Registration Number 41146461, is not liable in any way 
whatsoever for consequences and/or damages resulting from the improper, 
incomplete and untimely dispatch, receipt and/or content of this e-mail.





------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to