Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
new wxWidget(wxSmith) project
mandrav:
--- Quote from: Biplab on June 23, 2007, 06:08:53 am ---
--- Quote from: killerbot on June 21, 2007, 10:35:54 pm ---EDIT : I would suggest to get rid of that _BORLANDC_ thing, since CB code is purely targeted for GCC. And I really wonder if Borland still needs such an ugly beast.
--- End quote ---
Is it written anywhere? Or am I missing anything?
If you are talking about compiling C::B's code with Borland C++ 5.5 compiler, then you may remove that pragma. BCC 5.5 can't compile Squirrel.
--- End quote ---
Yes, he's talking about C::B's source code. It's only compilable with gcc.
killerbot:
@Biplab : don't get me wrong, I am not putting anything or anyone down.
I had tried the wizard on windows, where I get a lot of choices (like #wx). So in linux I did similar. Now I didn't get that choice although I had set up that global variable correctly. So nothing compiled. By looking into the project options I saw the wx-config and then with some help of other people we saw that in the wx284 package we installed on OpenSuse it's called wx-config-2.8. Did you notice the [EDIT] part in the post explaining the issue was fixed !!
SO I looked for the solution and put it in the post, I am sorry there's nothing more that I can do. I wrote down my experience.
And then I started my rattle on the generated code, which can be improved as I suggested.
- don't include pch headers in a header file, which was what happened !!!
- other includes were missing (never depend on a.h including b.h, be clear, if you use wxString --> include wxString.h, I don't think a user should start checking if wx/intl.h includes wxstring.h).
[Meyers and Sutter and Alexandrescu] have some interesting topics in their books on headers.
You know our wizards work, wxSmith does splendid things, and if then the code that comes out of it is clean and good C++, then we have something very beautiful.
Cheers.
byo:
--- Quote from: Biplab on June 23, 2007, 07:47:28 am ---
It'll work with wxSmith. But NOT when you'll be using it without wxSmith.
Edit 1: @Byo, Thanks for the update. :) But the problem is wxSmith adds the necessary headers whereas without wxSmith the wizard generated codes become blind.
--- End quote ---
Sorry for that :oops:. I don't know what I've done wrong but I also tested all three options for GUI designer and it compiled and run fine, I must have committed wrong script. Again sorry for the inconvenience.
Regards
BYO
Biplab:
--- Quote from: killerbot on June 23, 2007, 10:39:14 am ---@Biplab : don't get me wrong, I am not putting anything or anyone down.
--- End quote ---
First of all, Sorry for my Hot comments. :roll:
--- Quote from: killerbot on June 23, 2007, 10:39:14 am ---I had tried the wizard on windows, where I get a lot of choices (like #wx). So in linux I did similar. Now I didn't get that choice although I had set up that global variable correctly. So nothing compiled.
--- End quote ---
On Linux this method is not followed which is why we have two project files for Code::Blocks. ;)
--- Quote from: killerbot on June 23, 2007, 10:39:14 am ---By looking into the project options I saw the wx-config and then with some help of other people we saw that in the wx284 package we installed on OpenSuse it's called wx-config-2.8. Did you notice the
--- End quote ---
It's strange that it didn't work for you. I have OpenSUSE 10.2 installed and that works for me. I'm not using any pre-compiled rpm. But I believe wx-config is the actual one to be used.
--- Quote from: killerbot on June 23, 2007, 10:39:14 am ---- don't include pch headers in a header file, which was what happened !!!
--- End quote ---
My vote for this one and thanks to Byo for the change. :)
--- Quote from: killerbot on June 23, 2007, 10:39:14 am ---- other includes were missing (never depend on a.h including b.h, be clear, if you use wxString --> include wxString.h, I don't think a user should start checking if wx/intl.h includes wxstring.h).
--- End quote ---
I would differ with you on this. :) The most commonly used headers are included through <wx/wx.h> file. wxString header is also included in that header. So if it is included we don't need to include <wx/string.h> again.
If you notice the dialog sample, you'll find two extra headers are included which are not included through <wx/wx.h> file.
--- Quote from: killerbot on June 23, 2007, 10:39:14 am ---You know our wizards work, wxSmith does splendid things, and if then the code that comes out of it is clean and good C++, then we have something very beautiful.
--- End quote ---
That's what we all want. :)
Best Regards,
Biplab :)
Biplab:
--- Quote from: byo on June 23, 2007, 11:27:25 am ---Sorry for that :oops:. I don't know what I've done wrong but I also tested all three options for GUI designer and it compiled and run fine, I must have committed wrong script. Again sorry for the inconvenience.
--- End quote ---
You have made nice changes in the script and it's fine. :)
The problem is you've removed the following lines
--- Quote ---#ifndef WX_PRECOMP
#include <wx/wx.h>
#endif
--- End quote ---
Now wx.h includes a number of commonly used headers. So if it's not there, we've to include <wx/frame.h>, <wx/button.h>, etc for all the classes we want to use. There lies the problem. :)
Regards,
Biplab
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version