Newcommer to C++, asking (not) for IDE of choice

This is a discussion on Newcommer to C++, asking (not) for IDE of choice within the C++ Programming forums, part of the General Programming Boards category; Hello everyone. I'm still learning C++. I do not plan to use this as a career move. Too old to ...

  1. #1
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,581

    Newcommer to C++, asking (not) for IDE of choice

    Hello everyone.

    I'm still learning C++. I do not plan to use this as a career move. Too old to change carreers. Mostly I plan to build on my programming knowledge and use C++ as an hobby to build open source cross-platform apps. My current plan involves a tiered Play by Email Strategy system, others can use to build their worlds, from sci fi to medieval fantasy worlds. Complete with player client app, server,...

    Anyways, I'm currently using Dev-C++. I'm planning on using Allegro with AGUP in order to guarantee true cross platform code, others can use to port the system. However, I must say I'm starting to have doubts regarding Dev-C++.

    My first problem starts with the debugger interface. It is not very powerful is it? I've downloaded and installed Insight. So I believe I got this problem sorted out. It's a much, much, better interface to gdb... i think... is it?

    Next comes the fact Dev-C++ doesn't see an upgrade for well over an year now. Is the development dead? Quite strange giving that the latest version is a beta version.

    I've tried also Visual C++ 2005 Express and Visual C++ 6 of which I own a Enterprise Studio license from my VB good ol' days. My fear with these is that they add proprietary libraries to the source code and I can't even seem to be able to install Allegro for VC 6.

    What would you choose in case all you wanted was to program for fun and pleasure and wanted to put a real emphasis on open and portable code with the help of libraries the likes of Allegro, wxWidgets and Boost?

    Thak you for your time.

  2. #2
    semi-colon generator ChaosEngine's Avatar
    Join Date
    Sep 2005
    Location
    Chch, NZ
    Posts
    597
    I'd use visual C++ 2005. it's by far the best IDE I've encountered.
    Visual C++ does not "add proprietary libraries to the source code". It may link in proprietary libraries when building, but there is no reason you can't build open and portable code on visual c++. Just don't use any .net, win32, mfc, atl or com and you'll be fine. you may also want to disable ms-specific language extenstions. Go to project properties->C/C++->Language and set "Disable Language Extensions" to yes. (while you're there I'd also set "Force Conformance In For Loop Scope" to yes)

    DO NOT USE VC6. It's a terrible compiler.
    "I saw a sign that said 'Drink Canada Dry', so I started"
    -- Brendan Behan

    Free Compiler: Visual C++ 2005 Express
    If you program in C++, you need Boost. You should also know how to use the Standard Library (STL). Want to make games? After reading this, I don't like WxWidgets anymore. Want to add some scripting to your App?

  3. #3
    Hardware Engineer
    Join Date
    Sep 2001
    Posts
    1,398
    I’ve never done any cross-platform programming, so don’t give the following too much weight:

    My fear with these is that they add proprietary libraries...
    Yes, most compilers include extra non-standard libraries, including Visual C++, Dev-C++, and any other Windows compiler.

    But, you don't have to use those library functions, and most compilers have a standard-compliant mode. Of, course, at the fully-portable, fully-standard-compliant end of the spectrum, you don’t get any color, graphics, mouse, etc.

    Somewhere in the middle, you have cross-platform and multi-platform applications. For those applications, you can use the OpenGL, Allegro, etc., libraries.

    Then, at the far other end, you have platform specific applications, like Windows programs written with Visual C++ or Dev-C++.

    I believe the trick is to separate your code into 3 sections, and compile them separately.

    1. Fully-standard portable code (The “meat” of your program).

    2. Cross-platform library graphics, etc.

    3. System specific libraries, if any.

    If you're not sure what's standard and what's not, here are a couple of good standard C++ references:
    Dinkumware.com
    CPPreference.com
    If you don't find it it those references, its not included in the C++ language standard.
    For the ultimate standard C++ reference, you can download a PDF copy of the actual ANSI C++ Language Standard for about $20.
    Last edited by DougDbug; 05-25-2006 at 05:01 PM.

  4. #4
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,581
    I'd use visual C++ 2005. it's by far the best IDE I've encountered.
    It is, isn't it? I was fairly impressed with it too. And the debugger is excellent too. I love the ability to change my source code (to an extent) while in debug mode.

    Ok, so that is good news. It irked me to no end to see the following as a console source code baseline for a C++ 2005 project:
    Code:
    #include "stdafx.h"
    
    
    int _tmain(int argc, _TCHAR* argv[])
    {
    	return 0;
    }
    Good to know I can toss all that and program straight code with the standard library, the STL and any other libraries I may choose. No doubt this way, and with both its IDE and debugger features, C++ 2005 becomes a much better solution.

  5. #5
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,581
    I believe the trick is to separate your code into 3 sections, and compile them separately.

    1. Fully-standard portable code (The “meat” of your program).

    2. Cross-platform library graphics, etc.

    3. System specific libraries, if any.
    Thanks Doug!

    My perception of a the type of cross-platform code I would like to build is thankfully not very demanding Mostly I want to cover Windows, Linux, FreeBSD and MacOS X. Hence libraries like Allegro and wxWidgets. Let's face it, these days, cross platform development is not rocket science... It's more like lego.

    The process by which I will attain portability is similar to what you propose. However, I'm looking more at the functional side of the code. If we look at it, I'm not really doing any cross platform. That has been done for me in those libraries, I'm just making sure I'm not using any system based libraries and that I don't write any machine dependant code. I will though follow a similar strategy to the one you suggest in my code. All bindings between my base code and library specific code will be inside a wrapper, for easier access.

  6. #6
    Hardware Engineer
    Join Date
    Sep 2001
    Posts
    1,398
    Let's face it, these days, cross platform development is not rocket science... It's more like lego.
    The funny thing is... When you go to the computer store, you don't see that many programs available for more than one platform. Or, you find version 6 for Windows and version 5 for Mac. So, I suspect there's a little more to it in the "real world".

  7. #7
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,581
    No doubt it is. But my little free open source PbeM engine is nothing in comparison to a full blown game from, say Blizzard

    As long as I stick to portable libraries to deal with the machine specific parts of a program (graphics and disk access, for instance, to name a couple), I'm sure i'll reduce greatly many of the problems.

  8. #8
    Registered User
    Join Date
    Mar 2006
    Posts
    725
    Blizzard has 100 technical developers, 250 graphics designers... there's no need to go head-to-head with them. Find your own niche. A good storyline and a balanced gameplay will do wonders, even in text-based DOS.
    Code:
    #include <stdio.h>
    
    void J(char*a){int f,i=0,c='1';for(;a[i]!='0';++i)if(i==81){
    puts(a);return;}for(;c<='9';++c){for(f=0;f<9;++f)if(a[i-i%27+i%9
    /3*3+f/3*9+f%3]==c||a[i%9+f*9]==c||a[i-i%9+f]==c)goto e;a[i]=c;J(a);a[i]
    ='0';e:;}}int main(int c,char**v){int t=0;if(c>1){for(;v[1][
    t];++t);if(t==81){J(v[1]);return 0;}}puts("sudoku [0-9]{81}");return 1;}

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem with loop
    By HAssan in forum C Programming
    Replies: 6
    Last Post: 01-20-2006, 05:04 PM
  2. Program with Shapes using Virtual Functions
    By goron350 in forum C++ Programming
    Replies: 12
    Last Post: 07-17-2005, 02:42 PM
  3. Linked List Help
    By CJ7Mudrover in forum C Programming
    Replies: 9
    Last Post: 03-10-2004, 10:33 PM
  4. Menu Help
    By CJ7Mudrover in forum C Programming
    Replies: 7
    Last Post: 03-09-2004, 09:59 AM
  5. Contest Results - May 27, 2002
    By ygfperson in forum A Brief History of Cprogramming.com
    Replies: 18
    Last Post: 06-18-2002, 02:27 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21