Author Topic: The best C++ or C# compiler?  (Read 15951 times)

0 Members and 1 Guest are viewing this topic.

Offline combatking0

  • JavaScript lives!
  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4569
  • Karma: 235
  • Retroman!
    • View Profile
    • Combat King's Barcode Battler Home
The best C++ or C# compiler?
« on: January 30, 2012 »
Which is the best free or paid for C++ or C# compiler available?

Are there any big differences between them?

With the dawn of the Raspberry PI, and the continuing drop of support for Flash by various software giants, I'm looking into picking up C style coding again (I coded 30 lines of it in university about 10 years ago).

It's time I got my teeth into a compiled language. ;D
You are our 9001st visitor.
Challenge Trophies Won:

Offline hellfire

  • Sponsor
  • Pentium
  • *******
  • Posts: 1294
  • Karma: 466
    • View Profile
    • my stuff
Re: The best C++ or C# compiler?
« Reply #1 on: January 30, 2012 »
Most Windows users use VC++ as it's a pretty decent compiler and an okay IDE (which is really great with some addons) and it's free if you stick to the Express edition.
Linux users use GCC. The only IDE I can recommend is QtCreator (all others suck ass) which is probably a bit too much Qt-oriented if you're not planning to use it.
« Last Edit: January 30, 2012 by hellfire »
Challenge Trophies Won:

Offline Kirl

  • Senior Member
  • Pentium
  • ********
  • Posts: 1219
  • Karma: 230
    • View Profile
    • Homepage
Re: The best C++ or C# compiler?
« Reply #2 on: January 30, 2012 »
I'm in the same boat and thinking along the same lines!

Before I had any coding experience at all I foolishly attempted C++ but failed miserably... I believe I didn't even get past installing the IDE etc. I think I'm as ready as I'll ever be for another attempt! :)
www.kirl.nl
Challenge Trophies Won:

Offline hellfire

  • Sponsor
  • Pentium
  • *******
  • Posts: 1294
  • Karma: 466
    • View Profile
    • my stuff
Re: The best C++ or C# compiler?
« Reply #3 on: January 30, 2012 »
Before I had any coding experience at all I foolishly attempted C++ but failed miserably... I believe I didn't even get past installing the IDE etc.
Hmm, maybe I could set up an example project to make the start a bit simpler...
What exactly are you heading for?
Challenge Trophies Won:

Offline combatking0

  • JavaScript lives!
  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4569
  • Karma: 235
  • Retroman!
    • View Profile
    • Combat King's Barcode Battler Home
Re: The best C++ or C# compiler?
« Reply #4 on: January 30, 2012 »
I'll try VC++ Express to begin, and upgrade to either the paid for version or the GCC compiler if I need more functionality.

I think I'll start with something simple, like creating a window and drawing some lines in it. It doesn't sound like much, but it's enough for a simple wireframe, and I'll be able to find my way round the basics of C++.

Thanks hellfire :D
You are our 9001st visitor.
Challenge Trophies Won:

Offline Kirl

  • Senior Member
  • Pentium
  • ********
  • Posts: 1219
  • Karma: 230
    • View Profile
    • Homepage
Re: The best C++ or C# compiler?
« Reply #5 on: January 31, 2012 »
That would be a great help, thanks for the offer Hellfire! My initial C++ fumblings are a long time ago though, so I should have a better understanding of things now. VC++ looks good.

I'm only interested in visual FX and playing around with sound generation etc. (though that seems like a tough subject judging from Raizors thread about soft synths). CK's line drawing sounds like a good 1st project!

[EDIT] Aha, forget lines, I'm going to try and port over my JS plasma to C++! :)
« Last Edit: January 31, 2012 by Kirl »
www.kirl.nl
Challenge Trophies Won:

Offline hellfire

  • Sponsor
  • Pentium
  • *******
  • Posts: 1294
  • Karma: 466
    • View Profile
    • my stuff
Re: The best C++ or C# compiler?
« Reply #6 on: January 31, 2012 »
Aha, forget lines, I'm going to try and port over my JS plasma to C++! :)
So we're talking about filling a pixel-buffer?

Challenge Trophies Won:

Offline Kirl

  • Senior Member
  • Pentium
  • ********
  • Posts: 1219
  • Karma: 230
    • View Profile
    • Homepage
Re: The best C++ or C# compiler?
« Reply #7 on: January 31, 2012 »
I installed VC++ 2010 and the first look at the interface confused and scared me a bit. So now I guess any comprehencible little project that does something absurdly simple would be a really great starting point! I'm going to read up on some starting docs as well.

@CK
I feel like I need your blessing for rudely jumping in here and hitching a ride in your thread? I was about to make a thread like this any day now, but you beat me to it. :)
www.kirl.nl
Challenge Trophies Won:

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Re: The best C++ or C# compiler?
« Reply #8 on: February 01, 2012 »
File->New Project->Visual C++->Win32.
Win32 Project.
"MyHotDemo"
Application Settings
Checkbox "Empty Project"

Right click "Source Files", Add->New Item. C++ File (.cpp)
"MyHotDemo.cpp"

Code: [Select]
#include <windows.h>
INT WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
    PSTR lpCmdLine, INT nCmdShow)
{
    //insert sensational Windows demo code here.
    return 0;
}
Debug->Start Debugging

Easy!  Er...

Jim
Challenge Trophies Won:

Offline Kirl

  • Senior Member
  • Pentium
  • ********
  • Posts: 1219
  • Karma: 230
    • View Profile
    • Homepage
Re: The best C++ or C# compiler?
« Reply #9 on: February 01, 2012 »
'myHotDemo.exe': Loaded 'C:\Users\Public\Documents\Programming\C++\myHotDemo\Debug\myHotDemo.exe', Symbols loaded.
'myHotDemo.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll', Cannot find or open the PDB file
'myHotDemo.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll', Cannot find or open the PDB file
'myHotDemo.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll', Cannot find or open the PDB file
'myHotDemo.exe': Loaded 'C:\Windows\SysWOW64\msvcr100d.dll', Symbols loaded.
The program '[2552] myHotDemo.exe: Native' has exited with code 0 (0x0).


It returned zero, great succes! That was easy, I think I'm ready for pixel buffers now!  ;D

Thanks jim, should I be worried about the missing PDB file?
www.kirl.nl
Challenge Trophies Won:

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Re: The best C++ or C# compiler?
« Reply #10 on: February 01, 2012 »
You should only worry if you want to debug kernel32.dll, in which case you can get them from Microsoft's symbol server. :P

Maybe here is where you want to go next http://www.dbfinteractive.com/forum/index.php?topic=1714.msg25852#msg25852

I'm surprised I can't find any of our Windows framework code posts anywhere...

Jim
Challenge Trophies Won:

Offline Stonemonkey

  • Pentium
  • *****
  • Posts: 1315
  • Karma: 96
    • View Profile
Re: The best C++ or C# compiler?
« Reply #11 on: February 01, 2012 »
I'm surprised I can't find any of our Windows framework code posts anywhere...

Jim

I'm not sure if you're meaning anything like this for buffers in the gdi:

http://www.dbfinteractive.com/forum/index.php?topic=1200.0

but the original link you gave in the thread doesn't work and all that's left is what I butchered from it.

Offline hellfire

  • Sponsor
  • Pentium
  • *******
  • Posts: 1294
  • Karma: 466
    • View Profile
    • my stuff
Re: The best C++ or C# compiler?
« Reply #12 on: February 01, 2012 »
So now I guess any comprehencible little project that does something absurdly simple would be a really great starting point!
You can have a look at this.
I'll try to put something more decent together as soon as I find some time.
Challenge Trophies Won:

Offline Kirl

  • Senior Member
  • Pentium
  • ********
  • Posts: 1219
  • Karma: 230
    • View Profile
    • Homepage
Re: The best C++ or C# compiler?
« Reply #13 on: February 01, 2012 »
Excellent! Very tidy and readable plasma code (looks great too!), thanks a bunch for that! :)
I've been exploring form elements and events today and starting from the ground. All is going surpringly well so far, I'll be patching Windows (to make it work) before you know it!  ;D

Thanks for pulling me well over the biggest hurdle all, I should be able to find my way from here!


Any good book recommendations? Prefferably graphics related, quality books can be hard to find amidst the many.
« Last Edit: February 01, 2012 by Kirl »
www.kirl.nl
Challenge Trophies Won:

Offline Raizor

  • Founder Member
  • Pentium
  • ********
  • Posts: 1154
  • Karma: 175
    • View Profile
Re: The best C++ or C# compiler?
« Reply #14 on: February 01, 2012 »
Excellent! Very tidy and readable plasma code (looks great too!), thanks a bunch for that! :)
I've been exploring form elements and events today and starting from the ground. All is going surpringly well so far, I'll be patching Windows (to make it work) before you know it!  ;D

Thanks for pulling me well over the biggest hurdle all, I should be able to find my way from here!

Yay! :)
raizor

Challenge Trophies Won:

Offline combatking0

  • JavaScript lives!
  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4569
  • Karma: 235
  • Retroman!
    • View Profile
    • Combat King's Barcode Battler Home
Re: The best C++ or C# compiler?
« Reply #15 on: February 02, 2012 »
@CK
I feel like I need your blessing for rudely jumping in here and hitching a ride in your thread? I was about to make a thread like this any day now, but you beat me to it. :)

No problem - this is a forum, and we can learn about new things together.
You are our 9001st visitor.
Challenge Trophies Won:

Offline Kirl

  • Senior Member
  • Pentium
  • ********
  • Posts: 1219
  • Karma: 230
    • View Profile
    • Homepage
Re: The best C++ or C# compiler?
« Reply #16 on: February 02, 2012 »
MssgBoard culture / etiquette can be difficult some times, thanks. ;)
www.kirl.nl
Challenge Trophies Won:

Offline combatking0

  • JavaScript lives!
  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4569
  • Karma: 235
  • Retroman!
    • View Profile
    • Combat King's Barcode Battler Home
Re: The best C++ or C# compiler?
« Reply #17 on: March 09, 2012 »
After a 2 hour installation, I have found that the trial MS Visual C++ doesn't seem to produce .exe files. I click on Build in the menus, and the report comes back successful, but the exe is nowhere to be found.

I'll try a gnu version. I've heard the Intel version creates exes which run sub-optimally on non-Intel CPUs.
You are our 9001st visitor.
Challenge Trophies Won:

Offline hellfire

  • Sponsor
  • Pentium
  • *******
  • Posts: 1294
  • Karma: 466
    • View Profile
    • my stuff
Re: The best C++ or C# compiler?
« Reply #18 on: March 09, 2012 »
After a 2 hour installation, I have found that the trial MS Visual C++ doesn't seem to produce .exe files.
If with "trial" you're talking about visual c++ express (which is not a trial but just free of charge), the exe is in the sub-folder "debug" or "release" (depends on your project configuration) relative to your project file (.vcproj).
Can you start your application from the ide (it does nothing else than running the exe) ?
« Last Edit: March 09, 2012 by hellfire »
Challenge Trophies Won:

Offline combatking0

  • JavaScript lives!
  • Senior Member
  • DBF Aficionado
  • ********
  • Posts: 4569
  • Karma: 235
  • Retroman!
    • View Profile
    • Combat King's Barcode Battler Home
Re: The best C++ or C# compiler?
« Reply #19 on: March 09, 2012 »
Both folders are empty :(
There may be a problem with the installation.

I have tried the Borland C++ compiler as well. It generates an exe, but that complains about missing dlls. This would make it inconvenient for distribution, but not a complete disaster. Unfortunately the exe, when in the same folder as the dlls returns an error message saying the program had to close.

The code I have tried is as follows:

Code: [Select]
#include <iostream>

int main(){
std::cout << "This is a test message.";
return 0;
}

I have also tried it with iostream.h but I get the same error.
« Last Edit: March 09, 2012 by combatking0 »
You are our 9001st visitor.
Challenge Trophies Won: