From: Werner S. <sm...@ia...> - 2006-08-16 11:16:14
|
Hi, I made the latest plplot code compile with Visual C++ 2005 using nmake makefiles (static build) together with the wxwidgets and wingcc drivers (and some others). Here are the necessary commands: * cd plplot * mkdir buildnmake * cd buildnmake * cmake -G "NMake Makefiles" -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_PREFIX=plplot_install -DBUILD_SHARED_LIBS=OFF -DBUILD_TEST=ON -DwxWidgets_ROOT_DIR=%WXWIN% -DwxWidgets_LIB_DIR=%WXWIN%\lib\vc_dll -DwxWidgets_CONFIGURATION=mswd -DwxWidgets_USE_REL_AND_DBG=FALSE -DwxWidgets_USE_MONOLITHIC=ON .. * nmake * cd examples * copy %WXWIN%\lib\vc_dll\wxmsw26d_vc_custom.dll . * copy ..\..\..\data\*.fnt . * x01c.exe * .... I use a shared/monolithic/debug wxWidgets library (nmake -f makefile.vc SHARED=1 MONOLOTHIC=1 BUILD=debug). It compiles all samples until x21c.c where the problem with the unknown reference to _isnan arises. I had to make the following changes though: 1) I added $ENV{LIB} to the paths in FindGDI32.cmake, in order gdi32.lib is found for MSDEV environment, i.e. find_library( GDI32_LIBRARY NAMES gdi32 PATHS ${GDI32_LIBRARY_DIRS} $ENV{LIB} NO_SYSTEM_ENVIRONMENT_PATH ) 2) In example x17c.c I replaced errcode with pl_errcode, since errcode is somehow already defined in Visual C++ 2005 (its just a local variable, so this should be no problem). 3) In wxwidgets.cmake I removed the check for ENABLE_DYNDRIVERS, since I doesn't see the necessity for this - the wxwidgets driver should also work in static build (and actually does work). Problems may arise, if the wxWidgets library is static, but this we have to test. Alan, could you please make these changes? Here is also the CMake summary: Important CMake results: CMAKE_SYSTEM_NAME: Windows SWIG_FOUND: 0 PERL_FOUND: YES X11_FOUND: CMAKE_INSTALL_PREFIX: C:/DevZone/plplot/buildnmake/plplot_install CMAKE_BUILD_TYPE: Debug CMAKE_C_COMPILER CMAKE_C_FLAGS: C:/Programme/Microsoft Visual St udio 8/VC/bin/cl.exe /DWIN32 /D_WINDOWS /W3 /Zm1000 CMAKE_CXX_COMPILER CMAKE_CXX_FLAGS: C:/Programme/Microsoft Visual St udio 8/VC/bin/cl.exe /DWIN32 /D_WINDOWS /W3 /Zm1000 /EHsc /GR LIB_TAG: d ENABLE_DYNDRIVERS: OFF DEVICES_LIST: hp7470;hp7580;lj_hpgl;mem;null;pbm;plmeta;ps;wingcc;wxwidgets;xfig DRIVERS_LIST: hpgl;mem;null;pbm;plmeta;ps;wingcc;wxwidgets;xfig Library options: BUILD_SHARED_LIBS: OFF PL_DOUBLE: ON Optional libraries: HAVE_QHULL: OFF WITH_CSA: OFF HAVE_FREETYPE: HAVE_PTHREAD: Language Bindings: ENABLE_f77: OFF ENABLE_f95: OFF ENABLE_cxx: ON ENABLE_java: OFF ENABLE_python: OFF ENABLE_octave: ENABLE_tcl: OFF ENABLE_itcl: OFF ENABLE_tk: OFF ENABLE_itk: OFF ENABLE_pdl: OFF As you can see, wingcc, wxwidgets are available and also working (apart from the wingcc bugs). Here is also the error report for the x21c.c example plplotd.lib(plgridd.obj) : error LNK2019: unresolved external symbol _isnan refe renced in function _grid_nnli x21c.exe : fatal error LNK1120: 1 unresolved externals NMAKE : fatal error U1077: 'C:\PROGRA~1\MICROS~4\VC\bin\cl.exe' : return code '0 x2' Stop. NMAKE : fatal error U1077: '"C:\Programme\Microsoft Visual Studio 8\VC\BIN\nmake .exe"' : return code '0x2' Stop. NMAKE : fatal error U1077: '"C:\Programme\Microsoft Visual Studio 8\VC\BIN\nmake .exe"' : return code '0x2' Stop. Regards, Werner |