Hi Werner,

the def-file is a file with instructions for the linker, so as far as 
CMake is concerned, it has the same function as a source file. I am
not sure why it works for me and not for you (right now, it is not
part of the dependencies - we need to take a look at that).

This requires further investigation:
- I will write down the steps I take and the precise CMake options
- I will experiment with various combinations of static and dynamic
   options.

I am not sure if I can do that tonight - I will have to see, but it
is surely puzzling!

Regards,

Arjen

On 2009-03-24 09:34, Werner Smekal wrote:
> Hi Arjen,
>>
> 
>> 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.
> 
> What I don't understand is, why it works for you (gfortran), since with 
> MinGW 4.3.2 and gfortran 4.3.2 I have the same problems (no import 
> library). In the CMakeLists.txt (for both f77 and f95) we add a .def file
> 
>   if(WIN32 AND BUILD_SHARED_LIBS AND NOT MINGW)
>     SET(plplotf95${LIB_TAG}_LIB_SRCS ${plplotf95${LIB_TAG}_LIB_SRCS} 
> plplotf95.def)
>   endif(WIN32 AND BUILD_SHARED_LIBS AND NOT MINGW)
> 
> What is cmake supposed to do with this file? If you add the .def file, 
> does CMake automatically create a import library? For which compiler? If 
> I do this for the MinGW compiler no import library is created. I 
> understand that Fortran doesn't provide this dllimport/dllexport 
> keywords and you need to create the import library later. But does that 
> work for other compilers?
> 
> And why does it work for you? If there is a case where it works for 
> gfortran we need to alter the cmake files.
> 
> In the moment it works for my compiler toolset (MinGW/g77 and 
> MinGW/gfortran), but we should test that for other combinations as well.
> 
> Thanks,
> Werner
> 
> 
> 
>>
>> 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
> 
> -- 
> Dr. Werner Smekal
> Institut fuer Allgemeine Physik
> Technische Universitaet Wien
> Wiedner Hauptstr 8-10
> A-1040 Wien
> Austria
> 
> email: sme...@iap.tuwien.ac.at
> web: http://www.iap.tuwien.ac.at/~smekal
> phone: +43-(0)1-58801-13463 (office), +43-(0)1-58801-13469 (laboratory)
> fax: +43-(0)1-58801-13499
> 
> 


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