• Welcome to Dark Bit Factory & Gravity.
 

The best C++ or C# compiler?

Started by combatking0, January 30, 2012

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

hellfire

Can you please try this sample project?
(VC2010 will tell you that it needs to be converted because I'm still working with 2005 but that's no problem).
Challenge Trophies Won:

combatking0

The compiled exe in the package you made runs perfectly, but if I move it to a different folder and try to re-build it, nothing is created.

I have tried the same source in Borland, but it results in the same error as before.

I will try installing the compilers on a different computer.
You are our 9001st visitor.
Challenge Trophies Won:

hellfire

#22
Just remembered having a similar problem once when some overeager virus-protection immediately moved my just-created exe into quarantine.
Or is this Win7 and the application is not privileged to write to disc?
If VC++ really does not create the exe there must be some sort of error - can you post the "output" log?
Challenge Trophies Won:

combatking0

I'll put the information up when I get home. I'll give it a try on my friend's Vista computer while I'm over here.
You are our 9001st visitor.
Challenge Trophies Won:

combatking0

The output log is as follows:

Quote========== Build: 0 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========

But there is no output to be found.

I have tried Code::Blocks with the MinGW compiler installed, and it works perfectly - I will go with that for the time being. Thank you for your assistance so far. K++
You are our 9001st visitor.
Challenge Trophies Won:

combatking0

I'm now up to the point where I'm porting my knowledge of JavaScript / ActionScript into C++ for mathematical & text based operations:


// Roll a 20-sided dice 30 times
#include <iostream>
#include <cstdlib>
#include <time.h>
using namespace std;

const int BASE = 1;
const int MAX = 20;

int main(){
    int rolled = 0;
    time_t seconds;
    time(&seconds);
    srand((unsigned int) seconds);
    for(int i=0;i<30;i++){
        rolled = rand()%(MAX-BASE+1)+BASE;
        cout << rolled << endl;
    }
return 0;
}


Am I correct in thinking that I need to investigate OpenGL for portable graphic functions. DirectX would be fine for Windows only, but can OpenGL work across multiple OS platforms, such as Windows, Mac, Linux/Unix, etc?

That said, I may need to import extra compilers for Mac & Linux, but according to the documentation, that's easy to do with Code::Blocks.
You are our 9001st visitor.
Challenge Trophies Won:

Raizor

Quote from: combatking0 on March 12, 2012
Am I correct in thinking that I need to investigate OpenGL for portable graphic functions. DirectX would be fine for Windows only, but can OpenGL work across multiple OS platforms, such as Windows, Mac, Linux/Unix, etc?

OpenGL is multi-platform, so a good choice for accelerated graphics if you want to port to other platforms. You could also use something like SDL, but that's going to bump the size up quite a bit. I found OpenGL a bit tricky to get started with, but it starts making sense quite quickly :)
raizor

Challenge Trophies Won: