you should type:
if your file is in the current directory.
also, you might check if executable bit is set with
ls -al a.out
and if not, set it using
chmod +x a.out
however, most compilers will set executable bit for you automagically.
You need to put a ./ in front of a.out in order to execute that:
When you type the name of a program such as a.out the system looks
for the file in your PATH. On my system, PATH is set to
Yours is probably similar. To check, enter ...
Assuming you're using Raspbian, you need to find out which .deb file you need, and transfer those to your Raspberry Pi, and place them in /var/cache/apt/archives/partial, and then just use the command:
sudo dpkg -i /var/cache/apt/archives/partial/xxxx
where xxxx is the exact name of the .deb file you want to install
If you need to find dependencies, http:/...
This depends on what libraries you wish to link your code with. If you are using the Raspbian images, the architecture is "armhf" and the compilation flags are:
If you are compiling for Debian "armel" arch, the compilation flags are different.
Please note that this answer only applied to the 256 MB version of the Raspberry Pi. The 512 MB version should have sufficient free memory to compile MongoDB without additional adjustments
While reading about low-memory situation's in general, I found suggestions to simply increase the swap space to remedy the situation.
So, after reading bearbin's answer, ...
The RPI ARM core is an ARM 1176jzf-S, the suitable flags should then be
-march=armv6zk -mcpu=arm1176jzf-s -mfloat-abi=hard -mfpu=vfp
Drop the -mfloat-abi=hard -mfpu=vfp when on a soft float distro.
These flags can be found by running gcc -mcpu=native -march=native -Q --help=target on gcc >= 4.7`
To install programs on machine unable to access internet
enter command as normal and read output look towards end of results for the failed to fetch lines and enter these links into a web capable machine, save the links to a usb memory stick. Repeat for all failed to fetch lines
*pi@raspberrypi ~/pi $ sudo apt-get install scrot
Reading package lists... ...
What is the difference between kernel "3.18.11" and "3.18.11-v7+"?
The -v7+ is tacked on to indicate this isn't from a vanilla source tree, and that it was compiled specifically for the Pi 2.
I'm planning to get this kernel source: wget https://github.com/raspberrypi/linux/archive/rpi-3.18.y.tar.gz Is this the correct source for my kernel?
No. If you ...
Here is a Guide how to compile seafile-client on Raspbian Wheezy:
1) Install all dependencies available in the repository:
sudo apt-get install qt4 doxygen cmake sqlite3 libsqlite3-dev openssl libssl-dev libevent-2.0-5 libevent-dev python-pip libjansson-dev automake libtool libglib2.0-dev uuid-dev valac libfuse-dev libcurl4-gnutls-dev
#wait very long time
Linux, like unix, is fundamentally a C based system, and gcc, the native C compiler, is probably the most widely used C compiler in the world today.
The GNU Fortran compiler is gfortran. It is also part of GCC (the CC is for "Compiler Collection", the G is for GNU, and gcc is the usual name of the C compiler executable). It used to be called g77. There are ...
To compile Object-C:
clang <the file name, i.e. bob.m> -o <the target name, i.e. bob>
clang bob.m -o bob
Foundation is part of GNUStep which will have to be installed.
sudo apt-get install gnustep
You will then need to tell clang about it.
clang `gnustep-config --objc-flags` bob.m -o bob `gnustep-config --base-libs`
In short, Yes, they will work. Both repositories use the same upstream code to build their packages.
That is, armhf binaries from armbian will run on an armhf raspbian.
Your problem won't binary compatibility but dependency compatibility. Using a statically linked executable will resolve the dependency compatibility at the expense of binary size.
Looks like it's in the repo: sudo apt-get install perlbrew
I strongly, strongly caution you against adding alternative Perl distros to a Debian-based system. Debian does not allow one package to modify another's configuration. CPAN (and by the looks of things, perlbrew) seems to have no such hangups — and in particular, the LibXML packages merrily alter ...
There is a RPi Operating system dedicated to running Qt - it's called QtonPi.
Here's what Qt have to say about it, and here's what the RPi people have to say about it.
The Qt website is somewhat more informative: you can download the source or an image, and see a lot of videos about it.
This is a $PATH issue. $PATH is an environment variable that contains a list of directories to search when looking for an executable. You can see your current $PATH via echo $PATH.
javac: command not found indicates javac is not in any of the directories in your $PATH. You need to add the directory with javac in it into your $PATH, or add javac to one of ...
Like @okertanov said, your code has syntax errors. In C, comments must be enclosed /* like this */, strings for printf "have to be in quotes", and newlines are printed with \n inside the quotes.
Try something like this:
You should not be changing the packages specified arch array. The architectures specified in the PKGBUILDs are the ones it has been tested against. Here you can find a list of PKGBUILDs that are compatible for the armv6h architecture.
Also, using aur helpers such as yaourt is not the best way to do things. Yes, it makes things one command easier for you. ...
It's likely you just installed the JRE and not the full JDK. If you're running Raspbian Wheezy, you can use
apt-get install openjdk-7-jdk
to install javac. (If you're using the older Debian Wheezy OS, it works with the Sun JVM, so you can install that with the instructions here: http://www.savagehomeautomation.com/pi-jdk . The standard Raspbian OS isn't ...
NOOBS is probably going to be the easiest thing to just setup and go. It ships with gcc/g++ for writing in C and C++ and you could install gfortran by typing sudo apt-get install gfortran in the command line.
For lighter programming, if he's interested, he could try scripting languages. Python comes with NOOBS and ruby is a personal favorite.
I can't answer about -mfpu flag, but I'd suggest to try these first:
As reported in GCC manual page related to ARM options:
-march=native causes the compiler to auto-detect the architecture of the build computer. At present, this feature is only supported on Linux, and not all architectures are recognized. If the ...
I would try it on the pi itself, it seems simpler. The tutorial page you point at lists only gcc and mercurial as dependencies, these are simple and safe to install. Further, you can avoid mercurial if you just download the source as a tarball.
On the raspberry forum there is a useful thread about installing go on the Pi. In particular: you have to set the ...
Lucky to see this question, I just spent weeks on controlling two servo (SG90) using WiringPi and programming in C, there're three things that I recommend.
1.Using BCM GPIO instead of WiringPi Pin because controlling more than one servo, you might need more than one pin such like 1(WiringPi Pin)/18(BCM GPIO) for another servo, For RPi3 B+ version, it give ...
You need to instal the objective c run time libraries as well as OpenStep/gnuStep if you want to import foundation.h. Objective-c does not come bundled with clang.
Apparently you can get gnustep with apt-get:
sudo apt-get install gnustep
Once that is installed, you should be able to compile against foundation.h
This thread clearly indicates somebody has gotten it working. A download is attached there (v1.6) the guys' working version.
This thread also indicates that it sort of works, including with v1.7 and limited EGL support.
To make a long story short, it looks like the pieces to make this happen are floating around out there, but I don't see them all in one ...
You should use the build system provided by OpenCV and enable EXAMPLES compilation. By just issuing the g++ kmeans.cpp command you are not linking against any OpenCV library, that's why the compiler complaints about the undefined references (which are defined in the library files).
You may find this tutorial handy: it will guide you through the process of ...
It's in the Raspbian repository, so you can install it with
sudo apt-get install liblinux-inotify2-perl
Bringing in modules from CPAN can affect the stability of a Debian distribution (they have conflicting policies on file modifications), so I don't recommend it unless you absolutely have to.