PlanetSquires Forums

Support Forums => General Board => Topic started by: José Roca on February 02, 2014, 12:35:56 PM

Title: PowerBASIC alternatives
Post by: José Roca on February 02, 2014, 12:35:56 PM
> Good luck to all and maybe I will see some of you in the C++ (Clang/LLVM), CodeBlocks, CodeLite, wxWidgets world.

Can you tell us your experiences with these tools?

I haven't done almost anything in programming since Bob's death mainly because I haven't found yet a compiler of my liking.
Title: Re: PowerBASIC alternatives
Post by: Robert Eaton on February 02, 2014, 01:29:25 PM
> Good luck to all and maybe I will see some of you in the C++ (Clang/LLVM), CodeBlocks, CodeLite, wxWidgets world.

Wow. Yet again not the announcement I (and I'm sure many of us) were hoping for.
Thanks Paul for all your hard work.
I'll be intrigued to know which direction you decide to go.

Bob
Title: Re: PowerBASIC alternatives
Post by: Paul Squires on February 02, 2014, 01:32:41 PM
Hi Jose, a year ago I tried my hand at C#. Not that difficult but the whole .NET situation always concerned me. There are different versions of .NET so you always need to ensure the framework exists on the target machine. Obviously it is Windows only as well. After a month of studying and using C#, I decided not to pursue it any longer and waited for something to happen with PB.

My main desires is to have a development environment that I can take anywhere with me on a portable hard drive (that's why I can't use Visual Studio). One that produces standalone exe's and is an industry standard. CLang/LLVM is an incredible project that has gained tremendous industry backing since its inception. Likewise, if your perception of C++ is from what you've seen of C and C++ from 5 or 10 years ago, then take a close look at the new C++11 standard. It makes everything much easier and without the fear of blowing up your system that comes with using low level C.

For the past month I have been setting up my system and trying to learn the basics. I am using CLang as the front end to the GCC compiler toolchain (MinGW). Once the paths and search directories are set up then everything works with no trouble. Sometimes that setup can be a little confusing especially given the hand holding we are used to with PB.

My goal is to do cross platform (Windows, Linux, Mac) development using wxWidgets in 32 and 64 bit environments. The tools I've chosen allow that. I will continue to refine my setup and tools as I gain more knowledge and experience. I am still a newbie at this point.

http://clang.llvm.org/
http://www.codeblocks.org/
http://codelite.org/
http://www.mingw.org/
http://www.wxwidgets.org

These are the books that I am waiting for Amazon.com to deliver this week:

"Professional C++"
Marc Gregoire, Nicholas A. Solter and Scott J. Kleper
http://www.amazon.ca/dp/0470932449/ref=rdr_ext_tmb

"The C++ Standard Library: A Tutorial and Reference (2nd Edition)"
Josuttis, Nicolai
http://www.amazon.ca/The-Standard-Library-Tutorial-Reference/dp/0321623215/ref=zg_bs_939946_4
Title: Re: PowerBASIC alternatives
Post by: Patrice Terrier on February 03, 2014, 08:16:38 AM
Paul--

Why i have an older experience with C# than you, i also never used it in code production for the same reasons.

I also selected C++ to be cross Platform compatible.

Perhaps we could start a new PB++ community where we could share what we have learned as individual during the process of translating our PB code into C++, because we are all faced to the same syntax problems, aren't we?

If there is a demand for it, we could create a new PB++ section on Jose Roca's forum.
Jose ?

...



Title: Re: PowerBASIC alternatives
Post by: James Fuller on February 03, 2014, 10:37:26 AM
Paul,
  I tried the wxWidget route with one of my earlier bcx forks -> ubx.
I might have continued but the base translator had a number of bugs that I was not able to fix.
Ubx also lacked a lot of features I wanted that were available in the windows bcx.
I decided to go with bc9Basic and primarily Windows only.

The wxWidget library is outstanding but daunting.
Forget everything you know about gui development and placement unless you have some gtk experience.
Everything is containers inside containers inside containers .....

Deployment can be a real pain. I ended compiling for both static and shared libraries.
shared for development and static for deployment.

I only did 32bit and that was a PIA also. I wanted to stay current with g++ so everytime I upgraded I had to recompile the wxWidget library.

I would love to see a forum section on Jose's site for this discussion.

I would like to know why you went with wxWidgets over:
FTLK -> www.fltk.org
Qt -> http://qt-project.org/
IUP -> http://www.tecgraf.puc-rio.br/iup/

James


Title: Re: PowerBASIC alternatives
Post by: Michael Stefanik on February 03, 2014, 02:38:15 PM
First, I'd say don't let the .NET runtimes alone put you off of C#. It's an elegant language, but I'll admit that diving into the Framework can seem daunting a first. That said, if you're primarily interested in cross-platform development, I would suggest learning C first as your foundation and then move on to C++. If you think of it like a house, C is the foundation, the beams, the wiring and plumbing. And like a lot of things, if you want to learn something new, it's advantageous to go from the ground up.

I would also say that you shouldn't be afraid of how "dangerous" C is, or reputed to be. Yes, it gives you a fair length of rope with which to hang yourself (or more precisely, your program), but that's how you learn. The good practices for writing efficient, reliable and safe code in C will carry forward when you start working in C++.

Some additional books for you to look into:

The C Programming Language (http://www.amazon.com/Programming-Language-2nd-Brian-Kernighan/dp/0131103628/ref=la_B000AQ1TNQ_1_1?s=books&ie=UTF8&qid=1391450367&sr=1-1) - Kernighan & Ritchie
C: A Reference Manual (http://www.amazon.com/Reference-Manual-5th-Edition/dp/013089592X/ref=sr_1_1?ie=UTF8&qid=1391450679&sr=8-1&keywords=c+a+reference+manual) - Harbison & Steele
The C++ Programming Language (http://www.amazon.com/The-Programming-Language-4th-Edition/dp/0321563840/ref=sr_1_1?ie=UTF8&qid=1391450534&sr=8-1&keywords=C%2B%2B+Programming+Language) - Bjarne Stroustrup
Title: Re: PowerBASIC alternatives
Post by: Paul Squires on February 03, 2014, 03:31:55 PM
Thanks Mike - I have coded a bit in C over the years so I do have a little bit of a foundation there ("little bit" being the key words) :)  There was some crossover to using PB and WinAPI to deal directly with allocated memory and pointers, etc. My experience with C# was excellent in terms of the language. I bought a couple of (large) C# programming books and worked through them. The CLR has amazing functionality and allows you to concentrate on programming rather than reinventing the wheel like we do in PB for even the basic of generic programming algorithms. That was refreshing.

I am excited with starting to learn C++. Hopefully it will give me a renewed vigour towards programming.
Title: Re: PowerBASIC alternatives
Post by: Paul Squires on February 03, 2014, 03:50:48 PM
Quote from: James Fuller on February 03, 2014, 10:37:26 AM
I would like to know why you went with wxWidgets over:
FTLK -> www.fltk.org
Qt -> http://qt-project.org/
IUP -> http://www.tecgraf.puc-rio.br/iup/

James
wxWidgets uses native API's on each of its supported platforms. No themes needed to make controls look like native controls. It is also integrated tightly with C++ and has been around since 1992. Hard to argue against a library that has stood the test of time for 20 years. :)