09-20-2001
The C compiler does not know what to call your final executable, so it has defaulted the name to a.out.
It is unusual for the compiler to place the output in the /usr/bin directory, usually it is placed into your current directory.
Nearly all compiliers, including those on Unix and Linux will accept a number of command line switches and parameters. By using command line parameters you can change the behaviour of the compiler significantly. See for yourself by doing:
man cc
or
man gcc
This will give you a very lengthy description of what to expect from your compiler. Also read the man page on your linker.
man ld
Somewhere in that lot will be a way to change the output file name. If necessary you can give it an explicit path name.
Finally, if you did not realise it already, the a.out file is (or should be) a fully runnable executable. You can always rename it using the move or copy command!
Regards
MBB.
10 More Discussions You Might Find Interesting
1. Programming
I have to compile some c-programm as a binary for freeBSD, but I have no possibility to install and work with freeBSD itself - can I compile the needed bninaries in other OSes (Linux or Windows)??? (0 Replies)
Discussion started by: shalmoo
0 Replies
2. SuSE
I've been usuing Suse 9.1 & 10 on 2 different machines for a while and have so far relied on ready compiled versions of programs in RPMs in order to install them.
I'm unclear what is envolved in compiling from the source code myself. I did a general google on the topic and found some unclear... (3 Replies)
Discussion started by: Mark Ward
3 Replies
3. UNIX for Dummies Questions & Answers
Hello,
Please let me know how to compile a linux kernel on redhat. I am relatively new in this area so please be a little patient with me. Here is the file I was consulting with the following details:
Compiling the Linux Kernel on Redhat 7.1
This page describes how to install... (2 Replies)
Discussion started by: bhattbonny
2 Replies
4. UNIX for Dummies Questions & Answers
I am a Linux noob, and have been trying to compile some source in Linux and I am lost. I am a game modder and I have some open source code which I have compiled in windows a million times but now I need to compile in Linux.
If this thread fails to help me, I will credit anyone who can... (4 Replies)
Discussion started by: fire_noob
4 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I tried native compile Linux dialog for Linux embedded device
and got "curses.h" error message.
As Linux dialog is already compiled and working as Debian .deb package (installed it).
What is a way to import curses.h from other package sources to work for dialog sources compilation in my... (2 Replies)
Discussion started by: darius2
2 Replies
6. UNIX for Dummies Questions & Answers
Hi,
as my thread has been moved to Debian.
I don't run Debian machine.
My machine is Linux embedded router - mipsel.
Sources come from Debian, but Dialog sources are GNU,
so no Debian specific.
Native compilation vs. crosscompilation,
exactly to let you know, that I don't run Debian... (2 Replies)
Discussion started by: jack2
2 Replies
7. UNIX for Dummies Questions & Answers
I have just installed OpenBSD on a 333MHz PPC iMac G3. It has a 6GB HDD that has been partitioned as 1GB MacOS 8.5.1, 3GB MacOS X 10.3.9, 2GB OpenBSD 4.8. I now need to install a bootloader so that my computer can recognize the OpenBSD partition at startup. I have been trying to install... (0 Replies)
Discussion started by: t04st3r
0 Replies
8. Linux
Can someone try to compile this older version of xtide (attached) on 64-bit Intel/Linux and upload the xttpd binary? I have a friend who needs an older version up and running because the newer version does not support his required harmonic files.
Thanks! (7 Replies)
Discussion started by: Neo
7 Replies
9. Programming
I am trying to compile a proc++ program on linux using an 11.2 client
and pointing to a 10.2 database running on Solaris. The compiler is able
to connect to the database but the semantic checks fail as if it cannot see
any objects in the database. I tried a test, only selecting 'X' into a... (0 Replies)
Discussion started by: rdudash
0 Replies
10. UNIX for Dummies Questions & Answers
I am not a newbie to Linux, i have been using Linux as my desktop for 4 years, but i am just an end user to Linux, no advanced knowledge to it.
I knew that, i can download generic linux kernel and compile it by myself, but how about Unix? how can i get an Unix kernel and compile it ? or no this... (5 Replies)
Discussion started by: wong.sie.ung
5 Replies
LEARN ABOUT DEBIAN
sc-config
SC-CONFIG(1) General Commands Manual SC-CONFIG(1)
NAME
sc-config - script to get information about the installed version of SC
SYNOPSIS
sc-config [--prefix[=DIR] ] [--exec-prefix[=DIR] ] [--version] [--libs] [--cppflags] [--cc] [--cflags] [--cxx] [--cxxflags] [--f77]
[--f77flags]
DESCRIPTION
The sc-config program can be used to obtain the compilers, compiler options and libraries needed to use the SC (Scientific Computing) tool-
kit from your program.
OPTIONS
The sc-config program returns information about how SC was compiled and installed. The following information is available:
--prefix
The directory where SC is installed.
--version
The version of SC.
--libdir
The directory were the libraries are found.
--libs The libraries and library paths needed to link.
--cppflags
The include directories needed to build.
--cc The C compiler.
--cflags
The C compiler flags.
--cxx The C++ compiler.
--cxxflags
The C++ compiler flags.
--f77 The FORTRAN 77 compiler.
--f77flags
The FORTRAN 77 compiler flags.
EXAMPLES
To use the sc-config program to link your executable to SC, use a Makefile for GNU make similar to the following:
SCCONFIG = /usr/bin/sc-config
CXX := $(shell $(SCCONFIG) --cxx)
CXXFLAGS := $(shell $(SCCONFIG) --cxxflags)
CPPFLAGS := $(shell $(SCCONFIG) --cppflags)
LIBS := $(shell $(SCCONFIG) --libs)
myprog: myprog.o
$(CXX) $(CXXFLAGS) -o $@ $^ $(LIBS)
Version 2 15 Feb 2001 SC-CONFIG(1)