Programming :: C++: Compiling Multiple Source Files (with Templates Involved)?
Mar 21, 2011Code:
anisha@linux-uitj:~/junk> ls -R
.:
include src
./include:
template0.h template0.h~ template0.h.gch
[code]....
Code:
anisha@linux-uitj:~/junk> ls -R
.:
include src
./include:
template0.h template0.h~ template0.h.gch
[code]....
If I remove all the template stuff, it works.
whats going on here?
compiling and linking using gcc: What does a file name with a suffix '.a' represent? If I have multiple .c and .h files, how can I link them together? How can I create the .a file?
View 6 Replies View RelatedI have 3 c++ files, classdef.h (header file with class definition), methods.cpp (class methods) and program.cpp - the program itself. Both .cpp files have
Code:
#include "classdef.h"
in files. How I can link the files together and compile them in one executable program? I am using Geany IDE for coding.
I am trying to install MySQL by compiling source files.Using mysql-5.1.46]version./configure --prefix=/usr/local/mysql was fine and I am getting following error while "make"
[Code]...
how to uninstall Mplayer and other programs that is installed by compiling source files(./configure, make , make install)
View 14 Replies View RelatedI'm trying to install the calculator Qalculate from source so I download the tar.gz package for KDE from their official website to my ~/Downloads folder. I unzipped it with
Code: Select all tar xzf qalculate-kde-0.9.7.tar.gz
I moved the exploded folder to my /home/guest/ folder (my user-name is guest), I entered the qalculate-kde-0.9.7 folder and searched for a INSTALL or README file. Here's what the INSTALL file says to do. The INSTALL file says to run the following commands
Code: Select all./configure
Code: Select allmake
Code: Select allmake install
Code: Select allmake clean
After giving the first command, trouble started; here's what I got:
Code: Select allroot@aliquis:/home/guest/qalculate-kde-0.9.7# ./configure
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking for -p flag to install... yes
[Code] .....
This is impossible, as I am running a fully functioning kde system. What should I do? I don't find the kde version of Qalculate in Apper...
I'm trying to install the Avant Window Navigator by compiling the source files and installing that way. I've extracted the file avant-window-navigator-0.4.0.tar.gz, but when I run the ./configure command, I get an error.
Code:
configure: error: in `/usr/src/avant-window-navigator-0.4.0':
configure: error:
Could not link test program to Python. Maybe the main Python library has been
installed in some non-standard library path. If so, pass it to configure
[Code].....
I try to install C support and it get this errorC/C++ template file '/home/perlsyntax/.vim/c-support/templates/Templates' does not exist or is not readableI get that after i make the dir ~/.vim and ~/.vim/plugin i put c support in my ~/.vim/plugin anyone know why i get the error message for on fedora?---------- Post added at 08:06 AM ---------- Previous post was at 07:24 AM -------------------- Post added at 01:12 PM ---------- Previous post was at 08:06 AM -------------------- Post added at 09:02 PM ---------- Previous post was at 01:12 PM ----------[/COLOR]Anyone out there?
View 2 Replies View Relatedi want to copy one or more files or directory from one drive to multiple drive simultaneously. It like a cloning a disk. But i dont like clone entire disk. i want to copy/clone only certine files or folder. if any one can know how to copy one source to multiple destination simultaneously.
View 3 Replies View Relatedls -al ../public-back
drwxrwxr-x 4 apache apache 4096 Apr 19 03:32 templates
ls -al ../public-back/templates
drwxrwxr-x 2 apache apache 4096 Apr 19 03:33 content
[code]....
How do I move the contents of /public-back/templates recursively with permissions into /public/templates ?
I am using makefile to complile all C Programming files. But certain files are not getting compiled and hence its object file is not getting generated. This is happening due to files haven't been modified for a long time. It seems that compiler knows that its object file is there hence no need to complie it actually it is not.
View 14 Replies View RelatedI'm trying to do some network bonding in RHEL 5.4, and I'm not seeing the results I expect. I have set up a number of servers using mode 1 with no issue, but I need to configure a new server differently. bond1 is created from eth1 & eth2 bonded together using mode 802.3ad with layer2 lacp bond0 is created from bond1 & eth3 using mode active-backup with bond1 as the primary interface When I bring the network services up, all traffic is passing over eth3 instead of bond1, which is the primary. Below are the modprobe.conf * ifcfg-* files involved.
My modprobe.conf:
alias eth0 e1000
alias eth1 e1000
alias eth2 e1000
alias eth3 e1000
alias scsi_hostadapter mptbase
alias scsi_hostadapter1 mptsas
alias scsi_hostadapter2 qla2xxx
[Code].....
I've been wanting to try editing programs on linux (like for my own personal mods), but I cannot find out how to load the source files into an IDE, I don't want to use Kate or gedit because it's time consuming looking at 50+ files trying to find where a piece of code would be at (say trying to find ColorDrawer.Tablet.MakeFile(thisfile,here);, and having to look for a file with the ColorDrawer class) back when I was on windows I used Visual Studio, and I liked how I could highlight the classes or actions and open the file that they were within. I've tried constant programs, MonoDevelop, QT Creator, CodeBlocks, etc, but I'm clueless as to how to actually get a source code to load into a solution. How would I go about getting say http://neverball.org/neverball-1.5.4.tar.gz into a solution for MonoDevelop (or any other IDE)?
View 9 Replies View RelatedI am trying to build an application on linux and it requires compilation of several files along with my application. Till now I have been trying using a makefile which is built for a test application which uses almost the same files as the mine by replacing its main.c file. But mow have ended up writing everything, function declarations, definitions... in the same file looks very unprofessional and is quite difficult to manage.
View 2 Replies View RelatedWhere do i found source code of c library files in ubuntu.
View 2 Replies View RelatedThe rpm command to get all the list of all installed file location after rpm installation is rpm -ql <rpm file-name>
View 7 Replies View RelatedI use a mencoder line to convert .avi to .mpg (dvd player compatible), it works well but i can only do one file at the time. It requires giving the input and output directories and the files name. I tried using (*.avi *.mpg in the command) on the directory but it just add up all the .avi and convert them into one huge .mpg. My goal is to have a script that would convert all the .avi files from a directory to the same amount of .mpg and also keep the naming of those files. Here is what i work with on single files:
Code:
mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=dvd -vf scale=720:480,harddup
-srate 48000 -af lavcresample=48000
-lavcopts
[code]....
I feel kind of embarrassed posting here, but this is technically a scripting sub-forum. Here is the problem. I have a folder with various files which include .txt files as well
How can i redirect same content to each of the .txt files in the folder?
I have tried
Code: $ echo "hello" > *.txt
-bash: !": event not found Code: also cat ~/otherdir/test.txt > *.txt
-bash: *.txt: ambiguous redirect Can anyone help me with this?Ok i solved it
Code: #! /bin/bash
for file in *.txt
do
echo "Text that needs to be written" > $file
done
I want grep multiple files:
let abc.1.abc.2,abc.3,abc.4
I use grep <pattern> abc.* to read the files. But here grep read files in the order of 1,2,3,4 . I want to to grep the files in reverse order like 1st the abc.4 file will be read and abc.1 file will be last.
Is this possible ?
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.
View 2 Replies View RelatedFlash Player ActiveX is always copying movie from I-net before playing it. Is it possible to load and play flash movies directly from any source without usage of temporary files to protect the movie from any other LOCAL outside access?
View 2 Replies View RelatedMy query is i have a.sql , b.sql , c.sql files which needs to be executed using "$ db2 -tvf a.sql"; "$ db2 -tvf b.sql"; "$db2 -tvf c.sql" , script with which i can execute all these sql files in a single shot.
View 4 Replies View RelatedI have a folder which includes bunch of folders each having data files in them. [ Folder A has F1, F2 F3 ..... F1000 folders in it, and F1, F2, F3 ... each has about 10 different files named FILE 1, FILE2, FILE3 .... in them.
I am interested in File 1 of each Folder, because that contains the data I need in it. More specifically, that File1 s have a line "ANSWER=..." in them, and i need to get that value of the ANSWER from each file. So doing it by hand is so hard, so I need to write a script that will scan all folders and give me a list of values of eache ANSWERs.
I am looking for the quickest way to do multiple searches for different files.Here is the scenario: I want to search for various icons one by one in a script. Preference is for the gnome icon theme.
The echo piped into grep part seems to take a long time. Is there a quicker way of doing this?I do not want to use slocate, sqlite or the like since that will require admin privileges to update the database and/or extra dependencies.
I have written FORTRAN code to calculate density profile. This code will open two files ( topology and x,y,z trajectory). The trajectory file contains XYZ data coordinates for multiple frames (about 20 or 100 frames for instance). One frame contains 20736 data.
Previously this code was written to open ONLY one input XYZ data file and do the calculation and would dump the results in separate file and it was running without problem. Recently my data file get bigger in size, so I decided to break the single XYZ data file into few small parts.
Now I have modified the code so that it calls the parts of the XYZ data files ( eg: maltoTHERMO_10Frames.traj, maltoTHERMO_20Frames.traj,... and so on) and do the calculation and dump the results in the same result output file. I have tested this code just with openning the XYZ coordinates and printing into another file to see wheather it collecting the data sequently and it was working fine.
This code supposedly read the x coordinate data and calculate distance and put a count accoding the criteria in the approperiate bins. But when I let the code to do the calculation it stop and shows error. (I have indicated as !** in the code). If I enable this line, it shows error but if I disable this line, than the code do collect only the XYZ coordinates.
The code is as below:
Code:
module all_parameter
integer,parameter :: MAXATOM=20736!CHANGE
integer,parameter :: midwater=1500
integer,parameter :: TOTALFRAMES=20
[Code]....
I am working with DM355 target board. Here we record. The video coming from IP cameras. Now I have to write c program for copying. The recorded avi files with date and time to NAS server using scp. I wrote a script to copy single file to NAS server.
#!/bin/bash
DATE=$(date +%Y%m%d_%H_%M_%S)
mv Camera1.avi Camera1_$DATE.avi
scp Camera1_$DATE.avi root@192.168.1.4:/root/test/
mv Camera1_$DATE.avi Camera1.av
But I have to write c program for copying multiple avi files with Date and Time to NAS server.
I want to change some HTML in my files (80+ so I prefer not to do this by hand). I got a script to replace a string in files, however the HTML I want to replace contains an enter (and tab of 4 spaces) (explanation below) Does someone know how I could update my HTML by using a function in Linux?
I also found sed but don't know how to use it with the enter (linenumbers will not work because they variate)...
[Code].....
I'm trying to change a group of cpp files to one shared lib. I have created a shared lib with a single file. I then did this with a group of files. The difference in what I'm doing is that before with the single file, .a, was added into a single .o file. Now I'm trying to add it to my main.cpp file which is NOT a .o file. I'm now getting these compiler errors from the main.cpp where is doesn't seem to recognize the semaphores.Example Error: undefined reference to `sem_wait'If I were not to use the share libs this compiles and runs as I expected it to.Something tells me this is a compiler flag issue, at least I hope it is
View 1 Replies View RelatedI've been hitting my head against a wall for awhile with this one:As the last part of some data analysis I performing I would to construct a matrix from a series of different files. These files have the format:
file 1 file 2 file 3
AAAAA .1 AAAAA .1 BBBBB .1
BBBBB .2 BBBBB .1 CCCCC .9
[code]...