A frustrated newbie in wxWidgets

This forum is reserved for everything you want to talk about. It could be about programming, opinions, open source programs, development in general, or just cool stuff to share!
Post Reply
jjoe
Earned a small fee
Earned a small fee
Posts: 23
Joined: Sun May 28, 2006 10:46 pm

A frustrated newbie in wxWidgets

Post by jjoe » Sun May 28, 2006 11:25 pm

Hello,

I am new to wxWidgets, but not to C++.

I tried to compile a hello world samle of wxWidgets for two days, but what I had are only link errors.

I don't expect so many details at the first beginning. I have to compile the library myself. There are many details needs to adjust in VC. I feel that even one unmatched setting will not work.

Now I am wondering is this a problem for all of the GUI libraries in C++ or it's just for wxWidgets. Is it because that it tries to support many platforms and many compilers so it becomes a complicated collection after some time?

Thanks for listening my complains.

upCASE
Site Admin
Site Admin
Posts: 3176
Joined: Mon Aug 30, 2004 6:55 am
Location: Germany, Cologne

Re: A frustrated newbie in wxWidgets

Post by upCASE » Mon May 29, 2006 7:01 am

Hi1
jjoe wrote:Now I am wondering is this a problem for all of the GUI libraries in C++ or it's just for wxWidgets. Is it because that it tries to support many platforms and many compilers so it becomes a complicated collection after some time?
Yes and no. :)
I general there are always problems when compiling such a "big beast" like a GUI library. But other toolkits do it in other ways, so it might be easier. MFC for example is precompiled and integrated with VC. You can't use it with gcc or on other platforms, but the setup is quite easy.
Qt integrates with VS, too. One can compile it with gcc, but I guess it would just be as complicated as wxWidgets.

There are many settings when compiling and things to think of. Not every platform supports all features, not even every compiler supports all settings. In fact using the standard projetcs for VC should work fine and it should compile the library and give you a proper working environment to build the samples. Changing the config, you'll have to change it for the samples as well.

Because setting up wxWidgets can be hard some times I created an installation wizard some time ago. Maybe just try it to get you running:
http://forums.wxwidgets.org/viewtopic.php?t=4755
Note that it still needs some work, features version 2.6.2, not 2.6.3 and is not official.
OS: OpenSuSE, Ubuntu, Win XP Pro
wx: svn
Compiler: gcc 4.5.1, VC 2008, eVC 4

"If it was hard to write it should be hard to read..." - the unknown coder
"Try not! Do. Or do not. There is no try." - Yoda

jjoe
Earned a small fee
Earned a small fee
Posts: 23
Joined: Sun May 28, 2006 10:46 pm

Post by jjoe » Tue May 30, 2006 10:39 pm

Thanks for your reply, upCASE.

I am transfering to Qt right now.
After one-day working, I have succefully built a simple program.
That's better than wxWidgets, I guess. There are also more good written documents about Qt. (Although the installation guide is also not very comprehensive.)

Although I can only run it with mingW compiler in open source version, I found a patch which makes it work under VC 2005. I'll try it in next few days.

My final goal is to add GUI to my existed OpenGL program, and I feel like Qt is a better choice. (It seems like Qt is originally designed for this purpose. Just a feeling.)

spicerun
Earned a small fee
Earned a small fee
Posts: 24
Joined: Thu Aug 04, 2005 8:14 pm
Location: Dallas Texas

Post by spicerun » Wed May 31, 2006 3:12 am

jjoe wrote:Thanks for your reply, upCASE.

I am transfering to Qt right now.
...and I feel like Qt is a better choice. (It seems like Qt is originally designed for this purpose. Just a feeling.)
Even though Qt is free as long as your application is GPL licensed, you are aware that you are not allowed to distribute the library with your app (even the free Qt sources), right? Anyone who wants to use your app with Qt will have to install the Free GPL'd version of Qt on their system straight from Trolltech first.

Cygwin also has this limitation, even though it is nearly GPL (Red Hat actually has it under their licensing). You can't distribute the cygwin.dll file yourself; it has to be downloaded from Cygnus/Red Hat and installed on the system to run a Cygwin app (at least from the last time I read the license).

This is why I stick with wxWidgets & MinGW that has no such restrictions on what you can distrubute with your app on any platform.

Now to hear about how wrong I am.....but I don't think so, I finely combed through the licensing when I was deciding on what I would base my applications on.

upCASE
Site Admin
Site Admin
Posts: 3176
Joined: Mon Aug 30, 2004 6:55 am
Location: Germany, Cologne

Post by upCASE » Wed May 31, 2006 7:19 am

jjoe wrote:I am transfering to Qt right now.
Feel free to do so. Personaly I worked with Qt before (about two years ago, didn't try newer versions), but I didn't like it. Just my 2 cents..
jjoe wrote:My final goal is to add GUI to my existed OpenGL program, and I feel like Qt is a better choice. (It seems like Qt is originally designed for this purpose. Just a feeling.)
Hmmm...
Hard to tell. Both wxWidgets and Qt are good for GUI creation. Qt uses ownerdrawn widgets, while wxWidgets uses native ones. Depends on what you like better I guess.
wxWidgets and Qt are almost equal when it comes to functionality and count of classes. I confess that Qts docs are better and more complete most of the times, as Trolltech updates them and offers commercial support. Thats why Qt isn't really free. There's a company behind it, while wxWidgets has an open source community.

Anyway: Choose whatever suits you better.
IMHO, wxWidgets has a few drawbacks, but still is the best toolkit. In additionto that, it's free ;-)
OS: OpenSuSE, Ubuntu, Win XP Pro
wx: svn
Compiler: gcc 4.5.1, VC 2008, eVC 4

"If it was hard to write it should be hard to read..." - the unknown coder
"Try not! Do. Or do not. There is no try." - Yoda

Vexator
I live to help wx-kind
I live to help wx-kind
Posts: 187
Joined: Sun Jan 30, 2005 2:50 pm
Location: Heidelberg, Germany

Post by Vexator » Wed May 31, 2006 7:23 am

ogl works pretty well with wx. i've never had any problems, even with multiple viewports:

Image
Windows 7 Pro
Visual Studio 2010
wxWidgets 2.9.3

upCASE
Site Admin
Site Admin
Posts: 3176
Joined: Mon Aug 30, 2004 6:55 am
Location: Germany, Cologne

Post by upCASE » Wed May 31, 2006 7:43 am

Great example.
Maybe this should be featured on the new wxWidgets site.
OS: OpenSuSE, Ubuntu, Win XP Pro
wx: svn
Compiler: gcc 4.5.1, VC 2008, eVC 4

"If it was hard to write it should be hard to read..." - the unknown coder
"Try not! Do. Or do not. There is no try." - Yoda

sethjackson
Super wx Problem Solver
Super wx Problem Solver
Posts: 396
Joined: Wed Oct 05, 2005 1:19 am

Post by sethjackson » Wed May 31, 2006 12:43 pm

upCASE wrote:Great example.
Maybe this should be featured on the new wxWidgets site.
Yeah. That is a nice app. 8)

dsk
Experienced Solver
Experienced Solver
Posts: 91
Joined: Sat Jun 25, 2005 12:10 pm
Location: Poland

Post by dsk » Wed May 31, 2006 1:07 pm

Vexator wrote:ogl works pretty well with wx. i've never had any problems, even with multiple viewports:

Image
wow, it looks great :)
Could you describe this soft in new topic ?

about current topic,
BIG projects like wxWidgets, have many files, then there are problems with compiling, generally with start.
You need to spend some time to learn something about wxWidgets - as me, but I have intervals :( - now I'm back :P

Anyway, about compilation, then wxwidgets samples have everything set up under VC++ compilers, I use old VC++ 6.0 and it works great...
I don't know what with other compilers, but you can find informations about compiler settings in documentation.

edit: here you have compilers settings:
http://wxwidgets.org/docs/tutorials.htm

have a nice day,
dsk
Back to wxWidgets and c++, from long time with php projects

cpp
I live to help wx-kind
I live to help wx-kind
Posts: 195
Joined: Wed Sep 28, 2005 9:42 pm

Post by cpp » Wed May 31, 2006 7:37 pm

Holly S#!T Vexator!! thats one fine looking app! :D
is that an Ubersoldier map editor?
Hier Kommt die Sonne...

Vexator
I live to help wx-kind
I live to help wx-kind
Posts: 187
Joined: Sun Jan 30, 2005 2:50 pm
Location: Heidelberg, Germany

Post by Vexator » Wed May 31, 2006 7:53 pm

Windows 7 Pro
Visual Studio 2010
wxWidgets 2.9.3

MoonKid
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 543
Joined: Wed Apr 05, 2006 9:39 am
Contact:

Re: A frustrated newbie in wxWidgets

Post by MoonKid » Thu Jun 01, 2006 7:26 pm

jjoe wrote:Hello,
I don't expect so many details at the first beginning. I have to compile the library myself.
Yeah I hate this, too. Just look at
http://forums.codeblocks.org/index.php?topic=1701.0
to know how to build wx.
jjoe wrote: There are many details needs to adjust in VC. I feel that even one unmatched setting will not work.
Do not use this IDE. It is to complex and unergonomic. You described it by yourself! I used MSVC for a lot of years. I know what you mean.
Just use Code::Blocks, Dev++, Eclipse or one of the others very good available C++ IDEs.

I was using Qt for a lot of years, too. wxWidget is better. Inteligent design, powerfull, more easy to use (if it compiles), faster and better support (I LOVE the community!), total portable, etc

I am a newbie, too. Be free to contact me directly.

jjoe
Earned a small fee
Earned a small fee
Posts: 23
Joined: Sun May 28, 2006 10:46 pm

Post by jjoe » Fri Jun 02, 2006 3:51 pm

Thanks for all of your replies, guys.
Actually, I don't like the library either if there's company behind it. It seems like there are some tricky rules when you publish the works.

to MoonKid:
The reason that I like VC is because of its debugging tools. Under VC 2005, in debug mode, I can only get a variable's value by moving the mouse over it. If the variable is a huge array, the information is organized in units of 100 elements. But after watching your advice, I would very glad to try another compiler.

Post Reply