11-10-2008
Compiling Code
Hi i am new to programming im having a bit of a problem i have installed kubuntu on my computer and i have wrote some code but when i go to compile it i get this error in the terminal
ross@ubuntu:~/cp1$ g++ -ansi -pedantic array.cpp -o array
ross@ubuntu:~/cp1$ array
The program 'array' is currently not installed. You can install it by typing:
sudo apt-get install sufary
bash: array: command not found
ross@ubuntu:~/cp1$
usually when i compile it and type array on the uni computers the programme will run but i don't know why it isnt on my kubuntu
10 More Discussions You Might Find Interesting
1. Programming
I recently loaded SuSE on my intel comp.
I am presently taking a walk down memory lane from my days at UofT.
I was fiddling round with cc and the gcc compilers.
I wrote a basic basic basic program .
I tried to compile it as I remember doing in Uni. The problem is that it can't find the header... (5 Replies)
Discussion started by: cantcatchme
5 Replies
2. UNIX for Advanced & Expert Users
I have a problem.
How can I be sure that the binary currently in production is the binary originally produced by the compiler? I ask because recompiling the sources (ALL sources + stripping away the metadata: strip ...) does not give the same result.
I am pretty sure that I wasn't hacked!
... (5 Replies)
Discussion started by: aViking
5 Replies
3. Programming
Hi,
Recently I have a C Code and i compile on my pc with
gcc -D _t_1 -o a.out test.c
It works fine for me on my pc. However, upon transferring the same code on Sun Solaris server, it breaks with the below message:-
Undefined first referenced
symbol ... (3 Replies)
Discussion started by: ahjiefreak
3 Replies
4. Programming
I'm running a query similar to the one that I'm describing below -:
_______________________________
EXEC SQL INSERT INTO TABLE1
( C1
,C2
,C3
,C4 )
(SELECT DISTINCT B.V1
,B.V2
,( SELECT D.V3 FROM TABLE2 D WHERE D.V3 = C.V4)
,B.V4
FROM TABLE2 B ,TABLE3 C
WHERE B.V3 = C.V4) ;... (1 Reply)
Discussion started by: maheshp
1 Replies
5. Windows & DOS: Issues & Discussions
Hello everyone. I just recently installed Cygwin and I am running it under Windows 7.
My problem is that I cannot seem to compile any C++ code with g++. I've tried to compile C Code using gcc and that works just fine. But Whenever I try to compile some C++ code, g++ throws a whole bunch of... (6 Replies)
Discussion started by: Anlex
6 Replies
6. Programming
Hey there,
First post here in the Unix forums, but I have used them a lot for research over the last year. Anyways, to why I'm here now:
I'm working on a project and I'll be using the AIS Parser SDK by Brian C. Lane (can't post the link, but google that and the first 8 links will be relevant) ... (4 Replies)
Discussion started by: pmd006
4 Replies
7. Programming
I am trying to compile some code and getting lot of errors
g++ -traditional -Wno-non-template-friend -Wno-deprecated -O3 -DNDEBUG -DREAL=float -DGetREAL=Getfloat -IbaseLib -Itommy -Iothers ./source/main/RayTrac.cc -o raytrac
./source/main/RayTrac.cc:36:20: error: gendef.h: No such file or... (1 Reply)
Discussion started by: kristinu
1 Replies
8. Programming
Hi!
I am trying to compile a C++ code with cmake and gcc on Ubuntu. The code uses NetCDF4 libraries. I specify the path to these libraries as follows:
-I/usr/local/include -L/usr/local/lib -lnetcdf -lnetcdf_c++4
"ccmake" and "cmake" work fine. After typing "make" I receive the error... (0 Replies)
Discussion started by: Alauda
0 Replies
9. Shell Programming and Scripting
Need assistance in compile a source code with PERL flags
Compile source code CDFconvert-2.2.3 which requires Fortran 90,Perl interpreter , Perl/TK module , NetCDF library , Gempak
I have all the above required libraries .
Issue is when compiling the source code it looks for local... (4 Replies)
Discussion started by: ajayram_arya
4 Replies
10. UNIX for Dummies Questions & Answers
Hello all
I am new to programming and trying to compile this code
#include <asm/unistd.h>
#include <sys/mman.h>
#include <unistd.h>
#include <errno.h>
#define MREMAP_MAYMOVE 1
#define MREMAP_FIXED 2
#define __NR_real_mremap __NR_mremap
static inline _syscall5( void *,... (2 Replies)
Discussion started by: crustymonkey
2 Replies
LEARN ABOUT DEBIAN
mk-sbuild
MK-SBUILD(1) General Commands Manual MK-SBUILD(1)
NAME
mk-sbuild - creates chroots via schroot and sbuild
SYNOPSIS
mk-sbuild [options...] <release>
DESCRIPTION
mk-sbuild creates chroots via schroot and sbuild.
OPTIONS
Listed below are the command line options for mk-sbuild:
--arch=ARCH
What architecture to select (defaults to the native architecture).
--name=NAME
Base name for the schroot (arch is appended).
--personality=PERSONALITY
What personality to use (defaults to match --arch).
--debug
Turn on script debugging.
--skip-updates
Do not include the -updates pocket in the installed sources.list.
--source-template=FILE
Use FILE as the sources.list template (defaults to $HOME/.mk-sbuild.sources).
--debootstrap-mirror=URL
Use URL as the debootstrap source (defaults to http://ports.ubuntu.com where appropriate, official Ubuntu repositories for the sup-
ported architectures).
--debootstrap-include=alpha,beta
Pass along a comma separated list of packages to debootstrap's --include argument. See debootstrap (8) for more details.
--debootstrap-exclude=alpha,beta
Pass along a comma separated list of packages to debootstrap's --exclude argument. WARNING: be careful using this option as you can
end up excluding essential package. See debootstrap (8) for more details.
--distro=DISTRO
Enable distro-specific logic. When not provided, the distribution is determined from release. Currently known distros: "debian"
and "ubuntu".
--vg=VOLUME_GROUP
Specify a volume group, and subsequently use a default SCHROOT_TYPE of "lvm-snapshot" rather than "directory" (via overlayfs or
aufs) mounts.
--type=SHROOT_TYPE
Specify a SCHROOT_TYPE. Supported values are "directory" (default if --vg not specified), "lvm-snapshot" (default if --vg speci-
fied), "btrfs-snapshot", and "file".
ENVIRONMENT VARIABLES
LV_SIZE
Size of source LVs (defaults to 5G).
SNAPSHOT_SIZE
Size of snapshot LVs (defaults to 4G).
SCHROOT_CONF_SUFFIX
Lines to append to schroot entries.
SKIP_UPDATES
Do not include the -updates pocket (same as --skip-updates)
DEBOOTSTRAP_MIRROR
Mirror location (same as --debootstrap-mirror)
DEBOOTSTRAP_INCLUDE
Comma separated list of packages to include when bootstrapping (same as --debootstrap-include)
DEBOOTSTRAP_EXCLUDE
Comma separated list of packages to exclude when bootstrapping (same as --debootstrap-exclude; see warning above)
SOURCE_CHROOTS_DIR
Use SOURCE_CHROOTS_DIR as home of schroot source directories. (default /var/lib/schroot/chroots)
SOURCE_CHROOTS_TGZ
Use SOURCE_CHROOTS_TGZ as home of schroot source tarballs. (default /var/lib/schroot/tarballs)
CHROOT_SNAPSHOT_DIR
Use CHROOT_SNAPSHOT_DIR as home of mounted btrfs snapshots. (default /var/lib/schroot/snapshots)
FILES
$HOME/.mk-sbuild.rc
Sourced for environment variables (defined above).
$HOME/.mk-sbuild.sources[.$DISTRO]
Can contain a customized sources.list. It will be read when creating the schroot. If a file with ".ubuntu" or ".debian" is found
(as appropriate) it will use used instead. See sources.list (5) for more details on the format.
$HOME/.mk-sbuild.schroot.conf[.$SCHROOT_TYPE]
Can contain a customized configuration section to be inserted into /etc/schroot/schroot.conf. If a file with ".lvm-snapshot",
".directory", ".file", or "btrfs-snapshot" is found (as appropriate) that file will use used instead. See schroot.conf (5) for more
details on the format.
USING THE CHROOTS
To CHANGE the golden image: sudo schroot -c ${SCHROOT_NAME}-source -u root
To ENTER an image snapshot: schroot -c $SCHROOT_NAME
To BUILD within a snapshot: sbuild -A -d $SCHROOT_NAME $PACKAGE*.dsc
for example, to update the packages in a sid-amd64 golden image:
schroot -c sid-amd64-source -u root -- sh -c "apt-get -qq update && apt-get -qy upgrade && apt-get clean" </dev/null
SEE ALSO
sbuild-setup(7), sources.list(5), schroot.conf(5), https://help.ubuntu.com/community/SbuildLVMHowto
AUTHOR
mk-sbuild was written by Kees Cook <kees@ubuntu.com>. This man page was written by Ryan Kavanagh <ryanakca@kubuntu.org>. Both are
released under the GNU General Public License, version 3 or later.
ubuntu-dev-tools 09 February 2010 MK-SBUILD(1)