Ubuntu :: Compile The Cpp File By Make?
Feb 3, 2011how to compile the cpp file by make?
make -w file -> does not work!
make -f file -> does not work!
how to compile the cpp file by make?
make -w file -> does not work!
make -f file -> does not work!
When I try to compile some Java code on Ubuntu 10.10 (kernel 2.6+) using make and a Makefile.
I get an error indicating that the make utility cannot execute the java compile command (javac).
The error reads: /bin/bash: line 6: .: /usr/local/jdk1.5.0_18/bin/javac: cannot execute binary file
I am executing make as root. I have enabled permissions on all directories in the path /usr/local/jdk1.5.0_18/bin/javac and on javac itself.
I get this error whether using a jdk installed via ubuntu apt-get, or whether I install the jdk myself. And I get it using either Java 1.5 or 1.6
My machine has an 80386 processor. I notice the make utility is built for i686-pc-linux-gnu
However, I can manually compile using javac.
I can compile calling javac from within a bash script.
I can compile using the java compiler gcj from the command line: gcj --main=HelloWorld HelloWorld.java -o HelloWorld.exe
But I cannot compile java code from the makefile. Any reasons why I might be getting this error?
I want to make a file called file roller for Ubuntu 9.10. The folder has a file called install.sh and some others that are make.
I figure first I need to make a file and then run install.sh to install. But I don't know how to do this.
I just installed a new Ubuntu Studio 11.04 system at home yesterday. It was relatively painless at first but now I'm trying to compile some of the programs that I built the system for and
Code:
./make
simply is not working (returns command not found error). A makefile is present in both of the directories I'm working on.
Code:
man make
works perfectly fine. apt-get install insists that make is present, it also insists that gcc and build-essential are present. Just for the heck of it I reinstalled build-essential but nothing changed. I hesitate to uninstall it or or uninstall make as I have several packages which depend on these and several more which recommend them.
I first got into Linux with Ubuntu Server 10.04 and I remember not being able to compile then but that was because I didn't have gcc or build-essential installed. Once I installed those packages everything was happy. Every google search I perform leads me either to "install build-essentiall / gcc" or to nothing at all. Thoughts on where I can go from here?
I've been trying to make/compile the driver for a wireless card. The card is usb, it's titled Micronext MN-WD550M and seems to use the rtl8712 driver.Firstly, though I did this once two years ago I seem to have completely forgotten how to install a driver in ubuntu.
Secondly, I'm not sure I have the right driver anyway since in the notes in the readme it says it is for i386 (I run amd 64). The driver is here [URL] Thirdly, after clicking through various readmes and documentation without feeling any more intelligent, I then tried using ndiswrapper to install a windows driver and ubuntu would crash if the usb wireless card was plugged in. Blarg.I feel like this should be so simple I'm going to make a clean installation of ubuntu 10.10 shortly (for various unrelated reasons) so anything I messed up with ndiswrapper should be back to normal.
I've been trying to figure out how to use make and makefile to compile and link some .cpp/.h. All i seem to find on google says to read the README for the software. But this is my own created c++ project. Im just looking for a simple makefile for my own .cpp/.h files( about 20 total).
I have tried using 2 different makefile "examples" as a template, but neither worked. I am getting error saying "file1.cpp: no newline character at end of file". or something to that degree.
I'm trying to compile the D-Link netcard driver from the official source, and when I first ran "make," I got an error that "make" couldn't be found. So I installed "apt-get install make," then make told me that it needed gcc, I installed "apt-get install gcc." Now make says: make: *** /lib/modules/2.6.32-5-amd64/build: No such file or directory. Stop. make: *** [LINUX] Error 2 and exits.
I suspect that I need to install some package group which will handle the make and make install (rather than manually trying to fix one hole after another)
I am trying to compile OLSRd on Fedora 15 but 'make' throws Error 1. Here is the output:
Code:
[x@localhost olsrd-0.6.0]$ make
/usr/bin/ccache gcc -Wall -Wextra -Wold-style-definition -Wdeclaration-after-statement -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wsign-compare -Waggregate-return -Wmissing-noreturn -Wmissing-format-attribute
[Code].....
One of those odd things I learned the hard way is that if you are writing a shared object (library/.so) and any programs that will link to that library uses floating point numbers, the library must be compiled as if it uses floating point numbers. What that really means is, you need to declare at least one float in the source for the library or when the caller connects and tries to run code in the library, the process aborts.I end up putting a float pi (3.1415); in the code and getting an unused variable warning all the time. There has to be a simpler way, some flag to pass to g++ that says, "include floating point support even if you don't really need to."
p.s. Gosh I hope I remembered this correctly. I encountered this problem doing a multi-platform build for Windows and Linux. This COULD be a VC++ problem that I just carried into Linux by using the same source.
I am trying to make a simple vector test program, but i can't compile it. Here is the code:
Code:
import java.util.*;
class Vec {
public static void main(String args [ ]) {
[Code]....
I'm trying to cross compile the GNU make for Alpha Architecture on my i686 PC and the GNU make i compiled would be placed in my virtual hard disk which is a Alpha based linux simulated system. My question is now , I'm able to cross compile the GNU make on my i686 real PC machine , but when i let the make program run in my virtual machine , it pops out the error ..
make: /lib/libc.so.6.1: version `GLIBC_2.4' not found (required by make)
After that, I try another alternative , and I read through the file "INSTALL" on the GNU make directory that I downloaded from the internet . In this case , I downloaded make-3.81. On the sub section "Compiling For Multiple Architectures" It says that
"You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the
directory where you want the object files and executables to go and run the `configure' script.`configure' automatically checks for the
source code in the directory that `configure' is in and in `..'. If you have to use a `make' that does not support the `VPATH'
variable, you have to compile the package for one architecture at a time in the source code directory. After you have installed the
package for one architecture, use `make distclean' before reconfiguring for another architecture." And I do not understand the line "by placing the object files for each architecture in their own directory" . What object files that I should put ?
/tmp/cctiuwxL.s: Assembler messages:
/tmp/cctiuwxL.s:3534: Error: unknown opcode
/tmp/cctiuwxL.s:3534: Error: unknown opcode
/tmp/cctiuwxL.s:3602: Error: unknown opcode
[code]....
This is the make step error./tmp/cctiuwxL.s is the make temporary dirictory which is distroyed after the make process finises . The problem is how can I hold the /tmp/cctiuwxL.s dirictory .Then I can check it and find out the proiblem.
after upgrading to make 3.82, I can not compile the newest kernel: 2.6.35-rc6-git5,it failed with:
GEN /home/aaa/tools/kernel/output/35/Makefile
CHK include/linux/version.h
CHK include/generated/utsrelease.h
[code].....
Maybe 3.82 has some backward-incompatibility that breaks kernel compilation.
[URL]
whenever i'm in the process of compiling and installing a new kernel in ubuntu lucid lynx i get an error message when i get to the make bzimage part is there some sort of program that i needed to install first or is there an alternative to doing this.
View 8 Replies View RelatedActually I had a folder called Lib, in which I had a few libraries installed and configured.(MPI, PETSc, SLEPc) I accidently deleted (by rm) the contents of that folder.
Then I reinstalled MPI,PETSC,SLEPC using the same tarballs as earlier(thus, the version etc. is the same).
I already had a fortran program with many modules and subroutine files, and the corresponding makefile which used to compile and run fine. But now when I type "make" in the same directory as before, I get this: (shortened, many similar errors)
Code:
Firstly, why is mpif90 compiling my program when I didnt tell it to? In my makefile, I have specified gfortran as my compiler....nowhere have I even mentioned mpif90. Such a thing never used to occur before.
Also, if I rename file_variable.f to file_variable.f90, these errors dissappear (I understand why, but that is not the problem), but a new error comes:
Why is the new MPI installation interfering with make ? I want to go back to how things were before I stupidly broke all installations. The errors themselves are not the problem, the problem is why the new mpi installation is interfering with make.
It seems as if mpif90 has taken over make and gfortran. I suppose I didnt install it correctly, or probably I didnt uninstall the earlier one correctly.
Everything that worked earlier doesnt work suddenly. I use ubuntu 11.04 MPICH2-1.3.2
I am trying to compile a kernel in the following directory:/usr/src/kernels/2.6.30.9-102.fc11.x86_64
Note I am not trying to build an rpm but just do a simple make. After configuring with make menuconfig I issue the make command and get the following error:
Code:
[root@compaq 2.6.30.9-102.fc11.x86_64]# make
CHK include/linux/version.h
CHK include/linux/utsrelease.h
SYMLINK include/asm -> include/asm-x86
make[1]: *** No rule to make target `missing-syscalls'. Stop.
make: *** [prepare0] Error 2
how to resolve this error? It seems to be fedora-centric.
I notice that when you try to Make link to any file or folder form context menu, It just copy the same file size? even when i tried to copy the link to external storage disk..
View 1 Replies View RelatedI need to downgrade my firefox from 5 to 3.6 I downloade the tar.bz2 file but after I extracted and cd to the file I got these errors when trying to install code...
View 1 Replies View Relatedim trying to compile a file in ubuntu and it says i need libzmq. anyone could post a link or something so that i could install it i would be very happy.
View 6 Replies View RelatedToday, I was trying to compile and install a minecraft mapper with the program "make". I navigated to the directory in terminal and ran make. It found the make file and begins to work, then spits an error and stops. To be specific, this was the error:
Code:
cats4gold@computer:~/Downloads/cartograph-linux$ make
make -C src/
make[1]: Entering directory `/home/cats4gold/Downloads/cartograph-linux/src'
g++ -c -pipe -O2 -Wall main.cpp -o main.o
In file included from main.cpp:16:
[Code]...
How do I compile a tar.bz2 file I have never successfully done it. I really want to do it for mac on Linux.
View 9 Replies View RelatedHere any know how to compile the driver file manually?
For example i have been insert the Realtek Ethernet card in my customized kernel and kernel can't detect the card. I know the c file 8139too.c which going to use by the realtek Ethernet card.but i don't know to how to compile the file and make this as a kernel module..
unable to compile a simple C++ programme (.cpp file), on compiling the file with gcc or g++ the following error is displayed, but the above command works in Redhat EL. the error message is:"fatal error: iostream.h: No such file or directorycompilation terminated."an anybody suggest to compile a C++ programme in Fedora 14.
View 10 Replies View RelatedRecently I've started to learn cpp language on linux,and now I run a cpp file using following commands. g++ -o xxx xxx.cpp./xxxIs there a way to make it one line command such as compile-and-run xxx.cpp?
View 5 Replies View Relatedhowto compile a tar.gz file in centos5ORhow can i create rpm from tar.gz file
View 1 Replies View RelatedI am trying to build a source rpm file through a source rpm package but while compiling I am getting the below errors as,
[root@nisserver tmp]# ls
gconfd-root mapping-root ssh-kvrIrp2633
keyring-fgwCIY nmap-5.21-1.src.rpm virtual-root.2hSYRa
keyring-vx1pvB orbit-root
[root@nisserver tmp]# rpmbuild --rebuild nmap-5.21-1.src.rpm
Installing nmap-5.21-1.src.rpm
warning: user fyodor does not exist - using root
warning: group fyodor does not exist - using root
warning: user fyodor does not exist - using root
warning: group fyodor does not exist - using root
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.49535 .....
RPM build errors:
user fyodor does not exist - using root
group fyodor does not exist - using root
user fyodor does not exist - using root
group fyodor does not exist - using root
Bad exit status from /var/tmp/rpm-tmp.73783 (%build)
What next step need to be taken to install the rpm file from the source file.
i trying to compile courier-imap-3.0.8 (no te latest version but that's a requirement) using gcc 4.4.5 (Debian 5) I ran:Quote:./configure --enable-unicode=iso-8859-1,utf-8And went Ok with the verification, but when ran Quote:makeI got:
Code:
Compiling checkpassword.c
checkpassword.c: In function 'authcheckpassword':
[code]....
how to compile a tar.gz file in centos5 OR how can i create rpm from tar.gz file
View 2 Replies View RelatedI'm new to linux, and I've been following a paper [URL] to build a linux cluster using RedHat 5. I'm up to part VII step 5, installing the message-passing software MPICH2-1.4, and I'm not quite sure how to "execute the compile command 'make' to generate the binary codes of MPI."
View 13 Replies View RelatedThe whole code is written in C, C++, and Fortran. Is it possible to make it to use more than 4GB memory. Now it is always crashed when it reaches 3GB memory. If it is possible, how to set up the compiling options (or configure flags)? We can use gcc, g++, ...or intel compilers our OS: Fedora 12 x32
[code]....