Now I forget MSVC 2013
My cmake version is 3.1.2.
I have build all versions DEBUG MinSizeRel Release RelWithDebInfo with 
Windows 7-64 bits and MSVC 2012 Win64 bits
I have build too with Windows 7-64 bits but with MSVC 2012-32bits
CMakeCache.txt is
*******
########################
# EXTERNAL cache entries
########################

//Add extra source-tree consistency checking targets that require
// special tools
ADD_SPECIAL_CONSISTENCY_CHECKING:BOOL=OFF

//Build doxygen documentation
BUILD_DOX_DOC:BOOL=OFF

//Build Hershey fonts?
BUILD_HERSHEY_FONTS:BOOL=OFF

//Build shared libraries
BUILD_SHARED_LIBS:BOOL=ON

//Compile examples in the build tree and enable ctest
BUILD_TEST:BOOL=ON

//Build the testing tree.
BUILD_TESTING:BOOL=ON
*************

Always results is
 >test_plbuf.obj : error LNK2001: unresolved external _plsc
1>F:\Lib\test\plplot-plplot\build2012-32\examples\c\RelWithDebInfo\test_plbuf.exe
 
: fatal error LNK1120: 1 externes non résolus

With a no shared lib and with Windows 7-64 bits and MSVC 2012 Win64 bits:
*******************
########################
# EXTERNAL cache entries
########################

//Add extra source-tree consistency checking targets that require
// special tools
ADD_SPECIAL_CONSISTENCY_CHECKING:BOOL=OFF

//Build doxygen documentation
BUILD_DOX_DOC:BOOL=OFF

//Build Hershey fonts?
BUILD_HERSHEY_FONTS:BOOL=OFF

//Build shared libraries
BUILD_SHARED_LIBS:BOOL=OFF

//Compile examples in the build tree and enable ctest
BUILD_TEST:BOOL=ON

//Build the testing tree.
BUILD_TESTING:BOOL=ON
***********************

there is no error
1>  Building Custom Rule F:/Lib/test/plplot-plplot/examples/c/CMakeLists.txt
1>  CMake does not need to re-run because 
F:\Lib\test\plplot-plplot\buildstatic\examples\c\CMakeFiles\generate.stamp 
is up-to-date.
1>  test_plbuf.c
1>F:\Lib\test\plplot-plplot\examples\c\test_plbuf.c(69): warning C4101: 
'ver' : variable locale non référencée
1>  test_plbuf.vcxproj -> 
F:\Lib\test\plplot-plplot\buildstatic\examples\c\Debug\test_plbuf.exe
========== Régénération globale : 1 a réussi, 0 a échoué, 0 a été ignoré 
========== (1 success)



Le 17/03/2015 23:49, Alan W. Irwin a écrit :
> On 2015-03-17 22:38+0100 laurent Berger wrote:
>
>> with VS2013 like yesterday there is no problem but same error (like 
>> vs2012) is in test_plbuf project
>>
>> 1>  Building Custom Rule 
>> F:/Lib/test/plplot-plplot/examples/c/CMakeLists.txt
>> 1>  CMake does not need to re-run because 
>> F:\Lib\test\plplot-plplot\build\examples\c\CMakeFiles\generate.stamp 
>> is up-to-date.
>> 1>  test_plbuf.c
>> 1>F:\Lib\test\plplot-plplot\examples\c\test_plbuf.c(69): warning 
>> C4101: 'ver' : variable locale non référencée
>> 1>test_plbuf.obj : error LNK2001: symbole externe non résolu plsc 
>> (unresolved external symbol plsc)
>>
>>
>> I have investigate this error :
>> plsc is defined at line 167 of plplotp.h : extern PLDLLIMPEXP_DATA( 
>> PLStream * ) plsc;
>> Hence I have append Preprocessor definition USINGDLL and plsc is 
>> resolved now.
>> **************************
>> With error preprocessor definition are :
>> WIN32;_WINDOWS;_DEBUG;_CRT_SECURE_NO_DEPRECATE;CMAKE_INTDIR="Debug";%(PreprocessorDefinitions)
>>  
>>
>> ***************************
>> without error preprocessor definition are :
>> USINGDLL;WIN32;_WINDOWS;_DEBUG;_CRT_SECURE_NO_DEPRECATE;CMAKE_INTDIR="Debug";%(PreprocessorDefinitions)
>>  
>>
>>
>
> Hi laurant:
>
> We use the following cmake logic (see src/CMakeFiles.txt) to specify
> that the -DUSINGDLL compiler option is used for the shared library
> case.
>
> if(BUILD_SHARED_LIBS)
>   SET_SOURCE_FILES_PROPERTIES(${plplot_LIB_SRCS}
>     PROPERTIES COMPILE_FLAGS "-DUSINGDLL" )
> endif(BUILD_SHARED_LIBS)
>
> This has generally worked fine for many years, but apparently not for
> your "with error preprocessor" case for the MSVC compiler.
>
> This issue might well be a CMake bug for the MSVC case since the
> COMPILE_FLAGS property should "just work".
>
> To investigate that possible CMake bug further what cmake version are
> you using, and exactly what CMake option are you using to specify the
> "With error preprocessor definition" case?  I would like to quote that
> information if I forward a description of the issue to the CMake list
> for further help there.
>
> Also, suppose you change the above logic to
>
> if(BUILD_SHARED_LIBS)
>   SET_SOURCE_FILES_PROPERTIES(${plplot_LIB_SRCS}
>     PROPERTIES
>     COMPILE_DEFINITIONS "USINGDLL" )
>     #Maybe? COMPILE_DEFINITIONS_<config> "USINGDLL" )
> endif(BUILD_SHARED_LIBS)
>
> where <config> is one of DEBUG, RELEASE, MINSIZEREL, and
> RELWITHDEBINFO.  But I have commented out all those <config>
> possibilities because I think the overall COMPILE_DEFINITIONS
> "USINGDLL" should work for all <config> cases by default.
>
> Does that change (with or without setting COMPILE_DEFINITIONS_DEBUG)
> work around the issue that COMPILE_FLAGS is not working for you for
> the "error preprocessor definition" case?
>
>> PS
>> I cannot run wxPLplotdemo because on my computer I used vs2012 for
>> wxwidgets library.
>> If you want I can test it but I need time to change all library on my
>> computer.
>
> Actually, a thorough testing on vs2012 would be better than being
> distracted by vs2013.  So for now, let's stick with vs2012 until
> you are satisfied with it.
>
> 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
> __________________________


------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to