Hi Jim,

the problem here is, that the fortran 77 bindings are not ready for 
being compiled to a dll with Visual C++. You can read former posts about 
that (regarding "DLL hell").

It works though with MinGW (therefor I works for me), since MinGW 
exports all symbols.

To explain the problem in short: Visual C++ exports by default no 
function to a dll, which has not a special keyword in front of it 
(__declspec(export) or similar). Since no function in the f77 bindings 
has this keyword in front, no functions get exported.

As a short workaround (until we made the bindings ready for "dll hell") 
change line 70 in plplot/bindings/f77/CMakeLists.txt to

add_library(plplotf77c${LIB_TAG} static ${plplotf77c${LIB_TAG}_LIB_SRCS})

(add the word static). Then the f77 library will always be build as 
static and you shouldn't have any more problems for the moment. I'll try 
to change the code soon.

HTH,
Werner

Jim Dishaw wrote:
> Has anyone had success in building the shared library version on win32
> using Visual Studio (or any compiler)--I encounter two problems.  The
> first problem occurs if I do not build the static version first
> (-DBUILD_SHARED_LIBS=OFF)
> 
> /out:..\..\dll\plplotf77d.dll /dll /STACK:10000000 /machine:I386 /debug 
> /INCREMENTAL:YES "CMakeFiles\plplotf77d.dir\strutil.obj" 
> "CMakeFiles\plplotf77d.dir\sfstubs.obj" 
> "CMakeFiles\plplotf77d.dir\configurable.obj" 
> -LIBPATH:c:\cygwin\opt\build\plplot_cmake_build\dll plplotf77cd.lib 
> plplotd.lib gdi32.lib comdlg32.lib csirocsa.lib user32.lib 
> LINK : fatal error LNK1104: cannot open file 'plplotf77cd.lib'
> 
> If I look around for plplotf77cd.lib it does not exist.
> 
> The second problem, which occurs if I build the static library first and
> then rerun cmake with -DBUILD_SHARED_LIBS=ON 
> 
> Microsoft (R) Incremental Linker Version 7.10.6030
> Copyright (C) Microsoft Corporation.  All rights reserved.
> 
> /out:..\..\dll\plplotf77d.dll /dll /STACK:10000000 /machine:I386 /debug 
> /INCREMENTAL:YES "CMakeFiles\plplotf77d.dir\strutil.obj" 
> "CMakeFiles\plplotf77d.dir\sfstubs.obj" 
> "CMakeFiles\plplotf77d.dir\configurable.obj" 
> -LIBPATH:c:\cygwin\opt\build\plplot_cmake_build\dll plplotf77cd.lib 
> plplotd.lib gdi32.lib comdlg32.lib csirocsa.lib user32.lib 
> sfstubs.obj : error LNK2019: unresolved external symbol _PLSETOPT7 referenced 
> in function _PLSETOPT
> sfstubs.obj : error LNK2019: unresolved external symbol _PLSDEV7 referenced 
> in function _PLSDEV
> sfstubs.obj : error LNK2019: unresolved external symbol _PLGDEV7 referenced 
> in function _PLGDEV
> sfstubs.obj : error LNK2019: unresolved external symbol _PLSFNAM7 referenced 
> in function _PLSFNAM
> sfstubs.obj : error LNK2019: unresolved external symbol _PLGFNAM7 referenced 
> in function _PLGFNAM
> sfstubs.obj : error LNK2019: unresolved external symbol _PLGVER7 referenced 
> in function _PLGVER
> sfstubs.obj : error LNK2019: unresolved external symbol _PLAXES7 referenced 
> in function _PLAXES
> sfstubs.obj : error LNK2019: unresolved external symbol _PLBOX7 referenced in 
> function _PLBOX
> sfstubs.obj : error LNK2019: unresolved external symbol _PLBOX37 referenced 
> in function _PLBOX3
> sfstubs.obj : error LNK2019: unresolved external symbol _PLCON07 referenced 
> in function _PLCON0
> sfstubs.obj : error LNK2019: unresolved external symbol _PLCON17 referenced 
> in function _PLCON1
> sfstubs.obj : error LNK2019: unresolved external symbol _PLCON27 referenced 
> in function _PLCON2
> sfstubs.obj : error LNK2019: unresolved external symbol _PLCONT7 referenced 
> in function _PLCONT
> sfstubs.obj : error LNK2019: unresolved external symbol _PLVEC07 referenced 
> in function _PLVEC0
> sfstubs.obj : error LNK2019: unresolved external symbol _PLVEC17 referenced 
> in function _PLVEC1
> sfstubs.obj : error LNK2019: unresolved external symbol _PLVEC27 referenced 
> in function _PLVEC2
> sfstubs.obj : error LNK2019: unresolved external symbol _PLVECT7 referenced 
> in function _PLVECT
> sfstubs.obj : error LNK2019: unresolved external symbol _PLSHADE07 referenced 
> in function _PLSHADE0
> sfstubs.obj : error LNK2019: unresolved external symbol _PLSHADE17 referenced 
> in function _PLSHADE1
> sfstubs.obj : error LNK2019: unresolved external symbol _PLSHADE27 referenced 
> in function _PLSHADE2
> sfstubs.obj : error LNK2019: unresolved external symbol _PLSHADE7 referenced 
> in function _PLSHADE
> sfstubs.obj : error LNK2019: unresolved external symbol _PLSHADES07 
> referenced in function _PLSHADES0
> sfstubs.obj : error LNK2019: unresolved external symbol _PLSHADES17 
> referenced in function _PLSHADES1
> sfstubs.obj : error LNK2019: unresolved external symbol _PLSHADES27 
> referenced in function _PLSHADES2
> sfstubs.obj : error LNK2019: unresolved external symbol _PLSHADES7 referenced 
> in function _PLSHADES
> sfstubs.obj : error LNK2019: unresolved external symbol _PLLAB7 referenced in 
> function _PLLAB
> sfstubs.obj : error LNK2019: unresolved external symbol _PLMTEX7 referenced 
> in function _PLMTEX
> sfstubs.obj : error LNK2019: unresolved external symbol _PLPTEX7 referenced 
> in function _PLPTEX
> sfstubs.obj : error LNK2019: unresolved external symbol _PLSTART7 referenced 
> in function _PLSTART
> sfstubs.obj : error LNK2019: unresolved external symbol _PLSETMAPFORMC 
> referenced in function _PLMAP
> sfstubs.obj : error LNK2019: unresolved external symbol _PLMAPC referenced in 
> function _PLMAP
> sfstubs.obj : error LNK2019: unresolved external symbol _PLMERIDIANSC 
> referenced in function _PLMERIDIANS
> sfstubs.obj : error LNK2019: unresolved external symbol _PLSTRIPC7 referenced 
> in function _PLSTRIPC
> configurable.obj : error LNK2019: unresolved external symbol _PLPARSEOPTS7 
> referenced in function _PLPARSEOPTS
> ..\..\dll\plplotf77d.dll : fatal error LNK1120: 34 unresolved externals
> 
> 
> 
> 
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Plplot-devel mailing list
> Plplot-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/plplot-devel


-- 
Dipl. Ing. Werner Smekal
Institut fuer Allgemeine Physik
Technische Universitaet Wien
Wiedner Hauptstr 8-10
A-1040 Wien
Austria

email: [EMAIL PROTECTED]
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

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to