C++ IDE packages for windows

You can talk about almost anything that you want to on this board.

Moderator: Moderators

User avatar
DRW
Posts: 2070
Joined: Sat Sep 07, 2013 2:59 pm

Re: C++ IDE packages for windows

Post by DRW »

rainwarrior wrote:There are many non-compliant things that Visual Studio does, but most compilers are guilty of this to some degree. The most glaring to me are that MSVC lacks many parts of the C99 standard, such as initializing an array length with a variable, structure initialization with named members, stuff like that.
Does Visual Studio claim to support C99? As far as I know, it only claims to be standard compliant to C++. And as far as I know, C99 doesn't belong to the C++ standard.
rainwarrior wrote:All that said, though, it's perfectly reasonable to learn what to avoid and develop cross platform code. I'm just saying that there are a lot of things you must do to achieve this that have nothing to do with "improving" the code, and more to do with appeasing the arbitrary whims of the compiler gods.
I'd like to see a concrete example where you write a piece of code that is standard compliant, but where Visual Studio refuses to compile.
tomaitheous wrote:
Do you write games or other applications?
Right now? Just apps.
What kind of apps are written using SDL?
Available now: My game "City Trouble".
Website: https://megacatstudios.com/products/city-trouble
Trailer: https://youtu.be/IYXpP59qSxA
Gameplay: https://youtu.be/Eee0yurkIW4
German Retro Gamer article: http://i67.tinypic.com/345o108.jpg
User avatar
rainwarrior
Posts: 8062
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: C++ IDE packages for windows

Post by rainwarrior »

DRW wrote:
rainwarrior wrote:All that said, though, it's perfectly reasonable to learn what to avoid and develop cross platform code. I'm just saying that there are a lot of things you must do to achieve this that have nothing to do with "improving" the code, and more to do with appeasing the arbitrary whims of the compiler gods.
I'd like to see a concrete example where you write a piece of code that is standard compliant, but where Visual Studio refuses to compile.
Luckily for you, Microsoft keeps a list: http://msdn.microsoft.com/en-us/library/x84h5b78%28v=vs.110%29.aspx

The things that cause me more grief are the extensions they've added to the language.

For example, there are a number of miscellaneous string manipulation functions which have existing standards (albeit extra-C++/C89) that Microsoft arbitrarily chooses to ignore, instead implementing their own slightly differently named or slightly differently behaving version. Not to mention that MSVC puts a deprecation warning on quite a few standard C library functions that creates unnecessary warning spam (or the hassle of manually disabling them in every project), or even worse if your team compiles with warnings as errors and has a policy against disabling those warnings, now requiring a separate implemention to use MSVC's "secure" alternatives to these deprecated functions. There's a little bit of info on this here: http://en.wikipedia.org/wiki/String.h#Popular_extensions

Microsoft chose to implement a small subset of C99 features, neglecting others. It's a tease, really, especially since some of those features can produce better/more readable code (e.g. named member initialization of structs), or things like inttypes.h the lack of which requires every cross platform project I've worked on to have a global compiler-specific set of typedefs for MSVC and one for more C99 compliant compilers.

There are other things, but these are the ones I remember dealing with the most.

Sure, your answer to this can be "write code only to the C++ standard, and don't use any of their extensions, and don't use anything from those noncompliant fringes, and deal with their deprecation warnings", but as I said, none of this has anything to do with writing better code. At this point you're just dancing for the compiler makers. The other thing is, really learning the boundaries of the minimal standard takes years of experience working with a lot of different compilers, especially since every compiler comes with a ton of extensions on by default; this is actually a very difficult constraint for a novice programmer to live by.


As I said, though, every compiler has similar problems. Microsoft is just particularly fond of going their own way when it comes to extensions instead of adopting other existing standardized extensions that are functionally equivalent, which is rather irksome. They've deliberately created a compiler that doesn't really play well with others outside the rigid lines of the bare standards.
tepples
Posts: 22345
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: C++ IDE packages for windows

Post by tepples »

DRW wrote:as far as I know, C99 doesn't belong to the C++ standard.
As far as I know, every other C++ compiler added certain new C99 features, such as integer types, as an extension, as did C++11.
DRW wrote:What kind of apps are written using SDL?
Editors for games, for instance.
User avatar
rainwarrior
Posts: 8062
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: C++ IDE packages for windows

Post by rainwarrior »

Goat Tracker, a C64 SID music program, uses SDL, for instance. It has a lot of uses for programs that could use a cross platform primitive graphics/sound/input interface.
User avatar
DRW
Posts: 2070
Joined: Sat Sep 07, 2013 2:59 pm

Re: C++ IDE packages for windows

Post by DRW »

rainwarrior wrote:Luckily for you, Microsoft keeps a list: http://msdn.microsoft.com/en-us/library/x84h5b78%28v=vs.110%29.aspx

The things that cause me more grief are the extensions they've added to the language.
Yeah, you're probably right.
I guess the best way to make sure that your code will work no matter what is compiling it on every major compiler.
Available now: My game "City Trouble".
Website: https://megacatstudios.com/products/city-trouble
Trailer: https://youtu.be/IYXpP59qSxA
Gameplay: https://youtu.be/Eee0yurkIW4
German Retro Gamer article: http://i67.tinypic.com/345o108.jpg
tepples
Posts: 22345
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: C++ IDE packages for windows

Post by tepples »

And unfortunately, I don't see any way around paying upwards of $780 for that: $650 for a Mac mini to run Xcode and $120 for a copy of Windows 8 to dual boot and run Visual C++ Express, plus whatever else you define as a "major compiler" that is not free software.
User avatar
rainwarrior
Posts: 8062
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: C++ IDE packages for windows

Post by rainwarrior »

I run a Mac OSX virtual machine in VirtualBox to compile with Xcode sometimes. It's a lot cheaper than getting a mac.
User avatar
mikejmoffitt
Posts: 1352
Joined: Sun May 27, 2012 8:43 pm

Re: C++ IDE packages for windows

Post by mikejmoffitt »

rainwarrior wrote:I run a Mac OSX virtual machine in VirtualBox to compile with Xcode sometimes. It's a lot cheaper than getting a mac.
Neat, I did not know this was something that worked yet. I can finally get rid of this stupid old MacBook.
tepples
Posts: 22345
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: C++ IDE packages for windows

Post by tepples »

I thought OS X clients worked only in OS X hosts. Even if they work on non-OS X hosts, it's still possible copyright infringement if you're running OS X on a non-OS X host on a non-Apple computer (Apple v. Psystar).
User avatar
Banshaku
Posts: 2404
Joined: Tue Jun 24, 2008 8:38 pm
Location: Japan
Contact:

Re: C++ IDE packages for windows

Post by Banshaku »

Little Tepples said, it does work but it's not legal because of the Mac OSX license. If you don't mind the legality then yes it does run in a VM and you can even install it on a normal mbr partition if you know how to tweak it.
Drag
Posts: 1350
Joined: Mon Sep 27, 2004 2:57 pm
Contact:

Re: C++ IDE packages for windows

Post by Drag »

Are you forced to use Xcode to develop for Mac, or is there a compiler alternative? I'd love to port any software I might make to other platforms if cross-compiling wasn't such a gigantic pain to make it almost not worthwhile.
zzo38
Posts: 1080
Joined: Mon Feb 07, 2011 12:46 pm

Re: C++ IDE packages for windows

Post by zzo38 »

Drag wrote:Are you forced to use Xcode to develop for Mac, or is there a compiler alternative? I'd love to port any software I might make to other platforms if cross-compiling wasn't such a gigantic pain to make it almost not worthwhile.
If it isn't using the OS X specific features, I expect that you can just use GCC or LLVM (an installer exists now which doesn't use Xcode). I don't know how easy to cross-compiling, but if you distribute source-codes and use some common libraries which are ported to many systems (such as SDL, or even only the C standard libraries if you are making a command-line program), then it should be able to be compile on other systems by whoever has them, pretty easily.
[url=gopher://zzo38computer.org/].[/url]
User avatar
rainwarrior
Posts: 8062
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: C++ IDE packages for windows

Post by rainwarrior »

Yes, you can compile for mac using GCC if you like. Until recent versions, a modified GCC was included with Xcode, actually.

I've not tried to cross-compile for Mac from Windows before, though. I usually find that that using that kind of thing effectively requires a lot of expert knowledge of the target platform.

What's your objection to Xcode's compiler, though, Drag?
tepples
Posts: 22345
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: C++ IDE packages for windows

Post by tepples »

One objection is having to buy a Mac to (lawfully) use it.
User avatar
rainwarrior
Posts: 8062
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: C++ IDE packages for windows

Post by rainwarrior »

Post Reply