General :: Compiling Programs - Understanding Concept Of Makefile2
Jan 13, 2011
# Filename: makefile2
# Usage: make-f makefile2
# Description: Maintains all the dependencies between modules using the
# Agenda1.
CC=g++
CFLAGS=-c -Wall
LDFLAGS=
SOURCE_MODULES=main.cpp factorial.cpp hello.cpp
OBJECT_MODULES=$(SOURCE_MODULES:.cpp=.o)
EXECUTABLE=programa1
all: $(OBJECT_MODULES) $(EXECUTABLE)
$(EXECUTABLE): $(OBJECT_MODULES)
$(CC) $(LDFLAGS) $^ -o $@
.o: .cpp
$(CC) $(CFLAGS) $< -o $@
I am suppose to explain the dependencies that exist and each of the following lines of makefile. Lists orders to be executed as a result of running the make utility on it.
View 3 Replies
ADVERTISEMENT
Aug 19, 2010
I am new to C programming and I need a way to compile and run my code. I've made a little research and I found that eclipse is a nice IDE. But I don't know how to configure it and generally. What do I need to download and install to make it work. I've also tried downloading easy eclipse that doesn't need any configuration or extra files but the link on the site was broken. Is there any other C IDE like easy eclipse available?
View 5 Replies
View Related
Jun 24, 2010
I am trying to study gtk programming and get stucked before some errors in compiling them. Iam using ubuntu 9.10 and i didnt installed any additional libraries or packages for running these gtk programs assuming gtk is already installed in ubuntu. I am newbie to gtk I tried compiling some example programs from my tutorial and it ended up in errors. So do I need any additional packages to run these programs.when compiling it shows package config cannot find any gtk+-2.0 packages and to try specifying .pc in environment path. I don't know how to set these path stuff.
View 1 Replies
View Related
May 31, 2011
I'm trying to compile programs under Solaris in my Home directory.
Ive had experience with simple installs which work with just
But with more involved programs, with dependencies on special libraries, how do I have the system look into my home directory for these? and how would I compile them into my home dir?
View 2 Replies
View Related
May 21, 2011
I am new to Slackware and I am wondering how you set the ARCH variable. On the multilib wiki page it says:
"Rather than editing the script and change/remove CFLAGS definitions, you can set the ARCH to 'x86_64' and save yourself some time."
So from this I understand that they advise against editing the Slackbuild script. How do I set the ARCH variable on the command line or is it a configuration file I need to edit? I am running Slackware 13.1 64.
View 2 Replies
View Related
Oct 19, 2010
I'm trying to get my head around compiling programs, and need some things clarified. Can anyone confirm or deny my understanding so far:
1) Program is written in high level language, such as C. File(s) of the program are the 'source code'.
2) Program is then 'compiled' to turn it into low-level code that is both hardware - i.e. Intel/AMD/ARM processor specific, and also Linux distribution specific. This resulting files are called the binaries.
3) I can go from source code to installed and usable program by doing these steps:
./configure
make
make install
View 6 Replies
View Related
Jul 6, 2010
I am trying to write modular program but when I try to compile I come to know I don't have any files in /usr/src/linux. I have installed fedora 12 which has 2.6.31.5-127.fc12.i686.PAE. I am including in my code:
linux/kernel.h
linux/module.h
Those are not present directory in /usr/src/linux is not present. My goal is to compile modular programs.
View 10 Replies
View Related
Feb 25, 2011
I've several questions to ask: Why do some files have black arrows pointed outward in my file system? Why are some files in compressed form, e.g. initrd.img?? How are such files used by the system??
View 2 Replies
View Related
Dec 20, 2010
We have designed a board with Cirrus Logic(arm) processor, A Flash memory and some other peripherals have been connected to that. While building kernel we have selected MMU support. We have written few custom drivers for keypad,LED,LCD. But I would like to know how virtual memory mechanism can be helpful here even though there is no any hard disk has been connected. Where will be the virtual memory reside.
View 2 Replies
View Related
Jun 7, 2011
so i've just been sitting here, compiling and running some c++ programs (with g++ from the terminal), I looked away for one minute to open a file that had just been written out (opened it with gedit if that makes a difference), now my terminal says:kbuildsyscoca4 running...so I'm wondering if anyone knows what this is about?hy it suddenly started running and why it has appeared on my terminal. I'm basically just curious as I though bash shells were entirely separate virtualizations of shells, and unrepresentative of other processes. i'm also wondering what kbuildsyscoca4 is/does (i've got gnome going on and generally gnome varieties of programs). I found a post from about a year ago mentioning the same thing, though no replies.
View 1 Replies
View Related
Feb 24, 2010
I am doing my project which detects and displays the error message along line number when compiling c programs under Linux. Using gcc command..cc command which we generally use. For which my program must act as a compiler and generate error messages when user program is written and compiled. My idea was to develop a shell script program using name suppose ncc that would be..
$ vi ncc.sh
echo "compiling program $1"
$cc MyPgm.c
$.a/.out
<esc>
:wq
Now user program pgm1.c can be compiled using
$ sh ncc.sh pgm1.c
This will invoke my compiler program. But the thing is how to pass user program pgm1.c as input to my compiler program...
View 2 Replies
View Related
Apr 14, 2010
I am using Red Hat Linux 4 .There are some few questions in my mind related to umask. I want to know that is the default file and directory permissions ?
- When we use umask (022) command in terminal. and create a new file then the permissions applied for new file is for that session and when the system will reboot linux will take automatically its default permission from etc/bashrc or /etc/profile ?
- Can we make our own umask or the professional way is to follow 022 only ?
- What is the benefit of umask in Linux?
View 2 Replies
View Related
Jul 26, 2011
I want to compile program. "./configure" giving :
Code:
[kuba@Kuba-fedora uget-1.8.0]$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executable .....
Configure: error: Package requirements (libnotify) were not met:
No package 'libnotify' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables LIBNOTIFY_CFLAGS
and LIBNOTIFY_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. But I have the newest version of libnotify.
View 2 Replies
View Related
Mar 30, 2010
I tried to compile C program that uses Openssl libraries on shell but got this error. I guess libraries are not linked properly.
undefined reference to SSL_library_init()
View 1 Replies
View Related
Nov 12, 2010
I am learning how to use DD for creating images across networks and locally but needed some clarification.
1 - When creating an image, I noticed that there is no verbose to show you the progress, How can I accomplish this?
2 - When I run this on a 8G usbstick it takes a long time to image. How can I speed up this process?
PHP Code:
dd if=/dev/sdb of=/home/test/images/image.dd
3 - When an image is restored like
PHP Code:
dd if=/home/test/images/image.dd of=/dev/sdb
will that give me a working bootable usbstick? For example if I imaged a working usbstick with Ubuntu on it using DD and restored it like the example above on a different usbstick, will this give me a booting new usbstick? I hope that came across ok?
View 1 Replies
View Related
Apr 6, 2011
I am here looking for some abstract and easy to understand resource for "Exokerel" CONCEPT of Computer Operating Systems.[URL] seems some what more complex then expected [URL]
View 1 Replies
View Related
Aug 21, 2010
I don't quite understand how pipes work in bash. I know that it takes an output from one command as the input in another command. What an output is I can get because it's what the command prints out to the screen. But how do I know what input a command will take? Here is an example I thought would work:
Which gem | rm
Unfortunately it didn't.
Which gem prints out "/usr/bin/gem" so that must be the output right? I thought that was given to rm so it would be "rm /usr/bin/gem" but I was wrong. How do I know what input a command takes?
View 4 Replies
View Related
Aug 11, 2010
I'm trying to set up a machine to "drive" a piece of equipment (a metal plate embosser [kind of like a daisywheel printer for credit card sized pieces of metal], FWIW). What I ideally want is a linux distro that I can boot from CD (I think the term is Live CD?), log itself in as a user and display only a console. It needs to be able to support windows fileshares and python.
Essentially it needs to boot, connect to a single fileshare on a Win2k8 machine, and be able to execute a couple of scripts that will output to a serial port. One of them will be more or less the following:
wget http://WEBSITE/?<parameter passed to script> --quiet --output-document=<name of serial port>
The other is a somewhat more complicated Python script that processes a CSV spreadsheet and produces data for the machine.
View 3 Replies
View Related
Jul 13, 2011
My grub file looks like this:-
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
[code]...
View 4 Replies
View Related
May 20, 2010
I'm beginning to deal with more than one user on my system (it's a VPS serving some sites) and I need to make sure I understand how group permissions work. I have an account named "admin" .. it's basically the primary account that is used for serving most of the sites that I control myself. Now, I added a second account named "Ville" as one of my users wants to be able to administer that site. So, I can do this the easy way and just chown their domains folder under the ville user, they have permission to do whatever they need be and so forth. However, let's say I want to also give the admin user access to the files (modifying and all) .. how can I put both users into the same group and give them both permission?
I've tried doing:
sudo usermod -a -G admin ville
To add the ville into the admin group, but ville still cannot edit files by admin. Permissions for the primary directory for the ville user are read/write for both owner and group, and the current group for the files is admin:admin ..
But ville still can't write into the directory. So, what should I be doing here to get this right and secure at the same time?
View 1 Replies
View Related
Apr 8, 2010
I am very new to linux. The first time i ran a linux machine was one Saturday. Anyway I am trying to set up an apache web server, all I want to do is play around with html and post it on my unbuntu server so it is available to the internet. I am also trying to install samba but I am having trouble with that so for now I am using winscp. Ok, so I made a folder in my home directory for webstuff, and set up apache to look in that folder.
mkdir /home/username/webstuff
I put my index.html file into the /webstuff folder.
But when I go to my website, it says 403 error unable to access "/"
Did I make the folder in the right place? I do not want people being able to access my / folder so maby I made the web stuff folder in the wrong place? Also I thought I would just put my inded.html file inside of the default one apache gives you, but when I tried to transfer index.html it said permission denied. How to set up permissions so I can use apache and transfer my html files from my remote desktop to my server would be great!
View 7 Replies
View Related
Jan 5, 2011
I'm trying to understand if anyone is left on a server. Basically I manage a simple linux server remotely used by 3-4 individuals. I can never tell if someone is actually on or not using w/who.What I'm seeing is some people having what appears to be inactive/lost VNC sessions. I don't understand idle fully, but I do believe a program (without user interaction) can clear idle back to 0, correct?Anyway, I'm asking because every now and then I need to reboot the server, and I do not want to interrupt any program working on calculations or waiting on having the data saved.
Code:
me@matrix:~> w
06:59:54 up 170 days, 9:13, 16 users, load average: 0.52, 0.16, 0.06
[code]....
View 1 Replies
View Related
Oct 9, 2009
I am Student of RHCE. I have only one machine at my home. to do practice I want Server - Client environment. So Can i use visualization concept? If yes How?
View 3 Replies
View Related
Aug 14, 2010
need help with the Positional Parameters. I don't understand its concept.If you could give some example or and explanation
View 2 Replies
View Related
Jun 25, 2009
Now that I have setup a proxy server, as a next step I want to run it in fail-over high availability mode, so that if one proxy is down due to any reason, second proxy should automatically be up and start serving requests.
View 3 Replies
View Related
Apr 3, 2010
Im trying to get a general understanding put simply.
View 6 Replies
View Related
Apr 9, 2010
I am having a hard time understanding how to order the commands in the CLI. Its like I don't have a clue as to what do next.
View 2 Replies
View Related
Jan 23, 2011
understanding and using the "at" command. I know everyone would say read the man pages, bt dnt knw if its jst me that think the man pages are not elementary enough for newbies like mi. So I need an elementary way of executing the "at" command. Tried using the "at" command to kill a program at a certain time but didn't seem to get it, so I need help doing that. Distro is redhat linux.
View 3 Replies
View Related
Apr 19, 2011
For this code:
Code:
class B1
{
[code]....
View 11 Replies
View Related
Aug 1, 2011
I have an application that uses port 8080 all the time. One time, for some reason, it was taken by I didn't know what.
View 2 Replies
View Related