Joseph_f2
Posts: 45
Joined: Mon Jan 07, 2013 12:38 am

How do I make exe's for raspberry pi?

Thu Sep 12, 2013 4:58 pm

How do I make exe's for raspberry pi?

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 12208
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: How do I make exe's for raspberry pi?

Thu Sep 12, 2013 5:06 pm

They are not called .exe's because linux executables are not specifically called .exe's.

Also on linux an executable doesn't need to have any specific file extension, if a file is an executable file depends on status flags of the file, not simply on the file extension.

http://askubuntu.com/questions/156392/w ... n-exe-file

if you mean how to write programs for the PI, then the answer is that there are numerous ways, but programs in the ".exe style" are most often made with compilers, like C compilers. Under linux the GCC compiler is polular.


P.S Joe_schmoe's comment is typical of the type "ask a silly question, get a silly answer", (AKA "garbage in-garbage out") don't mind him. :mrgreen:

OtherCrashOverride
Posts: 582
Joined: Sat Feb 02, 2013 3:25 am

Re: How do I make exe's for raspberry pi?

Thu Sep 12, 2013 5:18 pm

I think the intent of OP's post is: What IDE do I use to make a program for the Pi?

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: How do I make exe's for raspberry pi?

Thu Sep 12, 2013 5:20 pm

OtherCrashOverride wrote:I think the intent of OP's post is: What IDE do I use to make a program for the Pi?
In which case, the answer is 'vi'.
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

Dutch_Master
Posts: 360
Joined: Sat Jul 27, 2013 11:36 am

Re: How do I make exe's for raspberry pi?

Thu Sep 12, 2013 6:31 pm

Not Emacs?

No, don't answer that :P As for the OP, the fact he's asking means he lacks the knowledge to use either, so I propose nano instead :)

Heater
Posts: 13264
Joined: Tue Jul 17, 2012 3:02 pm

Re: How do I make exe's for raspberry pi?

Thu Sep 12, 2013 7:29 pm

The open posters question might well be "How do I make an executable program for the Pi?"
Which deserves a serious answer.

So how about, start with a standard "Hello World" program in C. See Google for examples. Save it as a file hello.c.

Now compile it:

$ gcc -o hello hello.c

Now you have an executable file named "hello". Run it like so:

$ ./hello

There you go. Build on that.

User avatar
pluggy
Posts: 3635
Joined: Thu May 31, 2012 3:52 pm
Location: Barnoldswick, Lancashire,UK
Contact: Website

Re: How do I make exe's for raspberry pi?

Fri Sep 13, 2013 6:11 am

I'd suspect that somebody at the obvious level of the OP wouldn't need to compile anything. Just get the precompiled stuff with apt-get. I've been involved with Linux for the better part of 20 years and been using it as my primary desktop OS for 10, I can count the programs I ever compiled myself on the fingers of my 2 hands.

BASH 'Hello World'

Code: Select all

#!/bin/bash
echo 'Hello World'
;)
Don't judge Linux by the Pi.......
I must not tread on too many sacred cows......

Heater
Posts: 13264
Joined: Tue Jul 17, 2012 3:02 pm

Re: How do I make exe's for raspberry pi?

Fri Sep 13, 2013 7:56 am

pluggy,

You are doing something wrong:)

I started out with Linux in 1997. One of the first things that I had to prove to myself I could do is build a whole Linux system from the kernel up to X and some apps. Later KDE. It did take a couple of months of research, downloading and compiling. Using a 100MHz 486 at the time made it a long process. Waking up one morning to find I had actually managed to compile a kernel that boot's was just magic.

Of course now I'm happy to use most software out of the box. But often I find I need some new feature of a program that is not in an older version that's in Debian. So it's back to building it myself.

Making "exes" is something all Linux users should know, even if they don't write the code themselves, and is a big part of the point of creating the Pi in the first place. "Hello world" is a good place to start.

Twinkletoes
Posts: 210
Joined: Fri May 25, 2012 9:44 pm

Re: How do I make exe's for raspberry pi?

Fri Sep 13, 2013 9:33 am

Sounds like you're a Windows bunny like me. What I do is to install mono.2.10 on the pi, and write code in C# in VS2010. I then deploy the dlls and exe to the Pi and run it using
> mono myApp.exe

Runs about 1% slower than native C++

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23614
Joined: Sat Jul 30, 2011 7:41 pm

Re: How do I make exe's for raspberry pi?

Fri Sep 13, 2013 9:42 am

Twinkletoes wrote:Runs about 1% slower than native C++
I don't beleive that....!
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

Heater
Posts: 13264
Joined: Tue Jul 17, 2012 3:02 pm

Re: How do I make exe's for raspberry pi?

Fri Sep 13, 2013 9:55 am

I don't believe that either !

Mind you I open to being surprised. I have rewritten some of our C++ server processes, not for the Pi, in JavaScript. I was amazed that under node.js they end up using as much CPU load for the same throughput as the C++ does.

User avatar
redhawk
Posts: 3465
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1

Re: How do I make exe's for raspberry pi?

Fri Sep 13, 2013 10:01 am

Making "exes" is something all Linux users should know, even if they don't write the code themselves, and is a big part of the point of creating the Pi in the first place. "Hello world" is a good place to start.
Compiling stuff on Linux is easy, if you download an application source distro you need to un-zip, un-tar, run the configuration script usually ./configure then make and maybe make install.
What really gets my goat about the compiling process is the speed and the compiler errors so sometimes having pre-compiled ELF binaries can be a blessing.
However if you're running uncommon hardware like Ultrix or OSF/1 and need a copy of a program doesn't exist in binary format like irc-ii then you have no other choice. :)

Richard S.

User avatar
Jessie
Posts: 1754
Joined: Fri Nov 04, 2011 7:40 pm
Location: C/S CO USA

Re: How do I make exe's for raspberry pi?

Fri Sep 13, 2013 5:51 pm

Joe Schmoe wrote:
OtherCrashOverride wrote:I think the intent of OP's post is: What IDE do I use to make a program for the Pi?
In which case, the answer is 'vi'.
Reccomending vi to a new Linux user is a good way to make sure they go right back to windows. Vi has no place on a modern OS. It's 2013 nothing should expect the user to memorize obfuscated hot keys.

Heater
Posts: 13264
Joined: Tue Jul 17, 2012 3:02 pm

Re: How do I make exe's for raspberry pi?

Fri Sep 13, 2013 6:04 pm

Jessie,
Reccomending vi to a new Linux user is a good way to make sure they go right back to windows.
Quite so. Better to keep up with times and recommend vim :)

vim did not send me back to Windows back in 1997.

flyinghappy
Posts: 115
Joined: Mon Nov 05, 2012 5:31 pm

Re: How do I make exe's for raspberry pi?

Fri Sep 13, 2013 7:14 pm

redhawk wrote:
Making "exes" is something all Linux users should know, even if they don't write the code themselves, and is a big part of the point of creating the Pi in the first place. "Hello world" is a good place to start.
Compiling stuff on Linux is easy, if you download an application source distro you need to un-zip, un-tar, run the configuration script usually ./configure then make and maybe make install.
What really gets my goat about the compiling process is the speed and the compiler errors so sometimes having pre-compiled ELF binaries can be a blessing.
However if you're running uncommon hardware like Ultrix or OSF/1 and need a copy of a program doesn't exist in binary format like irc-ii then you have no other choice. :)

Richard S.

Code: Select all

make &>log.log &tail -f log.log
will output to the screen and capture everything in log.log so you can go back and look :)
Pi with ArchLinux running a minidlna/samba home server

Return to “General discussion”