f



Check .lib is complete

Hello,

Is there a simple way to check that a C++ lib is complete,
that is that it does not have any external dependencies?

Thanks, Louis.

-- 
      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]

0
Louis (1)
11/2/2009 10:53:34 AM
comp.lang.c++.moderated 10738 articles. 1 followers. allnor (8509) is leader. Post Follow

3 Replies
474 Views

Similar Articles

[PageSpeed] 49

On Nov 2, 4:53 pm, Louis Lavery <Lo...@LaverREMOVE.demon.co.uk> wrote:
> Hello,
>
> Is there a simple way to check that a C++ lib is complete,
> that is that it does not have any external dependencies?

{ edits: quoted sig and banner removed. please don't quote extraneous material 
such as signatures or the banner (which is added to every article). -mod }

Hi,

A lib is something (I guess you mean a static library: the 'lib' is
vague) created by the linker... it's no more C++, may use some other
libraries or not (and again this definition is not precise at 100%
because can be linked statically with some of them).

Replying to your post in Windows you can use dumpbin /dependencies if
I remember well. In Linux there is another command: check the manual.

But... if the lib is only a wrapper to a dynamic loaded library you
are again in trouble.


-- 
      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]

0
paperab
11/3/2009 12:57:00 AM
On Tue, 2009-11-03, paperab wrote:
> On Nov 2, 4:53 pm, Louis Lavery <Lo...@LaverREMOVE.demon.co.uk> wrote:
>> Hello,
>>
>> Is there a simple way to check that a C++ lib is complete,
>> that is that it does not have any external dependencies?
....

> A lib is something (I guess you mean a static library: the 'lib' is
> vague) created by the linker... it's no more C++, may use some other
> libraries or not (and again this definition is not precise at 100%
> because can be linked statically with some of them).
>
> Replying to your post in Windows you can use dumpbin /dependencies if
> I remember well. In Linux there is another command: check the manual.

You probably mean something like this (which by the way is likely to
work in various Unixes):

   % nm -C libprefer.a | grep -iw U

Note that it's not enough; if the library contains foo.o and bar.o you
get to see foo.o's unresolved references to symbols in bar.o, and so
on.  A static library (in the usual sense) doesn't have its internal
dependencies resolved.

By the way, I suspect this is one of those cases where the original
poster could get a better answer if he explained what he wanted to
accomplish.

/Jorgen

-- 
   // Jorgen Grahn <grahn@  Oo  o.   .  .
\X/     snipabacken.se>   O  o   .

      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]

0
Jorgen
11/8/2009 9:50:51 AM
On Nov 2, 11:53 am, Louis Lavery <Lo...@LaverREMOVE.demon.co.uk>
wrote:
> Hello,
>
> Is there a simple way to check that a C++ lib is complete,
> that is that it does not have any external dependencies?
>
google dependency walker.  It's a free download.  That will go a long
way toward telling you.  But even that will sometimes give an external
dependency that is not needed.

HTH


-- 
      [ See http://www.gotw.ca/resources/clcm.htm for info about ]
      [ comp.lang.c++.moderated.    First time posters: Do this! ]

0
AnonMail2005
11/8/2009 2:22:09 PM
Reply:

Similar Artilces:

link problems with cvi.lib symbols? Does cvi have a complet lib.c implementation ?
If anyone knows how to get this to link please let me know ? thanks in advance, art email - art_a_morel@raytheon.com #include "stdio.h" #include <ansi_c.h> //#define FILBUF_LINK_ERROR //#define IOB_LINK_ERROR main(){ int ch; FILE *fp; #if defined (FILBUF_LINK_ERROR) ch = fgetc(fp); // Wont link ch = getc(fp); // Wont link ch=getchar(); // Wont link //ch=getc(stdin); // Wont link and get both __iob and __filbuf link errors #endif #if defined (IOB_LINK_ERROR) ch = fread((void*) 0, (size_t) 1, (size_t) 1, stdin); // Wont link ch = fread((void*) 0, (size_t) 1, (si...

mixing C and C++ libs
Hi, I have problems linking a c++ program to a C static archive (.a). I don't know wether this is at all possible nor am I sure that this is the source of my problems, but the g++ outputs the following: g++ sf2raw.c \ -I../Smartspace/Development/Infrastructure/sources/sffile \ -I/usr/include/qt3 \ -lqt-mt -L$(QTDIR) \ -L ../Smartspace/Development/Infrastructure/sources/sffile \ ../Smartspace/Development/Infrastructure/sources/sffile/libsffile.a \ -o sf2raw /tmp/cckWYOAh.o(.text+0x297): In function `main': : undefined reference to `sf_file_attach(int, sf_file_error*)' /tmp/...

pgsql function using C++?, or at least C interfacing with C++ lib?
Hello, I've got a C++ library I need to use, and I want to use it from a pgsql function. Would anyone happen to have any examples of how to accomplish something like this? I see examples of C-based functions for pgsql (like dbsize, etc, in contrib). Which way should I go about this? 1) C based function, calling a C++ library (is this possible?) 2) C++ based function, calling a C++ library (I read in the pgsql docs that compiling C++ code for use with pgsql is either partially incompatible, or just a bad idea?) Also note that I would like to pass the function the f...

Better C/C++ Than C/C++?
I am looking for a good systems programming language that can be used instead of C/C++. My qualifications for the language are: * mature compiler(s) that produce native-code binaries (for Windows) * open source - preferable, but not 100% necessary Thanks, Kevin "Kevin Albrecht" <kevin@albrecht.net> writes: > I am looking for a good systems programming language > that can be used instead of C/C++. My qualifications > for the language are: > > * mature compiler(s) that produce native-code > binaries (for Windows) Ocaml, D, cyclone, Eiffel, Beta >...

jython and C-c C-c
How do I get C-c C-c to work with jython? I have the jpython command set to jython, and I can start the interpreter with C-C ! and then use C-c C-c, but this is rather frustrating. If I try to use C-c C-c without first starting the interpreter in another window I get wrong type argument: sequencep, jpython Thanks, Dave Cook ...

Perl MakeMaker
Hi, I'm building a Perl extension (dll in Windows XP) using ExtUtils::MakeMaker. This dll needs to link with other libraries that were built in static mode (-MTd). My perl configuration states dynamic libraries (-MD) which causes MakeMaker to pull a dynamic C library (msvcrtd.dll). The other libraries are using the static C library (libcmtd.lib) These dynamic and static C libraries collide giving link errors. Is there a way to force perl to compile with (-MTd) albeit its configuration flags? I tried reinstalling Perl (ActiveState perl v5.8.8 built for MSWin32- x86-multi-thread) but didn&...

Re: pgsql function using C++?, or at least C interfacing with C++ lib?
> -----Original Message----- > From: pgsql-general-owner@postgresql.org=20 > [mailto:pgsql-general-owner@postgresql.org] On Behalf Of Eric Parusel > Sent: Saturday, October 16, 2004 4:12 PM > To: pgsql-general@postgresql.org > Subject: [GENERAL] pgsql function using C++?, or at least C=20 > interfacing with C++ lib? >=20 >=20 > Hello, >=20 > I've got a C++ library I need to use, and I want to use=20 > it from a pgsql=20 > function. > Would anyone happen to have any examples of how to accomplish=20 > something=20 > like thi...

Perl MakeMaker
Hi, I'm building a Perl extension (dll in Windows XP) using ExtUtils::MakeMaker. This dll needs to link with other libraries that were built in static mode (-MTd). My perl configuration states dynamic libraries (-MD) which causes MakeMaker to pull a dynamic C library (msvcrtd.dll). The other libraries are using the static C library (libcmtd.lib) These dynamic and static C libraries collide giving link errors. Is there a way to force perl to compile with (-MTd) albeit its configuration flags? I tried reinstalling Perl (ActiveState perl v5.8.8 built for MSWin32- x86-multi-thread) but didn&...

C preprocessor "/lib/cpp" fails sanity check
I encountered this message when configuring 'make' it has nothing to do with that package, but probably more with my system... I started installing a compiler, binutils and glibc on my ttylinux-based system. It seems like I didn't configure these packages the right way, what should I do... I have a log-file of what went wrong, but I am unable to understand what's going on here... This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by GNU make configure 3.81, which was generated by GNU ...

including c libs in c++ code?
Hi I am trying to compile a cpp ap that runs on the system tray and checks recently open files with clamav. i am getting a whole bunch of undefined erros. can i link this library to a cpp program? do i need any special confiure options?. i tried removing pthread and other libraries and the results are similar. or should i write a small lib that checks buffers and just use my lib with extern? thanks for the advice. the code looks like this extern "C" { #include "clamav.h" int cl_loaddbdir(const char *dirname, struct cl_node **root, int *virnum); } compiled with redi...

creation of .lib from C or C++ code
Hi, I want to create lib file from my C / C++ code independent of compiler and uC platform. My aim is to create lib files for easy usuability by others without giving my code to them Can anyone help on this? pritiselec wrote: > I want to create lib file from my C / C++ code independent of compiler and > uC platform. Dream on. There's no such thing. On Thu, 16 Apr 2009, Hans-Bernhard Br?ker wrote: > pritiselec wrote: >> I want to create lib file from my C / C++ code independent of compiler and >> uC platform. > > Dream on. There's no such thing. &...

XCode and standard C/C++ libs
Hi! I am writing programs that are not making use of any special MacOSX features but only use standard C or C++ libraries, especially the I/O libraries. When looking at XCode I can only find predefined projects that build command line tools (C or C++). Is there any predefined project that builds standalone applications (like Codewarrior)? If not: what do I have to do to build them? Hartwig In article <40d55ded$0$205$cd19a363@news.wanadoo.nl>, Hartwig Wiesmann <hartwig.wiesmann@wanadoo.nl> wrote: > I am writing programs that are not making use of any spe...

Combining C-Dll into C++-Lib
Dear all, I have a Dll compiled with cygwin -mno-cygwin in order to avoid the cygwin dependency. Now I switched to msvc++ to use this dll in my project. I therefore generated myself an import lib called test.lib that is attached to the c-dll. In my C++ Project with msvc++ I would now like to use this dll to link agains a static c++ library compiled with msvc++. I have already done this and it did work (no unresolved symbols :)) Now I wanted to use this static library (that still has the dependency to the c-dll) to link a c++ programm against it. Now I get several linker errors. On example...

Was Windows coded in C/C++ completely?
Hello, Just wondering, which versions of Windows coded in C/C++ "completely" or was coded particularly? Or which parts(APIs, interface, kernel...) of Windows contains C++? Also i want to know which programming language is much efficent and easy-to-organize/learn under Windows platform for me? C++ or Visual Basic or other? Just want to see recommendations and comments. Thanks... On Oct 9, 12:41 pm, kimiraikkonen <kimiraikkone...@gmail.com> wrote: > Hello, > Just wondering, which versions of Windows coded in C/C++ "completely" > or was coded particularly? ...

Web resources about - Check .lib is complete - comp.lang.c++.moderated

Complete measure - Wikipedia, the free encyclopedia
The need to consider questions of completeness can be illustrated by considering the problem of product spaces. Suppose that we have already ...

‘Take The Reins,’ Film About Facebook Users’ Suicide, Looks To Complete Funding Via Indiegogo
The good news for Australian actress Emma Barrett is that the Kickstarter campaign to fund Take the Reins — her film based on the true story ...

Golden dome completes exterior of stunning Thai Buddhist pagoda in Lyneham
A sunlit golden umbrella, lowered by a crane on Sunday, has completed external construction of a stunning pagoda in Lyneham.

W-League: Melbourne City complete perfect dozen with late winner
Perfection is hard to obtain, and so it proved for Melbourne City on Saturday at Fawkner.

Oscars 2016: Complete list of nominees for the 88th Academy Awards
Epic frontier saga The Revenant, blistering thrill ride Mad Max: Fury Road, outer space tale The Martian and captivity drama Room are among the ...

Major leak reveals the LG G5 is getting a complete design overhaul
... will really be like. According to a leaked blueprint the publication received from Shai Mizrachi , it seems the G5 will represent a complete ...

WWE SmackDown Spoilers: Complete Results and Analysis for January 21 - Bleacher Report
WWE world heavyweight champion Roman Reigns was forced into a handicap match on Tuesday night at the SmackDown tapings just days before the biggest ...

Iran completes prisoner swap with U.S. - Videos - CBS News
The United States and Iran began a new chapter of international relations Saturday following the implementation of a landmark agreement, part ...

Pattern Energy Completes 150 MW Amazon Wind Farm Fowler Ridge
California-based Pattern Energy has announced it has completed construction on the 150 MW Amazon Wind Farm Fowler Ridge project in Benton County, ...

Apple's plan to wipe out disc drives is nearly complete
With only a single machine that still has a DVD drive, Apple is close to finishing something it began nearly six years ago.

Resources last updated: 1/24/2016 3:44:58 AM