Very Frustrated with 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!
Dark Alchemist
Super wx Problem Solver
Super wx Problem Solver
Posts: 347
Joined: Wed Nov 02, 2005 10:33 am

Very Frustrated with wxWidgets.

Post by Dark Alchemist »

I am a total newb to gui writing and I have to wonder if wxWidgets expects only old timers to switch to it? You know the old MFC writers.

I have had nothing but issues when I attempt to compile anything that is not in the samples directory (they compile fine). Using MSVC 7.1 and wxWidgets is just a pain in my rear but I do not want to switch to a gnu compiler simply to make wxwidgets work smoothly.

Sure I imagine it is something I am doing but nothing should be this damn hard or esoteric to get going. I am not trying to perform some black arts and turn lead into gold I am just trying to make a simple hello world gui app in a release build. If I can make a "hello world" app in MFC or API in a few minutes and I am still stumbling around in the dark with wxWidgets that means it is extreme newb unfriendly.

Just felt I had to vent because I am seriously looking for another answer over wxWidgets as my time is finite and trying to get this up and running seems to require an infinite amount of my time which I do not have.
Jorg
Moderator
Moderator
Posts: 3971
Joined: Fri Aug 27, 2004 9:38 pm
Location: Delft, Netherlands
Contact:

Post by Jorg »

Well if you are only here to vent and not expect any answers, then please switch. If you want it solved, post compiler errors and perhaps hints in what you want to compile.

The problem is, programming in general is not easy. When you want easy to compile applications, stick to one platform, one IDE, and perhaps use Visual Basic. Easier then that is nearly impossible ;-)

So, trying to write a toolkit that compiles on three major OS'es and also provide enough to let users work with it flawlessy is very hard. There are efforts in making project wizards to generate sources for you, but the difficulty lies in the many combinations how you can compile wxWidgets. There is unicode / ansi, dll / static, debug / release, universal / normal, monolithic / seperate libs, and all numerous switches you can use to toggle components on and off.

So, if you tell us how you compiled wxWidgets (your preferred build config) and show project settings + errors you get we can help. Otherwise we can't ..

- Jorgen
Forensic Software Engineer
Netherlands Forensic Insitute
http://english.forensischinstituut.nl/
-------------------------------------
Jorg's WasteBucket
http://www.xs4all.nl/~jorgb/wb
upCASE
Moderator
Moderator
Posts: 3176
Joined: Mon Aug 30, 2004 6:55 am
Location: Germany, Cologne

Re: Very Frustrated with wxWidgets.

Post by upCASE »

Hi!
Dark Alchemist wrote:I am a total newb to gui writing and I have to wonder if wxWidgets expects only old timers to switch to it? You know the old MFC writers.
Short answer: No, it doesn't.
Long answer: You don't have to be a MFC guru for wxWidgets, although it may help as the general "language" constructs (like event handling) are similar. Setting up your compiler for use with wxWidgets may be a task to solve, but it's neither esotric, nor impossible. It's just the same with every new lib you want to use (http://forums.wxwidgets.org/viewtopic.php?t=3505).
Dark Alchemist wrote: I have had nothing but issues when I attempt to compile anything that is not in the samples directory (they compile fine). Using MSVC 7.1 and wxWidgets is just a pain in my rear but I do not want to switch to a gnu compiler simply to make wxwidgets work smoothly.
Funny story: We had a thread started recently about userfriendlyness and making it easier for MVC developers to switch to wxWidgets.
The outcome of this discussion lead to two things in "development":
1. A wxWidgets installer by me, that does compiles the libs (and additional stuff) after installing the sources automatically (to make it easier for newbies) (http://forums.wxwidgets.org/viewtopic.php?t=4755).
2. A MSVC project wizard for wxWidgets to create the basic project setup just like with MFC through a wizard. A preview can be found here http://forums.wxwidgets.org/viewtopic.php?t=4625.
I do have another version of a project wizard myself which I could bundle with the installer. I guess for the next version I will do so.
Dark Alchemist wrote: Just felt I had to vent because I am seriously looking for another answer over wxWidgets as my time is finite and trying to get this up and running seems to require an infinite amount of my time which I do not have.
You're welcome to do so.
Feel free to post any specific questions and I'm sure somebody will be happy to help you.

Again (my statement): Setting up wxWidgets is not a problem of the lib itself, but a combination of "know your tools" and the fact that wxWidgets itself is compiler-independant. Creating a convenient auto-generated setup is hard as you can'r cover all possible compiler-IDE setups. With the gnu tools it is easier, but only in some places, the general problem is the same for all compilers.

Thanks anyway for the "input". In addition to what I posted in the discussion, I now really have the feeling that things should be simplyfied even more. If not for all at least for the "majority" of the new users (MSVC).
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
User avatar
ABX
Can't get richer than this
Can't get richer than this
Posts: 810
Joined: Mon Sep 06, 2004 1:43 pm
Location: Poznan, Poland
Contact:

Re: Very Frustrated with wxWidgets.

Post by ABX »

Dark Alchemist wrote:Sure I imagine it is something I am doing but nothing should be this damn hard or esoteric to get going.
Well, wxWidgets is not perfect and we all the time read valuable feedback about how to improve it but in general majority of users find it easy to use so in lack of any other error mentioned I can only suggest that you have some hardware failure ;)
Dark Alchemist wrote:Using MSVC 7.1 and wxWidgets is just a pain in my rear but I do not want to switch to a gnu compiler simply to make wxwidgets work smoothly.
But the world is not just MSVC vs. GCC. At least three other compilers work smoothly with wxWidgets on Windowses.
Dark Alchemist wrote:If I can make a "hello world" app in MFC or API in a few minutes and I am still stumbling around in the dark with wxWidgets that means it is extreme newb unfriendly.
If Apache administrator cannot adjust IIS settings shortly and PhotoShop user cannot understand concepts of GIMP then I would only say that previous environment somehow "closed" his mind for other solutions. Good programmer is not the one who knows everything but the one who knows how to find solutions to his problems including asking experts with smart questions. The way you described your problem doesn't help us to give you a hand so just good lack.

ABX
Last edited by ABX on Wed Nov 02, 2005 11:18 am, edited 1 time in total.
CVS Head, 2.8.X
wxMSW, wxWinCE, wxPalmOS, wxOS2, wxMGL, bakefile
gcc 3.2.3, bcc 5.51, dmc 8.48, ow 1.6, vc 7.1, evc 3/4, pods 1.2
Dark Alchemist
Super wx Problem Solver
Super wx Problem Solver
Posts: 347
Joined: Wed Nov 02, 2005 10:33 am

Post by Dark Alchemist »

Up Case, I totally agree and the reason I said it was probably me. All of the time I have been banging my head trying to get this thing up and running. All of it has been to get it to work with my compiler, which is MSVC.

I will check out your links here in a second but, as I said, the issues I have I read on your mailing lists archieves so others had them but they never had a response. When I saw that I flipped my lid and came in here to vent for there is one thing that really sets me off and that is to see others with my exact issue without a reply.
upCASE
Moderator
Moderator
Posts: 3176
Joined: Mon Aug 30, 2004 6:55 am
Location: Germany, Cologne

Post by upCASE »

Dark Alchemist wrote: I will check out your links here in a second but, as I said, the issues I have I read on your mailing lists archieves so others had them but they never had a response. When I saw that I flipped my lid and came in here to vent for there is one thing that really sets me off and that is to see others with my exact issue without a reply.
For the links: Don't expect too much. At least my installer isn't perfect yet, although reports show that it works. There are still things that need fixing and the project wizard will have to be included. Maybe I find some time today and update it.

For the mailing-list: I can't comment on that as I don't access the mailing list on a regular basis, not do I post there. But my guess is that these questions get posted there a lot and maybe that's why people don't reply to each question. Again (and I guess this counts for the mailing list, too): We're happy to help you if we can. Or at least give you some links.
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
User avatar
ABX
Can't get richer than this
Can't get richer than this
Posts: 810
Joined: Mon Sep 06, 2004 1:43 pm
Location: Poznan, Poland
Contact:

Post by ABX »

Dark Alchemist wrote:as I said, the issues I have I read on your mailing lists archieves so others had them but they never had a response.
I miss where you said it, and I cannot verify whether that's true because your problems are still unknown to me and you do not quote mailing lists but reality is that we cannot handle every thread due to time limits but we do our best to give a hand once the problem is described precisely and once human resources are available.

ABX
CVS Head, 2.8.X
wxMSW, wxWinCE, wxPalmOS, wxOS2, wxMGL, bakefile
gcc 3.2.3, bcc 5.51, dmc 8.48, ow 1.6, vc 7.1, evc 3/4, pods 1.2
Dark Alchemist
Super wx Problem Solver
Super wx Problem Solver
Posts: 347
Joined: Wed Nov 02, 2005 10:33 am

Post by Dark Alchemist »

Well, I understand about your time so I am not mad just overly frustrated.

I just used the installer from the first link and will see what happens now.

So far I think my problem is in know which libs to force msvc to exclude and which ones to include.

I found a list of ones and when I add those in it compiles and then errors out. So, I told it to ignore msvcrt.lib and it no longer had those 2 errors but had hundreds more. So, let me see what this new installer did for me and I will see if it compiles now.

Thanks all for being understanding. :)

edit: Reader - 1439 error(s), 3 warning(s) when I remove MSVCRT.lib

edit: At least yours compiles. YAY! I let it have msvcrt.lib and it compiled but gave me this.

Reader.cpp(88) : warning C4100: 'event' : unreferenced formal parameter
Reader.cpp(95) : warning C4100: 'event' : unreferenced formal parameter
Reader.cpp(100) : warning C4100: 'event' : unreferenced formal parameter
Generating Code...
Linking...
LINK : warning LNK4089: all references to 'ADVAPI32.dll' discarded by /OPT:REF

Is that good or bad or indifferent?
upCASE
Moderator
Moderator
Posts: 3176
Joined: Mon Aug 30, 2004 6:55 am
Location: Germany, Cologne

Post by upCASE »

Dark Alchemist wrote: edit: Reader - 1439 error(s), 3 warning(s) when I remove MSVCRT.lib

edit: At least yours compiles. YAY! I let it have msvcrt.lib and it compiled but gave me this.

Reader.cpp(88) : warning C4100: 'event' : unreferenced formal parameter
Reader.cpp(95) : warning C4100: 'event' : unreferenced formal parameter
Reader.cpp(100) : warning C4100: 'event' : unreferenced formal parameter
Generating Code...
Linking...
LINK : warning LNK4089: all references to 'ADVAPI32.dll' discarded by /OPT:REF

Is that good or bad or indifferent?
I'd say "indifferent" if it works :)
The warnings simply mean that you defined a "event" variable or reference somewhere, but don't use it. This is not a big issue, just a warning that you should revise the code and leave out the unneeded parameters. To prevent this warning from showing up, wxWidgets has the WXUNUSED() macro. Simply enclose the parameter with it and the warnings should be gone.

About the linker warning: Seems like advapi32 is not used.

In general you can link with all wxWidgets libraries. MSVC does a pretty good job and optimizes well. Adding all libs won't result in a code bloat.
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
Dark Alchemist
Super wx Problem Solver
Super wx Problem Solver
Posts: 347
Joined: Wed Nov 02, 2005 10:33 am

Post by Dark Alchemist »

Ahhh, the code bloat was my fear. I still consider warnings as errors because it means something is not right someplace. Old habit.

Anyways, thanks much because I compiled my code per the instructions but something must have been wrong. I did notice that yours did a release build instead of the debug build is that going to be an issue? I know when I compiled mine it seemed to have been in a perptual debug mode even though I told it release and when I did a release compile it would complain profusely.
toxicBunny
Super wx Problem Solver
Super wx Problem Solver
Posts: 424
Joined: Tue Jul 12, 2005 8:44 pm
Location: Alabama, USA

Post by toxicBunny »

Just a few notes from someone who uses VS2002 and VS2003 on a regular basis...

If you get errors or warnings about MSVCRT.LIB or something similar, you probably have a mixed environment. By this I mean that you have a mix of runtime libraries that are being used. Be sure to compile you application with the same settings you used to compile the wxWidgets libraries. If you compile WX to use the multi-threaded debug dll version of the runtime libraries, your app also has to use these settings. This is on the Configuration -> C/C++ -> Code Generation tab in the project properties. Ignoring a library should only be done if you have no control over the build settings of the library causing the conflict. It's generally best for all libraries to use the same settings.

I also hate to see warnings. However, the ones you mentioned aren't really problematic and can be solved using the WXUNUSED() macro already mentioned.

Due to the complexity of the libraries and build system to accomodate so many systems/compilers/linkers/etc., the initial setup of wxWidgets is the worst part of using the library. Once I figured out the build settings, it was all smooth sailing in general.

Again, post any errors you get and we'll be glad to help. Response times on the forum are generally faster than those on the mailing list.

-Scott
Dark Alchemist
Super wx Problem Solver
Super wx Problem Solver
Posts: 347
Joined: Wed Nov 02, 2005 10:33 am

Post by Dark Alchemist »

Well, the one thing that is getting me is trying to find a nice ide for wxWidgets. I played with Delphi 18 months ago and that had to be the easiest gui making application I have ever seen.

So, I have tried all of the free helper apps on listed on the site and each one is nice in its own way but not exactly what I wanted compared to Delphi.

What do you use? By hand?
sethjackson
Super wx Problem Solver
Super wx Problem Solver
Posts: 396
Joined: Wed Oct 05, 2005 1:19 am

Post by sethjackson »

Dark Alchemist wrote:Well, the one thing that is getting me is trying to find a nice ide for wxWidgets. I played with Delphi 18 months ago and that had to be the easiest gui making application I have ever seen.

So, I have tried all of the free helper apps on listed on the site and each one is nice in its own way but not exactly what I wanted compared to Delphi.

What do you use? By hand?
Code::Blocks :)

http://www.codeblocks.org/
Dark Alchemist
Super wx Problem Solver
Super wx Problem Solver
Posts: 347
Joined: Wed Nov 02, 2005 10:33 am

Post by Dark Alchemist »

The one I liked the least. It has power but lacks the easy ability of a WYSIWYG type editor. Draw on a gridded palette and there you go a gui.

wxDesigner is almost what I am after but it is a tad primitive in comparison.

For pay wxVisualSetup 2003 looks like what I want but no demo and I don't buy blindly.
sethjackson
Super wx Problem Solver
Super wx Problem Solver
Posts: 396
Joined: Wed Oct 05, 2005 1:19 am

Post by sethjackson »

Dark Alchemist wrote:The one I liked the least. It has power but lacks the easy ability of a WYSIWYG type editor. Draw on a gridded palette and there you go a gui.
Well if you are looking for something like WYSIWYG then C::B isn't really for you. BTW I code everything by hand. :lol:
Locked