From: <be...@ya...> - 2003-12-17 17:54:33
|
Greg Chicares escribió: >Bernardo Arlandis Mañó wrote: > > >>I'm trying to build wxwindows apps for windows from linux and I'm >>having problems linking with the wxwindows libraries. I'm using the >>wxwindows cvs source,after installing the libraies in >>/usr/local/i586-mingw32msvc/lib/ I have: >> >> >[snip list of wx libraries] > > >>I compile my app with the parameters provided by 'wx-config >>--cxxflags --libs', like this: >>i586-mingw32msvc-g++ >>-I/usr/local/i586-mingw32msvc/lib/wx/include/msw-2.5-i586-mingw32msvc >>-I/usr/local/i586-mingw32msvc/include -D__WXMSW__ -mthreads >>-L/usr/local/i586-mingw32msvc/lib -mthreads -Wl,--subsystem,windows >>-mwindows -lwx_msw_html-2.5-i586-mingw32msvc >>-lwx_msw_adv-2.5-i586-mingw32msvc -lwx_msw_core-2.5-i586-mingw32msvc >>-lwx_base_xml-2.5-i586-mingw32msvc -lwx_base_net-2.5-i586-mingw32msvc >>-lwx_base-2.5-i586-mingw32msvc -lwx_msw_xrc-2.5-i586-mingw32msvc -o >>app.exe app.cpp >> >>I get a lot of undefined references (messages are in spanish): >>/tmp/ccPX7Q4E.o(.text+0xdd):app.cpp: referencia a `wxLocale::Init(int, >>int)' sin definir >>/tmp/ccPX7Q4E.o(.text+0xf3):app.cpp: referencia a >>`wxLocale::AddCatalog(char const*)' sin definir >>/tmp/ccPX7Q4E.o(.text+0xf8):app.cpp: referencia a `wxXmlResource::Get()' >>sin definir >>... >> >> > >Does it help if you change the library order? For instance, >try moving the 'xrc' library to the beginning of the list, >and see whether that takes care of wxXmlResource::Get(). > > > I've tried it but no. >Can you successfully build the sample apps in wx/samples/? > > Good point, I've tried and they work. I've seen it uses the option -WXUSINGDLL for the compiler. I've tried it and now the errors are like this: /tmp/cc7YZW6G.o(.text+0xdd):app.cpp: referencia a `_imp___ZN8wxLocale4InitEii' sin definir /tmp/cc7YZW6G.o(.text+0xf5):app.cpp: referencia a `_imp___ZN8wxLocale10AddCatalogEPKc' sin definir /tmp/cc7YZW6G.o(.text+0xfc):app.cpp: referencia a `_imp___ZN13wxXmlResource3GetEv' sin definir Now this is the command line: i586-mingw32msvc-g++ -I/usr/local/i586-mingw32msvc/lib/wx/include/msw-2.5-i586-mingw32msvc -I/usr/local/i586-mingw32msvc/include -D__WXMSW__ -DWXUSINGDLL -mthreads -L/usr/local/i586-mingw32msvc/lib -mthreads -Wl,--subsystem,windows,--version-script,./version-script -mwindows -lwx_msw_core-2.5-i586-mingw32msvc -lwx_base-2.5-i586-mingw32msvc -lwxtiff-i586-mingw32msvc -lwxjpeg-i586-mingw32msvc -lwxpng-i586-mingw32msvc -lwxzlib-i586-mingw32msvc -lwxregex-i586-mingw32msvc -lwxexpat-i586-mingw32msvc -mthreads -lrpcrt4 -loleaut32 -lole32 -luuid -lwinspool -lwinmm -lshell32 -lcomctl32 -lcomdlg32 -lctl3d32 -ladvapi32 -lwsock32 -lgdi32 -o app.exe app.cpp I don't know why the samples work, maybe it's because they use the compilation directories instead of the installation ones. Maybe the problem is the installation I've done with "make install". It's strange that I have the libraries and I can see the symbols listed, but the linker can't find them. I'm gonna try to compile it like a sample, but I can't understand what it's failing. It uses a script called bk-deps to run the compiler, I don't know what it does. > > >>I'm using the wxwindows cvs source >> >> > >I see messages on wx...@li... suggesting >that their CVS HEAD isn't stable. If you're using that, >then you might try a stable release. > > > I did it, but it had broken makefiles for the contrib stuff that I need. >You might want to try posting your message on one of the >wx mailing lists too, if you haven't already. > > > My address is blacklisted there, I don't know why. Thanks and regards. -- Bernardo Arlandis Mañó http://personales.ya.com/berarma/ |