Programming :: How To Write A Lds - Linker Script - File?

Oct 13, 2010

I first found something called lds(linker script) file.

And now I am willing to do a test with __attribute__((section)) to make a function stay in a private section. Sounds fun to me.

Part of my source code looks like this

By objdump, I didn't find a section called "my_own".

View 2 Replies


ADVERTISEMENT

Programming :: C++ Link Error - File Format Not Recognized - Treating As Linker

Apr 22, 2010

I am trying to compile a software using a provided sdk. I suspect that the sdk has some mismatch of the platform library, but I am not sure.

The error I got is

Code:

The libidata.so.42 is there in that folder. I guess the file might be in a big endian. Is there a way to check if the libidata.so.42 i have might be a big endian format, rather than little endian?

If my guess is incorrect, This is a c++ code on fedora x86 machine.

View 4 Replies View Related

Programming :: Linker: Fatal Error LNK1104: Cannot Open File 'tbb_debug.lib'

Jan 16, 2011

Recently I have downloaded TBB and I want to run a program using its libraries. But I encountered the following error: Linker: fatal error LNK1104: cannot open file 'tbb_debug.lib'

View 1 Replies View Related

Programming :: GCC Linker Failed To Link ?

Apr 7, 2011

In linking a library in using GCC.

I am compiling Pro*C code.

When the maKe file start compiling if prints following :

Code:

I tried different options but unable to find the reason why it is not linking the libraries correctly.

View 3 Replies View Related

Programming :: Linker Error Using Cross Compiler

Aug 11, 2010

I am using a arm compiler to build my program but getting following compiler error at the end -
init.c.text+0x2c): undefined reference to '__libc_csu_fini'
init.c.text+0x34): undefined reference to '__libc_csu_init'

View 1 Replies View Related

Programming :: Static Linker With Make Configure

Oct 2, 2010

I need to compile a program and make it portable to other computers, but it needs some external libraries and I don't want them to be linked dynamically, I would like to compile them as one single executable or at least compile them in the same directory as the main output files. The program is sphinx>, it has its own configure and make scripts. I know I can run g++ with the -static flag, but I don't know how to do this with make or configure. This is the ./configure --help output

[Code]....

View 1 Replies View Related

Programming :: Undefined Reference To 'pthread_create' From Linker?

Jul 6, 2010

I am having trouble linking the pthread library.I have -lpthread -lm as options for the GNU GCC compiler.

Build Log
Compiling: main.c
Compiling: matrix.c

[code]...

View 2 Replies View Related

Programming :: Linker Error - Couldn't Get The Program To Link

Jul 9, 2010

I have a simple C program which uses ncurses library and I am having linker issues and couldn't get the program to link.

[Code]...

So I think the ncurses libraries are in place but gcc still couldn't link. I am totally stumped.

View 3 Replies View Related

Programming :: Get Ride Unwanted Compiler / Linker Output

Jul 18, 2011

I am using g++ 4.5.2 I copied and tried a piece simple (Making a Class Writealbe to a Stream) program, from page 363 of book(C++ cookbook), Example 10-6 your can download and test by yourself [URL]

[Code]....

View 1 Replies View Related

Programming :: Linker Error For A Singleton Class Program

May 5, 2011

I am getting a linker error for a simple program to represent a singleton class.

Find below the program which I have written:

View 3 Replies View Related

Programming :: Compiling Mplayer - Boat Load Of Linker Errors

Mar 30, 2011

I did a ./configure and make and got this returned about 1/2 hr later:

Code:
undefined reference to `glDisable'
undefined reference to `glDisable'
undefined reference to `glutKeyboardFunc'
undefined reference to `glutSpecialFunc'
undefined reference to `glReshapeFunc'

And the oddest part is.... I passed --disable-gl to configure!

View 4 Replies View Related

Programming :: C++ Program Does Not Write File

Jun 26, 2011

I have the following problem. I call a C++ program from a Java servlet by using Runtime exec. The OS is ubuntu and I use Netbeans 7.0 with Glassfish 3.1 web server.The program executes but it does not open and write into a specified file in a specified folder. The same C++ program compiled under Windows opens and writes this file.How can I solve this problem in Linux?

View 2 Replies View Related

Programming :: Changing Log Script To Write To Top Of File

Apr 5, 2011

I'm running a simple backup and log script that is cronjobed to run twice a day. So currently, when new data is added to the log, its added to the direct bottom of the log file. However, I would like to have it printed to the very top of the log. The code is attached, I can't quote it in here because I am a new user and the system thinks I have url's in it, when they are just paths.

View 2 Replies View Related

Programming :: Detect If A File Is Used In Write Mode?

Apr 14, 2011

I have to read files from a linux server. When I copy a file I receivce just a portion of the file I expected if the process generationg ths file is still writing it.

I read the file from a java apllication using SSH/SFTP. How can I detect if the file is still used by the writing process ?

View 4 Replies View Related

Programming :: Can't Write Header To Excel File?

Jan 15, 2010

I am having trouble getting some code to work. It takes an input file (csv) and converts it to an XLS. The problem is that I can't seem to get a header to be printed first...

Code:
use Spreadsheet::WriteExcel;
my $input = $ARGV[0];

[code]...

View 5 Replies View Related

Programming :: How To Write To A File With Specific Indentation Through Php

Dec 12, 2008

I am a beginner with php ,trying to work my way through.
I have a file to be written with particular indentation and by appending some special characters...
this is the o/p file i wanted. could anyone please guide me as to how i can write it? code...

View 1 Replies View Related

Programming :: Write Output Of Two Commands To A File?

Oct 12, 2010

I'm writing output of top command to a file However since top does not provide time I would like to append the 'date' command and then write all this to a file.

so something like top -d 1 -b; echo 'date' >>file

View 1 Replies View Related

Programming :: Perl - Writing To File - Keep Open Or Only During Write?

May 24, 2011

i am working on this thread: [URL] if it is better to open a file every time i need to write to it or should i keep a file open the whole time and when i am done with the script, close it and sendmail it out?

Or i just thought of this: i could keep concatenating to a string and just sendmail when done.

View 2 Replies View Related

Programming :: Write An If Statement For The First Line Of A Text File Bash?

Feb 15, 2011

At the moment I got my md5sum checking working which I write to a text file and see below.

If the md5sum works it will write the output to check2.md5 test.txt: OK

If the md5sum fails it will write test.txt: FAILED

How do I write if statement to check the output whether or not the md5sum failed or not ?

check1="/home/ops/Desktop/test1/check1.md5"
check2="/home/ops/Desktop/test1/check2.md5"
cd /home/ops/Desktop/test1
md5sum test.txt > $check1

[Code]....

View 2 Replies View Related

Programming :: Write A Shell Script Which Edits A Config File ?

Mar 1, 2011

Write some simple script?

Heres what Im trying to do:

-Qjackctl has a config file which is modified each time QjackCtl is shut down. This means that whatever preset is in use when QjackCtl closes is written into the QjackCtl config file as the DEFAULT PRESET, for the next time QjackCtl starts (or at least this is how I understand it).

-I want to edit a specific line in the QjackCtl.config file, which specifies the DEFAULT PRESET. Obviously its easy to do manually, but I want to do it using a shell script which runs automatically on StartUp so that QjackCtl starts every time with the same DEFAULT PRESET, NOT the last one used.

-Unfortunately Im not at my Linux system right now (which is KXStudio/Kubuntu), but I believe the QjackCtl.config line looks something like this: DEF_PRESET=alsa (where alsa is the name of the preset)

PRESET1=alsa
PRESET2=firewire

I want a shell script which changes the line DEF_PRESET=alsa to DEF_PRESET=alsa, even when it may currently exist as DEF_PRESET=firewire due to occasions when firewire was the active preset when Qjackctl was last closed. I notice that the application in KDE that enables the user to set which applications open automatically on StartUp also allows the user to select shell scripts.

Ive done some research, as a beginner, and Im led to believe I might need to use AWK and/or CHMOD. I could have a go at writing a shell script but Im always wary about experimenting with StartUp scripts/operations because obviously if I get it wrong and make my system unusable, then because its going to run first thing on each boot, Id have great difficulty disabling it.

View 3 Replies View Related

Programming :: Bash Checking For File Write Completion Before Acting?

Jan 20, 2011

I have a bash script that checks for contents in a folder every 15 seconds and then acts on it's contents. This works great for the average size file however on very large files it starts acting on the file before it's completely written. Is there a facility in bash shell to get a file complete signal or such? here is trigger to launch a larger script.

Code:

#!/bin/sh
while true
do
$HOME/bin/hpgl.sh >/dev/null 2>&1 &

[code].....

View 10 Replies View Related

Programming :: Write A Shell Script Which Will Check A File Name In A Dir And Copy It?

Apr 2, 2010

I am a novice to the shell script. In my system from db server the log files are enerating with the name log1.txt,log2.txt..... It is capable of keeping 10 files at a time in dir called /db/sis/log1.txt. I want to copy the log1.txt to another directory when ever it generating by attaching the time stamp to it for the back-up purpose. this files will be there for a period of 24 hours. after that the back-up dir should be cleared and it start copying again the fresh file from the same dir.

View 3 Replies View Related

Programming :: How To Write Using Fwrite Without Affecting Existing Content Of File?

Oct 30, 2010

How can I write to a file multiple times using fwrite without affecting the previous writes?The method shown below accepts a file name, buffer and offset. The method opens the file in reading/writing mode and writes the content of the buffer at offset.

View 1 Replies View Related

Programming :: Find / Write A Shell Script That Will Go Through A File Organized?

Jul 3, 2009

I am trying to find / write a shell script that will go through a file organized like this (but with thousands of lines)...

93,5.00,"contig00002",169,83,"jgi|Brafl1|100379|fgenesh2_pg.scaffold_359000019"
579,1.00,"contig00003",3,380,"jgi|Brafl1|114745|estExt_fgenesh2_pm.C_1200006"
450,5.00,"contig00007",2,352,"jgi|Brafl1|274326|estExt_GenewiseH_1.C_8420008"

...and check the region of each line between the second and third pipes (the 6-digit numbers) against the values in the first column of a separate text file in CSV format like this...

274326,"Wnt family of developmental regulators"
114745,"FOG: Hormone receptors"
100379,"Transcription factor tinman/NKX2-3, contains HOX domain"

...and when they match, replace the value to the right of the third pipe (e.g., fgenesh2_pg.sca...) with the value in the second column in the CSV file associated with that number.

View 4 Replies View Related

Programming :: Write A Program Which Will Read Input From A Text File

Apr 7, 2010

i am trying to write a program which will read input from a text file, check if each line contains any alphabets and then display a message imforming me if there is an alphabet in each line. My text file is formatted in this way...

[Code]....

View 2 Replies View Related

Programming :: Simple Bash To Write Files By Year To A Log File

Jan 31, 2011

I have a folder of 2 many files that the old ls just hangs.

I am trying to write some log files such as;

I don't mind doing one at a time, but I am just playing and even getting the listing I am not getting the date stamp, I have the following;

That does create the file, but all the files look like this;

So basically it's just sticking that ls inside the log file and not actually running the ls, so how can I use the above type to get files just created per year?

View 2 Replies View Related

Programming :: Write A Script That Makes File Executable And Writes A Message That It Has Been Done?

Mar 10, 2010

like my alias a retired person, and Its never to late to learn something½ve just installed Ubuntu and found a tutorial online about bash-script.Manage some, but I cant to this one:[Write a script that makes file executable and writes a message that it has been done.If I run the command > <scriptName> <fileName> , then the file fileName should be executable and then it should indicate that fileName have been executable.]

Ive read man pages up-n-down and search the web, and I think I should let the script use chmod and ls -l, but I cant get the hole picture here. Actually I have nothing to show up, so I hope someone could help me with some ideas or a soloution - just to the how it should look.This is my first post, ever, at a forum like this, so please be nice if I didnt follow any rules here, I dont know if you even will answer this post, but at least give me some clues, a skeleton-code ti be based on

View 2 Replies View Related

Programming :: Write A Utility Which Will Scan In A Text File And Search And Replace Strings?

Jul 16, 2010

Something very handy to do in a Linux shell, is manipulating files and strings - essentially parsing data. Write a utility which will scan in a text file and search and replace strings. We also want to keep track of how many strings we've replaced.

I know that my command would look like this: <utility name> <filename> <stringToSearchFor> <stringToReplaceWith>
Code: #!/bin/bash

[code]....

View 2 Replies View Related

Programming :: Write Data To Text File Which Is Coming On Serial Port Infintely?

Aug 5, 2010

trying read serial COM port and want to write that received data to file, now its writing only one sentence, but i want to write full file which coming on serial port, as i'm sending file from hyper terminal and reading on linux pc, If i put while loop its not writing anything,without while loop its writing only one line and if send big file then application terminates and then writes to file.But i need do write any size which coming on serial port.Finally i want write full file which is coming on hyper terminal, after writing the file it has wait for next data. This is my code,

#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>

[code]...

View 9 Replies View Related

Programming :: Write A Batch File For Windows That Starts Cygwin Tool And Runs Unix Scripts?

Nov 17, 2008

I need to write a batch file for windows that automatically starts the cygwin tool in windows and executes the unix scripts.Previously we had these scripts in unix server.Now we need to migrate them to Windows server.For this reason we are using cygwin tool that allows the scripts to be executed on Windows server.We had written a batch file that starts the cygwin tool,but we were not able to execute the unix scripts.How can we write a batch file such that it executes all the unix scripts in cygwin.

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved