This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Urgent Question regarding GCOV


Hello GCC Experts,

    I am an engineer trying to run gcov for our unit tests. We have a couple of DLLs and a few static libraries.

    I am having trouble linking the Test program that links in the DLLs. I have the following in the Cmake files:

IF( "${COVERAGE}" STREQUAL "TRUE" )
     LINK_DIRECTORIES(/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3)
     TARGET_LINK_LIBRARIES( NWATest analytics TestUtils ${SYSTEM_LIBS} )
ENDIF( "${COVERAGE}" STREQUAL "TRUE" )


I have similar lines for all make files that create TARGET_LINK_LIBRARIES.

But I get the following errors:

/bin/ld: NWATest: hidden symbol `__gcov_init' in /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3/libgcc.a(_gcov.oS) is referenced by DSO


COULD SOMEONE PLEASE HELP!!! I have not found ANY ONLINE documentation or solutions on message boards.

Many Thanks.    PLEASE SEE MORE INFO BELOW.
Jayashree

Below is the last cmd line that was executed: I have provided some info on uname etc...



/usr/bin/c++   -Wall -fPIC -m64 -DLINUX -fprofile-arcs -ftest-coverage -D_DEBUG  -ggdb3  -fPIC "CMakeFiles/NWATest.dir/nwaTest.o"   -o NWATest -rdynamic -L/mnt/releases/icu4c/gnr/latest/sles9_64-gcc33-debug/lib -L/home/jramani/CMake/cb_bugs0809/sles9_64-gcc33-debug/nameworks/analytics -L/home/jramani/CMake/cb_bugs0809/sles9_64-gcc33-debug/test-utils -L/home/jramani/CMake/cb_bugs0809/sles9_64-gcc33-debug/nameworks/common -L/home/jramani/CMake/cb_bugs0809/sles9_64-gcc33-debug/parser -L/home/jramani/CMake/cb_bugs0809/sles9_64-gcc33-debug/classifier -L/home/jramani/CMake/cb_bugs0809/sles9_64-gcc33-debug/analyzer -L/home/jramani/CMake/cb_bugs0809/sles9_64-gcc33-debug/nvg -L/home/jramani/CMake/cb_bugs0809/sles9_64-gcc33-debug/genderizer -L/home/jramani/CMake/cb_bugs0809/sles9_64-gcc33-debug/coa_plus/nc_coa -L/home/jramani/CMake/cb_bugs0809/sles9_64-gcc33-debug/coa_plus/coa -L/home/jramani/CMake/cb_bugs0809/sles9_64-gcc33-debug/transliterator
-L/home/jramani/CMake/cb_bugs0809/sles9_64-gcc33-debug/sifter -lanalytics -Wl,-Bstatic -lTestUtils -Wl,-Bdynamic -lpthread -ldl -Wl,-Bstatic -lISShared -lNameParser -lNameClassifier -lNameAnalyzer -lNameVariantGenerator -lNameGenderizer -lNC_COA -lCOA -lNameTransliterator -lNameSifter -Wl,-Bdynamic -lsicui18n -lsicuuc -lsicudata
-Wl,-rpath,/mnt/releases/icu4c/gnr/latest/sles9_64-gcc33-debug/lib:/home/jramani/CMake/cb_bugs0809/sles9_64-gcc33-debug/nameworks/analytics:/home/jramani/CMake/cb_bugs0809/sles9_64-gcc33-debug/test-utils:/home/jramani/CMake/cb_bugs0809/sles9_64-gcc33-debug/nameworks/common:/home/jramani/CMake/cb_bugs0809/sles9_64-gcc33-debug/parser:/home/jramani/CMake/cb_bugs0809/sles9_64-gcc33-debug/classifier:/home/jramani/CMake/cb_bugs0809/sles9_64-gcc33-debug/analyzer:/home/jramani/CMake/cb_bugs0809/sles9_64-gcc33-debug/nvg:/home/jramani/CMake/cb_bugs0809/sles9_64-gcc33-debug/genderizer:/home/jramani/CMake/cb_bugs0809/sles9_64-gcc33-debug/coa_plus/nc_coa:/home/jramani/CMake/cb_bugs0809/sles9_64-gcc33-debug/coa_plus/coa:/home/jramani/CMake/cb_bugs0809/sles9_64-gcc33-debug/transliterator:/home/jramani/CMake/cb_bugs0809/sles9_64-gcc33-debug/sifter
/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3/../../../../x86_64-suse-linux/bin/ld: NWATest: hidden symbol `__gcov_init' in /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3/libgcc.a(_gcov.oS) is referenced by DSO
collect2: ld returned 1 exit status
make[2]: *** [nameworks/testing/NWATest] Error 1



~/sles9_64-gcc33-debug$ uname -a

Linux lnxdev9 2.6.5-7.244-smp #1 SMP Mon Dec 12 18:32:25 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux


~/sles9_64-gcc33-debug$ which gcc
/usr/bin/gcc


~/sles9_64-gcc33-debug$ which gcov
/usr/bin/gcov





      


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]