From: Phil R. <phi...@ya...> - 2014-08-29 17:22:51
|
Hi Alan Got both your messages. Unfortunately that cannot be where the external libraries are linked into the examples as I am building static libraries so almost that entire file (including the section you indicated) is skipped. Just to be clear, Plplot itself is building fine, the linker error is when building the examples. Phil -----Original Message----- From: "Alan W. Irwin" <ir...@be...> Sent: 29/08/2014 17:16 To: "PLplot development list" <plp...@li...> Subject: Re: [Plplot-devel] tcl build problem On 2014-08-29 02:08-0700 phil rosenberg wrote: > Hi Alan > I have cured the actual link errors - I was trying to link 64 bit tcl libraries into 32 bit plplot examples - obviously it didn't work. > > The only real issue left is the appended .lib outside the quotes. I can't find if that is something that we do or something that CMake does. I expected to find a TARGET_LINK_LIBRARIES call with either items from DRIVERS_LINK_FLAGS or ntk_LINK_FLAGS somewhere, but I can't find it. Hi Phil: Because of your subscription concerns which I discussed with you off list, I am going to send this to you twice as a test of your subscription; once via the list and once only to you. So if you get two duplicate e-mails you know all is well with your subscription. That's excellent news that you whittled down all build system issues for your MSVC platform to just one, the appended .lib. I would like to google for that issue (in case it is a CMake bug rather than a bug in our particular build system implementation). So I need to know the exact CMake generator and MSVC version that you are using. Also, if you are not currently using the -G"NMake Makefiles" generator, I would switch to that one to see if the problem disappears. And also switch to the latest CMake 2.8.x version which is currently 2.8.12.2. The reason I suggest these two changes is that the various Windows IDE generators are notoriously buggy compared to the NMake generator, but 2.8.12.2 gives you the best chance of being bug free amongst all the CMake-2.8.x alternatives. (Note that the lastest stable CMake now is version 3.0.1, but our build system is not really ready for CMake-3.0.x which is why I have suggested trying the latest CMake in the 2.8.x.y series.) With those preliminaries out of the way, it is now time to actually answer your specific question above. :-) ntk_LINK_FLAGS is used in the loop through all drivers that occurs in drivers/CMakeLists.txt. In that file, look for if(ENABLE_DYNDRIVERS) [...] foreach(SOURCE_ROOT_NAME ${DRIVERS_LIST}) where DRIVERS_LIST includes ntk so later in the logic ${SOURCE_ROOT_NAME}_LINK_FLAGS corresponds to ntk_LINK_FLAGS. Thus, if you uncomment #message("${SOURCE_ROOT_NAME}_LINK_FLAGS = ${${SOURCE_ROOT_NAME}_LINK_FLAGS}") and #message("${SOURCE_ROOT_NAME}_TARGETS = ${${SOURCE_ROOT_NAME}_TARGETS}") those will help you to see what is going on. Also, later on in that loop logic for the non-qt case you will see the following logic: add_library(${SOURCE_ROOT_NAME} MODULE ${${SOURCE_ROOT_NAME}_SOURCE}) target_link_libraries( ${SOURCE_ROOT_NAME} plplot${LIB_TAG} ${MATH_LIB} ${${SOURCE_ROOT_NAME}_LINK_FLAGS} ${${SOURCE_ROOT_NAME}_TARGETS} ) Note, in this case ${SOURCE_ROOT_NAME}_LINK_FLAGS should be a CMake list, i.e., output in message in the form "a;b;c" where a, b, and c are the elements of the list that should get translated on the command line (revealed by the VERBOSE=1 option) to a space-separated list of linker options) However, if your message output for ${SOURCE_ROOT_NAME}_LINK_FLAGS and ${SOURCE_ROOT_NAME}_TARGETS doesn't show anything peculiar, then my bet is you are running into some kind of CMake bug for the particular CMake version and generator that you are using which motivates my suggestion above to move to the most bug-free version of CMake-2.8.x.y as well as the NMake generator (which typically is more reliable than any of the Windows IDE generators). 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 __________________________ ------------------------------------------------------------------------------ Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/ _______________________________________________ Plplot-devel mailing list Plp...@li... https://lists.sourceforge.net/lists/listinfo/plplot-devel |