-  [WT]  [PS]  [Home] [Manage]

[Return]
Posting mode: Reply
Name
Email
Subject   (reply to 5565)
Message
File
Password  (for post and file deletion)
  • Supported file types are: GIF, JPG, PNG, TXT
  • Maximum file size allowed is 5120 KB.
  • Images greater than 200x200 pixels will be thumbnailed.
  • Currently 422 unique user posts. View catalog

  • Blotter updated: 2009-07-22 Show/Hide Show All

File 125673803391.gif - (2.18MB , 410x174 , Morgan Freeman.gif )
5565 No. 5565
Heya, stupid newbie here.

I'm learning how to program in C++, and have just written a simple game (our old favourite 'guess the random number').
Now I know C++ sucks for general portability, but I want to know if it'd be possible for me to produce an executable version of my .cpp code in Ubuntu 9.04 that could run on my friend's Windows Vista?

After a little Google research, I've figured that I'll need a cross-compiler. However, all the guides basically said 'make one yourself lol'.
So before I look enviously at the Java coders sharing what they have in the bright meadowy pastures, is there a simple-to-install magical cross-platform compiler that'll save the day for me?

Pic, as ever, unrelated.
Expand all images
>> No. 5566
gcc
>> No. 5568
It's not the C++ that's bad for portability, it's how you compile it, and which libraries you use.

Using OpenGL, OpenAL for graphics and sound (for example) means you don't need to change those parts of the code across platforms. Using Direct3d and DirectSound means you're limited to Windows.

Generally the building of code into an exe is one of the easiest things, once you know which tools to use (gcc as ^^^ put it).
>> No. 5571
OP here.

I am currently using g++ on the NetBeans IDE.
NetBeans doesn't like it when I set gcc as a compiler, I think it only see's gcc as a C compiler.

Problem I'm having is that I can only build a file as a tar/zip/rpm/blah blah blah file, but not a .exe file. Is this down to using g++?
>> No. 5572
File numbers.txt - (1.79KB )
5572
http://www.megaupload.com/?d=HAG0CE8K

Right, compiled it with g++. Let's see if it ports at all.

A note to anyone wanting to help me: you're a goddamn moron for downloading an executable file from a stranger on the internet. Seriously wtf are you thinking?

Source code provided.
>> No. 5573
>>5572

This is why we vmware.
>> No. 5588
>>5573
Amen
>> No. 5590
I get you with images bitch screw the executable!
>> No. 5692
>>5590
pic or it didn't happen
>> No. 5712
>>5572
this is why we use vmware -> revert to snapshot
>> No. 5730
>>5712
redpill + vm =

if you dont know what the redpill is... google it
>> No. 5922
This is why we use linux
[Return]


Delete post []
Password  
Report post
Reason