![]() |
wxWidgets problem
Hey guys!
Mmm, i just installed wxWidgets 2.8.4 - it's the first time i've used it... im running Fedora 4. I installed it using: :
COMPILING USING CONFIGUREall went fine - but when i tried to create this app from this tutorial: http://www.bzzt.net/~wxwidgets/icpp_wx1.html it didnt compile - however i could compile the samples included with the wxWidgets package just fine... i get this error: :
...obviously its not linking - i've set the $LD_LIBRARY_PATH to include /usr/local/lib which is where wxWidgets libraries are located... i added -I/usr/local/include/wx-2.8/ to get the includes - but then gave more errors on linking. i didnt play around with the $LIBS variable in the Makefile (i.e. -L/usr/local/lib/) because im not very familiar with linking... the flags are very foreign to me, its actually a little scary! here is the full code: :
// basic.h:
// basic.cpp:
// basic_resources.rc:
// Makefilei hope someone can help! any response will be much appreciated! :D |
You need to include wx.h in your header file so that the wx classes are recognizable in that file.
If you get a linker error talking about "duplicate resources," you need to comment out the wx.rc include line. |
mmm - didnt seem to work! :/
ill have a good look at the samples included and see whats missing! ill post back if im still stuck! thanks for help! :) |
Lets make this easy on you, when on Linux you should not do X11 you should do wxGTK (that would be --with-gtk). Once you have that done you should use the wx-config tool, not hard code all the options. This means you can build program with this simple command line:
:
g++ myapp.cpp `/usr/local/bin/wx-config --libs --cflags`Also you have a lot of "msw" type path and even a windows *.exe file doesn't make much sense on Linux. |
guys i have no idea what im doing here! i always have trouble iwth GUIs they give me a headache all that macro crap and whatnot!
ok - why mustn't i use X11??? i know GTK is another windowing system - but not all distros have it? but they all certainly have X11 right? mmm, i didnt get a chance to work on this this weekend - gonna try look at it between work, so busy these days :/ |
GTK is much better supported and maintained then the port X11. You don't want to run into trouble that is due to bugs in the library. All distros have GTK. GTK is the GUI toolkit used by GIMP, Gaim and the Gnome desktop. Even KDE based distros have GTK because lots of linux apps are written with GTK.
|
ok coolio! thanks for the advice man... sure didnt know that stuff! :D
|
| All times are GMT -5. The time now is 2:30 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC