Hi Kyle, > I'm starting to feel like a helpless nag... no matter how many > configurations I try for wxWidgets, PLplot or my own application I > can't actually get them all to compile together. Anyways, I think > I've found at least one relevant point that should be recorded in this > thread. > > Previously I had compiled wxWidgets using ./configure within MSYS > according to another guide. This resulted in the libraries being > placed in a different folder structure than when using MinGW directly > via cmd.exe as the PLplot wiki recommends. CMake actually offers two > methods to search for wxWidgets. The variable wxWidgets_FIND_STYLE > can be set as either unix or win32. Though I didn't get the find > working with the unix style, I presume that that is why CMake had > trouble finding my copy of wxWidgets.
The Unix style needs the availibility of the command wx-config, which is only available for cygwin and msys (that I'm not sure) but also only within these environments. If you then compile a program on cmd.exe, wx-config won't work anymore (you need then the win32 style for mingw/cmd.exe). > > > Back to following the instructions on the PLplot wiki. I compiled > wxWidgets as release, shared and unicode. Then I moved on to CMake > for PLplot specifying the mswu wxWidgets configuration and the > wxWidgets_LIB_DIR. CMake found wxWidgets but failed to actually build > with the following error: > > [ 60%] Building CXX object bindings/wxwidgets/CMakeFiles/ > plplotwxwidgetsd.dir/wx > PLplotwindow.obj > Linking CXX shared library ..\..\dll\libplplotwxwidgetsd.dll > Creating library file: ..\..\dll\libplplotwxwidgetsd.dll.a > CMakeFiles\plplotwxwidgetsd.dir > \wxPLplotwindow.obj:wxPLplotwindow.cpp:(.text$_ZN > 12wxStringBaseC2EPKc[wxStringBase::wxStringBase(char const*)]+0x27): > undefined r > eference to `_imp___ZN12wxStringBase8InitWithEPKcjj' > collect2: ld returned 1 exit status This is due a bug FindwxWidgets.cmake, either add add_definitions(-D_UNICODE) to CMakeLists.txt in the plplot main file. Or look for wxUNICODE in gcc_dll/mswu/setup.h (or similar) and set it to 1. This flag is always 0 even if you compiled wxWidgets with UNICODE=1, you have to do it on your own, or set the _UNICODE flag on the command line. > > > On a side note, CMake really likes adding a 'd' onto the end of the > LIB_TAG setting. I would think that for a release build this would be > blank? This also puzzled me, but "d" stands for double not for debug. > > > And then? I recompiled wxWidgets (with both monolithic and not) and > PLplot as static, unicode and release. Compilation of both went > flawlessly, but when I compile my project I get: > > g++ -mthreads -DHAVE_W32API_H -D__WXMSW__ -D_UNICODE > -ID:\Projects\wxWidgetsTest\Libraries\wxWidgets-2.8.9\lib\gcc_lib\mswu > -ID:\Projects\wxWidgetsTest\Libraries\wxWidgets-2.8.9\include > -Wno-ctor-dtor-privacy -pipe -fmessage-length=0 > -ID:\Projects\wxWidgetsTest\Workspace\MinGW > -ID:\Projects\wxWidgetsTest\Libraries\plplot-5.9.2\buildmingw\install > \include > -O3 -Wall -c -fmessage-length=0 -owxGlade\wxMinimal.o > ..\wxGlade\wxMinimal.cpp > g++ -mthreads -DHAVE_W32API_H -D__WXMSW__ -D_UNICODE > -ID:\Projects\wxWidgetsTest\Libraries\wxWidgets-2.8.9\lib\gcc_lib\mswu > -ID:\Projects\wxWidgetsTest\Libraries\wxWidgets-2.8.9\include > -Wno-ctor-dtor-privacy -pipe -fmessage-length=0 > -ID:\Projects\wxWidgetsTest\Workspace\MinGW > -ID:\Projects\wxWidgetsTest\Libraries\plplot-5.9.2\buildmingw\install > \include > -O3 -Wall -c -fmessage-length=0 -osrc\minimal.o ..\src\minimal.cpp > g++ -oMinGW.exe -mthreads > -LD:\Projects\wxWidgetsTest\Libraries\plplot-5.9.2\buildmingw\install > \lib > -LD:\Projects\wxWidgetsTest\Libraries\wxWidgets-2.8.9\lib\gcc_lib > wxGlade\wxMinimal.o src\minimal.o -lwxmsw28u_html -lwxmsw28u_adv > -lwxmsw28u_core -lwxbase28u_xml -lwxbase28u_net -lwxbase28u -lwxtiff > -lwxjpeg -lwxpng -lwxzlib -lwxregexu -lwxexpat -lkernel32 -luser32 > -lgdi32 -lcomdlg32 -lwxregexu -lwinspool -lwinmm -lshell32 -lcomctl32 > -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 > -lplplotwxwidgetsd -lplplotd -lplplotcxxd -lcsirocsa > D:\Projects\wxWidgetsTest\Libraries\plplot-5.9.2\buildmingw\install > \lib/libplplotd.a(wxwidgets.obj):wxwidgets.cpp:(.text+0xd2a): > undefined reference to `wxStringBase::InitWith(char const*, unsigned > int, unsigned int)' > D:\Projects\wxWidgetsTest\Libraries\plplot-5.9.2\buildmingw\install > \lib/libplplotd.a(wxwidgets.obj):wxwidgets.cpp:(.text+0xd6e): > undefined reference to `wxStringBase::InitWith(char const*, unsigned > int, unsigned int)' > - followed by a bunch more undefined references Also because _UNICODE is not defined. > > > If I remove my one PLplot line ( plsdev("wxWidgets"); // just there to > force PLplot code to be included ) and remove other include etc > references to PLplot the project builds fine with just wxWidgets. > > I know that I need to develop my linker debugging abilities, but in > the mean time, I would obviously still appreciate pointers or > solutions. HTH, Werner -- Dr. Werner Smekal Institut fuer Allgemeine Physik Technische Universitaet Wien Wiedner Hauptstr 8-10 A-1040 Wien Austria email: sme...@iap.tuwien.ac.at web: http://www.iap.tuwien.ac.at/~smekal phone: +43-(0)1-58801-13463 (office), +43-(0)1-58801-13469 (laboratory) fax: +43-(0)1-58801-13499 ------------------------------------------------------------------------------ Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) software. With Adobe AIR, Ajax developers can use existing skills and code to build responsive, highly engaging applications that combine the power of local resources and data with the reach of the web. Download the Adobe AIR SDK and Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com _______________________________________________ Plplot-general mailing list Plplot-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-general