On 2013-03-16 13:17-0700 phil rosenberg wrote: > Hi Arjen, Alan > Sorry I've been so busy at work this week I haven't kept up with this.
> Arjen you are absolutely correct, you cannot mix libraries built with /MT /MD /MTd and /MDd. Every library you build into an executable must use the same runtime library - if you don't stick to this rule then you will get awful and difficult to track down linker errors. The same is true to some extent of the character set - if you have one library which uses wxString or std::string and is built as unicode and try to mix with another non built with unicode then project will not link. In both cases missing and or clashing symbols will be the issue. Spotting these link errors is not always easy, but look out for mention of debug or string related errors and this is often a clue. Having a file with DEBUG or NDEBUG incorrectly defined can cause similar problems. This was a bug I reported to Alan last week. Are you generating a visual studio project from cmake? If so check the preprocessor definitions for each file for incorect definitions. Thanks, Phil, for this clarification. What is the current status of that DEBUG or NDEBUG problem? Has that now been fixed? If not, send me a patch (or remind me of one you sent earlier) that I should be evaluating. <aside> One of my pet peeves with the Windows platform (including the Wine version of it that I use) is that knowledgeable Windows developers like you have to waste a lot of time dealing with all this stuff (building your own free libraries and tools with consistent flags). Linux developers are really lucky that the Linux distributions handle all this so we can just concentrate on developing. An obvious solution is to have groups of interested Windows developers, develop distributions themselves (that include all the compile flags they prefer for all free libraries and tools that they build). But it appears nobody but the Cygwin group have ever taken this systematic approach on Windows. Another way of saying this is why are there more than 500 different groups on Linux willing to make unique distributions for their particular needs, but only one group of developers has attempted that systematic approach on Windows? Maybe it is time that Windows developers of free software start getting better organized? </aside> > [...] If you want to try playing with shapelib as Alan suggested then you can use cmake to build it, however the code is just plain C I think so you can just create a new lib/dll solution and add the files. I'm pretty sure that's all I did. Then you can play around with the settings in visual studio if you like. As I recall, Arjen uses the command-line to build rather than an IDE. To cover that case, I suggest he copy a modified form (since he can drop all the C++ flag processing) of the CMake logic stanza concerning STATIC_RUNTIME from cmake/modules/plplot.cmake to cmake/external/shapelib/CMakeLists.txt. Then set STATIC_RUNTIME consistently for both the shapelib and PLplot builds, and he should be fine (from what you have said above) for at least that PLplot dependency. 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 __________________________ ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_mar _______________________________________________ Plplot-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/plplot-devel
