To Phil, Pedro, and Arjen:
@Phil and Pedro:
You guys are the ones with experience
with MSVC and wxwidgets here. So are you willing to help
Arjen with the linking problem below? Or recommend
the version of wxwidgets that works for you in combination
with MSVC?
@Arjen:
Glad you solved the find issue. Please commit your fix
to cmake/modules/FindwxWidgets.cmake
Below I suggest a few things to check concerning the msvc/wxwidgets
linking problem you have encountered.
On 2017-07-05 12:28-0000 Arjen Markus wrote:
However, the make step failed:
cd D:\plplot-svn\build-windows-alt
[ 20%] Linking CXX shared library ..\..\dll\plplotwxwidgets.dll
cd D:\plplot-svn\build-windows-alt\bindings\wxwidgets
D:\cmake3.8.0\bin\cmake.exe -E vs_link_dll
--intdir=CMakeFiles\plplotwxwidgets.dir --manifests --
C:\PROGRA~2\MICROS~3.0\VC\bin\amd64\link.exe /nologo
@CMakeFiles\plplotwxwidgets.dir\objects1.rsp
@C:\Users\markus\AppData\Local\Temp\nm4431.tmp
Visual Studio Incremental Link with embedded manifests
Create CMakeFiles\plplotwxwidgets.dir/manifest.rc
RC Pass 1:
C:/Program Files (x86)/Windows Kits/8.1/bin/x64/rc.exe
/foCMakeFiles\plplotwxwidgets.dir/manifest.res
CMakeFiles\plplotwxwidgets.dir/manifest.rc
LINK Pass 1:
C:\PROGRA~2\MICROS~3.0\VC\bin\amd64\link.exe /nologo
@CMakeFiles\plplotwxwidgets.dir\objects1.rsp /out:..\..\dll\plplotwxwidgets.dll
/implib:..\..\dll\plplotwxwidgets.lib
/pdb:D:\plplot-svn\build-windows-alt\dll\plplotwxwidgets.pdb /dll /version:1.2
/machine:x64 /debug /INCREMENTAL ..\..\dll\plplotcxx.lib
D:\wxwidgets\lib\vc120_dll\wxbase30ud.lib
D:\wxwidgets\lib\vc120_dll\wxmsw30ud_core.lib
D:\wxwidgets\lib\vc120_dll\wxpngd.lib D:\wxwidgets\lib\vc120_dll\wxtiffd.lib
D:\wxwidgets\lib\vc120_dll\wxjpegd.lib D:\wxwidgets\lib\vc120_dll\wxzlibd.lib
D:\wxwidgets\lib\vc120_dll\wxregexud.lib
D:\wxwidgets\lib\vc120_dll\wxexpatd.lib winmm.lib comctl32.lib oleacc.lib
rpcrt4.lib shlwapi.lib version.lib wsock32.lib ..\..\dll\plplot.lib
..\..\dll\csirocsa.lib ..\..\dll\qsastime.lib kernel32.lib user32.lib gdi32.lib
winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib
advapi32.lib /MANIFEST
/MANIFESTFILE:CMakeFiles\plplotwxwidgets.dir/intermediate.manifest
CMakeFiles\plplotwxwidg
ets.dir/manifest.res
Creating library ..\..\dll\plplotwxwidgets.lib and object
..\..\dll\plplotwxwidgets.exp
wxPLplotstream.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport)
public: __cdecl wxString::~wxString(void)" (__imp_??1wxString@@QEAA@XZ) referenced in function
"public: void * __cdecl wxString::`vector deleting destructor'(unsigned int)"
(??_EwxString@@QEAAPEAXI@Z)
wxPLplotstream.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport)
public: __cdecl wxSize::wxSize(int,int)" (__imp_??0wxSize@@QEAA@HH@Z) referenced in function
"public: void __cdecl wxPLplotstream::SetSize(int,int)"
(?SetSize@wxPLplotstream@@QEAAXHH@Z)
..\..\dll\plplotwxwidgets.dll : fatal error LNK1120: 2 unresolved externals
LINK Pass 1 failed. with 1120
NMAKE : fatal error U1077: 'D:\cmake3.8.0\bin\cmake.exe' : return code
'0xffffffff'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio
12.0\VC\BIN\amd64\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio
12.0\VC\BIN\amd64\nmake.exe"' : return code '0x2'
Stop.
As far as I can tell, all the wxWidgets libraries are present, but I admit I
did not make a thorough investigation into this.
I did a google search for the terms <msvc wxwidgets unresolved
external symbol __declspec(dllimport) public: __cdecl
wxSize::wxSize(int,int)> (related to the second linking error message above)
and found
<https://stackoverflow.com/questions/42036606/wxwidgets-visual-studio-2015-link-errors>
where it indicates that such linking errors generally occur if the preprocessor
macro WXUSINGDLL
is not #defined when shared libraries are used.
Apparently cmake/modules/FindwxWidgets.cmake does set this macro in
certain circumstances, but I wonder if those have actually occurred
in your case. To find out, please look at your cmake output. Does
the line
-- wxWidgets_DEFINITIONS <list of definitions>
include WXUSINGDLL in the list?
Assuming so, does "nmake VERBOSE=1" confirm that
-DWXUSINGDLL is being used in your compilations of wxwidgets-related
code?
I expect you will find no problems with WXUSINGDLL (since you had
visibility issues with just a few symbols and not all of them), but you should
double-check as above simply as part of your "due diligence". But
ultimately the answer may be to use a different wxwidgets
installation, see my question to Phil and Pedro above.
Alan
__________________________
Alan W. Irwin
Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).
Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__________________________
Linux-powered Science
__________________________
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Plplot-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/plplot-devel