As part of an assignment, our class was given a small set of c++ classes which are compiled using a makefile. As part of the assignment, I have created a namespace and saved in it a .cpp file. The functions, constants and typedefs from the namespace are now used in one of the original files, and so I added an <#include MyFile.cpp> to the file I modified, in addition to a using MyNamespace;
When I try to use the original makefile, the compiler gives a lot of errors about multiple definitions of every function in the namespace. What do I need to do to resolve this? Do I need to change the makefile or one of the files themselves? I am new to Linux programming and makesfiles.
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 just downloaded slackware 13.1(x86) and i'm trying to compile ndiswrapper-1.56 using the slackbuild from slackbuils.org and i'm getting this error:
Makefile:535: /usr/src/linux-220.127.116.11/arch/i486/Makefile: No such file or directory make: *** No rule to make target `/usr/src/linux-18.104.22.168/arch/i486/Makefile'. Stop. make: *** [modules] Error 2 make: *** [all] Error 2
I am new to the whole concept of makefiles, and I'm trying to compile and build my program using a makefile template I have found. My project consists of three directories: "source", where my .cpp files are (source1.cpp, source2.cpp, source3.cpp), "include", where my .h files are (header1.h, header2.h, header3.h), and "obj", where the object files are to be stored (obj1.o, obj2.o, obj3.o). In the project root directory is my makefile, which is as follows:
Code: EXEC = myexe CC = g++ IDIR = include SDIR = source ODIR = obj
I have ~200 c files in my makefile[$(SRCS)], and it compiles all of the files using a single gcc command. So each time I make a change in one c file, it ends up re-compiling all the files, then linking to make the binary. How can I break out the compilation into individual gcc commands for each c file, so that make checks the timestamp and accordingly compiles only the modified files.
Recently 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?
[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 become successful to download kernel, compile it and run it.BUTWhen i modify tcp.c file or any other file in this /usr/src/linux/net/ipv4 location, (just modifying c files) i have to compile the complete kernel every time, which is very time consuming procedure.So Please help, How to compile that net/ipv4 package or etc.
how i could compile for example: a tutorial file of cantera open source files. when i do :g++ example.cpp -o examplei get huge errors such as the header files are not here,...please tell me how i could compile it. ofcourse i have configured the full opensources and i see in /usr/local/cantera/binthat the files are there but i still can not compile and execute any cpp file.
I am trying to use a software package written in ANSI C. It has a makefile which has to be executed first.
As soon as I execute it I get messages like: line i: command not found.
Commands for which I am getting errors :
CC = /usr/bin/gcc GCCFLAGS = -c -Wall ROOTDIR = .
My gcc compiler is located in the above directory only. In ROOTDIR also I tried giving the path in which all the required files & folders are present but still I get the command not found error in all the lines.
I have been trying to compile a pascal file using fpc. I succeeded using the command fpc pas1.pas, but this gave me a new object file pas1.o. How do i compile this file to get my output. gcc -o pas1.o does not work.
I am trying to upgrade my NAS with anew toolchain, gcc-4.5.2. The NAS have been "hacked" fonz_plug, that contain a gcc version 4.1.3 with uClibc. I have download all needed tar files and done the following.My goal is to upgrade the gcc to 4.5.2 and replace the ucLibc on the system with a GNU libc.
# Pass one # # binutils ./configure --prefix=/ffp --libdir=/ffp/lib --includedir=/ffp/include --with-gmp=/ffp --with-mpfr=/ffp But when I try to compile the gcc with ../configure --prefix=/ffp --libdir=/ffp/lib --includedir=/ffp/include --enable-__cxa_atexit --with-float=soft --enable-languages=c,c++ --with-build-sysroot=/ffp --with-build-time-tools=/ffp/bin --with-system-zlib --enable-threads=posix --disable-bootstrap
I want to build a package from source using src2pkg, but I don't know how to avoid library miss match. Suppose I have Firefox 3.5.2 on Slackware 13.0 64 and I want to upgrade it to 3.6.2. Last time when I venturesomely installed Firefox-3.6.2-current into my Slackware 13.0, I got library miss match. Thus, instead of upgrading the whole packages to current (which is impractical and cumbersome), I want to build 3.6.2 from source. How can I do this? Is there any guideline how to use src2pkg? Or should I rather use makepkg? Do I need to create a Makefile?
I'm trying to get my new Wireless USB dongle to work with Xubuntu 9.10 Karmic Koala. I've extracted the .rar file that was on the drivers CD that came with the dongle. According to the ReadMe....
The Model Name is: RT2870 Wireless Lan Linux Driver Driver Name: rt2870.o/rt2870.ko Hardware: Ralink 802.1n Wireless LAN Card Description: This is a linux device driver for Ralink RT2870 USB ABGN WLAN Card. My issues:
1. I do not see the driver file anywhere in the folder contents... I suppose that I have to "build" it. 2. In the makefile the chipset is default set to "CHIPSET = 3070" & the folder that holds all the extracted files is named 2008_1128_RT3070_Linux_STA_v22.214.171.124 so I'm confused as to whether this dongle has a 2870 or 3070 chipset inside. Does it matter? 3. Sorry, I'm a bit of a n00bster when it comes to all this, but I'm having some problems with the build instructions. It reads:
I'm using my Linux (SLES 10) server as a File Server at this point. I need to set File Permissions to nested folders differently to different groups. For example:
homesharedengineering* should be read only for groupA homesharedengineeringadmin should be read & write for groupB Plus read only for groupA homesharedengineeringautocad should be read & write for groupC Plus read only for groupA
I've been using Webmin and Putty to set permissions but Putty only allows me the Default Group, it won't allow me to set several groups on the same directory. Webmin seems to allow me to add multiple groups (Webmin --> Others --> File Manager --> Info & ACL tab will provide extended abilities) but when I add multiple groups, they don't seem to take effect? I'm wondering if my setup at the 'Share' level or at the hierarchy of my folder structure (unix based) needs to be set specifically?
I'm trying to transfer a directory, and all it's sub-directories and their contents, to another FTP server via SSH. I'm using CentOS Server 4.4. I can 'put' a single file, but can't figure out how to do everything at once, which I need to do.
I have a file with 5 columns. Column 4 contains numbers.Is it possible to split the file into multiple files using a condition for the contents of column 4 i.e if column 4 contains a value between 0-10 then print the lines to a new file called less_than_10.txt
I am using nessus to scan systems, and it generates the report file without any specific delimiter. Shown below is how a typical line in the file reads (It might show up as a very long line.
xx.xx.xx.xx|cpq-wbem (2301/tcp)|49272|REPORT|Synopsis :;;The remote web server is affected by multiple vulnerabilities.;;Description :;;According to its self-reported version number, the HP System;Management Homepage install on the remote host is earlier than 6.2. ;Such versions are reportedly affected by the following ;vulnerabilities :;; - Session renegotiations are not handled properly, which; could be exploited to insert
The field of interest (for me) are IP ADDRESS, Synopsys, Description, Solution and Risk Factor. I tried the following command to parse this:
But this would not give desired results as ':;;' is not a standard delimiter and hence gives incorrect results. how to grab everything that occurs between the strings 'Synopsys', 'Description', 'Solution' & 'Risk factor' in the above example? In other words i may be asking to use multiple delimiters.. in the order of occurance.. is there a tool that supports multiple delimiters?