|
From: Silvano C. <cat...@ya...> - 2008-12-01 22:20:36
|
Hello,
I am writing an XML database. It is composed by four components:
1) wgClibs // generic C lib
2) wgCppLibs // general purples C++ classes
3) WNPComm // IPC library using named-pipe
4) wlxdb // the light xml database
Every components has its own test programs..
VG returns me 0 error for C and C++ libs both. But the problems begin with WNPComm... Its core has been developed in pure C, but in order to use this library in C++ I have written a class that provides all functionalities of WNPComm. The C core (WNPComm.c) functions very well and VG gives me 0 error. But the VG tests on Cpp wrapper class returns me impossible errors!!
I have tried to leave the Cpp class (CppWNPComm.cpp) empty, also the test empty, and no link to the core.
g++ -Wall CppWNPComm.cpp -I. -I../C -I/usr/include -I/usr/local/include -c -o CppWNPComm.o -D__DEBUG__=0
ar rcs libCppWNPComm.a CppWNPComm.o
g++ -Wall CppWNPComm.cpp -I. -I../C -I/usr/include -I/usr/local/include -c -o CppWNPComm-sh.o -D__DEBUG__=0 -fPIC
LD_RUN_PATH=../C g++ -shared CppWNPComm-sh.o -Wl,-soname,libCppWNPComm.so -lwgc -lwgcpp -L../C -o libCppWNPComm.so
VG returned me 0 errors:
==4813== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 23 from 1)
==4813== malloc/free: in use at exit: 0 bytes in 0 blocks.
==4813== malloc/free: 0 allocs, 0 frees, 0 bytes allocated.
==4813== For counts of detected errors, rerun with: -v
==4813== All heap blocks were freed -- no leaks are possible.
BUT, if I leave the files empty but I link the (C++) CppWNPComm to (C) WNPComm then strange tings happend
g++ -Wall CppWNPComm.cpp -I. -I../C -I/usr/include -I/usr/local/include -c -o CppWNPComm.o -D__DEBUG__=0
ar rcs libCppWNPComm.a CppWNPComm.o
g++ -Wall CppWNPComm.cpp -I. -I../C -I/usr/include -I/usr/local/include -c -o CppWNPComm-sh.o -D__DEBUG__=0 -fPIC
LD_RUN_PATH=../C g++ -shared CppWNPComm-sh.o -Wl,-soname,libCppWNPComm.so -lwgc -lwgcpp -L../C -lWNPComm -o libCppWNPComm.so
I am using VG by two years an I think is great tool.
|
|
From: Christoph B. <bar...@or...> - 2008-12-08 10:40:59
|
Am Montag, 1. Dezember 2008 schrieb Silvano Catinella: > BUT, if I leave the files empty but I link the (C++) CppWNPComm to (C) > WNPComm then strange tings happend > > g++ -Wall CppWNPComm.cpp -I. -I../C -I/usr/include -I/usr/local/include -c > -o CppWNPComm.o -D__DEBUG__=0 ar rcs libCppWNPComm.a CppWNPComm.o > g++ -Wall CppWNPComm.cpp -I. -I../C -I/usr/include -I/usr/local/include -c > -o CppWNPComm-sh.o -D__DEBUG__=0 -fPIC LD_RUN_PATH=../C g++ -shared > CppWNPComm-sh.o -Wl,-soname,libCppWNPComm.so -lwgc -lwgcpp -L../C -lWNPComm > -o libCppWNPComm.so > > > I am using VG by two years an I think is great tool. You did not tell us what strange things happen? Christoph |