Sponsored Content
Operating Systems Linux Debian Application link error with gcov Post 302156942 by clho on Wednesday 9th of January 2008 04:26:20 PM
Old 01-09-2008
Application link error with gcov

Hi,

I'm trying gcov on my Debian VM.
gcov (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)
Copyright (C) 2006 Free Software Foundation, Inc.

It work with example program, but I got link error in my application code.

C_FLAGS += -Wall -W -O0 -fprofile-arcs -ftest-coverage

Each class file has the same error:

fileMgr.o: In function `global constructors keyed to 0__ZN7FileMgrC2Ev':
fileMgr.cpp: (.text+0x254da): undefined reference to `__gcov_init'
fileMgr.o: (.data.rel+0x24): undefined reference to `__gcov_merge_add'
backupMgr.o: In function `global constructors keyed to 0__ZN9BackupMgrC2Ev':
backupMgr.cpp: (.text+0x10458): undefined reference to `__gcov_init'
backupMgr.o: (.data.rel+0x24): undefined reference to `__gcov_merge_add'
...
collect2: ld returned 1 exit status
make: *** [fileMgmt] Error 1

Did I missing something?

Thanks!
 

10 More Discussions You Might Find Interesting

1. Programming

Link Edit Error, Help!!!!!

Hi, After I installed gcc on my machine and issued a command to compile a program, I did gcc -c 'prog'.c The object file was created, then I did gcc -o 'prog' 'prog'.o Then I got this error message I have been reading man pages and searching the internet but have not been able to... (1 Reply)
Discussion started by: rachael
1 Replies

2. Linux

link error problem

Dear linuxers, I'm a novice in C++ programming. I wrote a ReadFile class in file ReadFile.cpp. After that, I wrote a test.cpp, which contains a main function, to test whether my class work well. I follow the following steps to compile the ReadFile.cpp file. g++296 -c ReadFile.cpp -o... (4 Replies)
Discussion started by: niukun
4 Replies

3. Linux

GCOV : struct bb

Hi, I am working on gcov.Meaning, analysing the functionality of gcov. There is one structure called "struct bb". I am not sure, how struct bb members are getting assigned values. If anyone knows how it is happening pls let me know. Thanks in advance. --Vichu (0 Replies)
Discussion started by: Vichu
0 Replies

4. Shell Programming and Scripting

Bash removing sysmacros.h from GCOV

Hey. GCC GCOV now outputs a file called sysmacros.h as part of its results. How can I remove it from the html? The tags looks like this: <tr bgcolor="e0f0d0"> <td bgcolor="dae7fe" style="padding-top: 3px; padding-left: 30px; padding-bottom: 3px; padding-right: 30px;">... (3 Replies)
Discussion started by: rpowell86
3 Replies

5. Programming

Using gcov

Hi, I am using gcov to get code coverage for my program written in C++, I am able to do it without any problem when i don't have a directory structure, for my program I am a directory structure as below ./src/ -- containing all my source files ./obj/ -- containing all my object... (0 Replies)
Discussion started by: niranjanvg
0 Replies

6. Shell Programming and Scripting

Need script to remove GCOV flags from Qt project file

Hi, I have the following gcov compilation flags in all the QT source code project (*.pro) files. CONFIG(gcov) { LIBS += -lgcov QMAKE_CXXFLAGS += -fprofile-arcs -ftest-coverage } Now, I want to remove these flags off my files. Please help me with a script to... (1 Reply)
Discussion started by: royalibrahim
1 Replies

7. Programming

g++ fails to link to static library when compilation and link in single command

Hello All, I've encountered a strange behaviour from g++ that doesn't make sense to me. Maybe you can shed some light on it: I have a bunch of source files and want to compile them and link them with a static library liba.a located in /usr/local/lib64 into an executable Approach 1 works... (0 Replies)
Discussion started by: magelord
0 Replies

8. UNIX for Dummies Questions & Answers

[Solved] Symbolic link not allowed or link target not accessible

Hi everybody, I read about treads realted to this issue but they did not resovle issue given below. Please help me resolve issue given below I have html file under /srv/www/htdocs/actual_folder ls actual_folder/ test.html and following link works... (0 Replies)
Discussion started by: newbielgn
0 Replies

9. Solaris

/var/adm/messages (interface turned off/restored) and link up & link down message.

Hi All I am facing an issue with our new solaris machine. in /var/adm/messages root@Prod-App1:/var/tmp# root@Prod-App1:/var/tmp# root@Prod-App1:/var/tmp# cat /var/adm//messages Apr 20 03:10:01 Prod-App1 syslogd: line 25: WARNING: loghost could not be resolved Apr 20 08:24:18 Prod-App1... (0 Replies)
Discussion started by: javeedkaleem
0 Replies

10. Solaris

/var/adm/messages (insterface turned off/restored) and link up & link down message.

Hi All I am facing an issue with our new solaris machine. in /var/adm/messages Apr 22 16:43:05 Prod-App1 in.routed: interface net0 to 172.16.101.1 turned off Apr 22 16:43:33 Prod-App1 mac: NOTICE: nxge0 link up, 1000 Mbps, full duplex Apr 22 16:43:34 Prod-App1 mac: NOTICE: nxge0 link... (2 Replies)
Discussion started by: javeedkaleem
2 Replies
Debian::Copyright(3pm)					User Contributed Perl Documentation				    Debian::Copyright(3pm)

NAME
Debian::Copyright - manage Debian copyright files VERSION
This document describes Debian::Copyright version 0.1 . SYNOPSIS
my $c = Debian::Copyright->new(); # construct a new $c->read($file1); # parse debian copyright file $c->read($file2); # parse a second $c->write($ofile); # write to file DESCRIPTION
Debian::Copyright can be used for the representation, manipulation and merging of Debian copyright files in an object-oriented way. It provides easy reading and writing of the debian/copyright file found in Debian source packages. FIELDS
header An instance of Debian::Copyright::Stanza::Header class. Contains the the first stanza of the copyright file. If multiple files were parsed only the first will be retained. files A hash reference (actually Tie::IxHash instance) with keys being the values of the "Files" clause and values instances of Debian::Copyright::Stanza::Files class. licenses A hash reference (actually Tie::IxHash instance) with keys being the values of the "License" clause and values instances of Debian::Copyright::Stanza::License class. CONSTRUCTOR
new Constructs a new Debian::Copyright instance. The "header" field is initialised with an empty string. The "files_block" and "license_block" fields are initialised with an empty instance of Tie::IxHash. METHODS
read file Parse "copyright" in debian and accessors. file can be either a file name, an opened file handle or a string scalar reference. write file Writes a debian/copyright-like file in file with the contents defined in the accessor fields. file can be either a file name, an opened file handle or a string scalar reference. LIMITATIONS
This module is written with one particular version of DEP-5 <http://anonscm.debian.org/viewvc/dep/web/deps/dep5.mdwn?view=markup&pathrev=135> in mind. When required it should be easy to add support for extra versions, but at the moment the supported version is the one generally used in the Debian Perl Group. Test coverage is not yet complete. COPYRIGHT &; LICENSE Copyright (C) 2011 Nicholas Bamber nicholas@periapt.co.uk This module was adapted from Debian::Control. Copyright (C) 2009 Damyan Ivanov dmn@debian.org [Portions] This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. perl v5.12.4 2011-08-27 Debian::Copyright(3pm)
All times are GMT -4. The time now is 11:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy