Re: c++, libraries, shell, headers, and a big mess!



mauro writes:

Hi all,
I'm installing few open source libraries for 3d graphics (itk, vtk,
and opencv) starting from the source code.
But a big mess over here! And similar problems with installing the 3
packages (for that I'm thinking to a kind of shell configuration).
The compilation and installation (make;make install) seems okay, but
the problem there are when I'm using the libraries, because they are
not recognized.

Of course it is a big mess, as you say. Rather than manually building and installing this stuff, you should be using your Linux distribution's package manager to create and install the software as discrete packages. This makes it much easier to manage and administrate your system over time.

Of course, you will have to learn how to use your package manager. Educate yourself, and just consider it as an investment in time, that brings long term benefits.

I.e. with vtk, im my c++ example file, I include the header file where
a function is defined (i.e. the function cvLoadImage), the header file
is loaded correctly, but it gives that problem:

/tmp/ccdYdt0f.o: In function `main':
opencv.cpp:(.text+0x52): undefined reference to `cvLoadImage'

You did not link with the correct library.

but I cannot figure out what it happened! Probably it cannot see the
libraries (that are correctly installed in /usr/local/lib), I don't

No, if it cannot see libraries, you'd get a different error about being unable to find a specific library. All the libraries that you've linked with -- it found them, all right. But, you did not link with whatever library provides that function.

Attachment: pgp0aUlTZYzIo.pgp
Description: PGP signature



Relevant Pages

  • Re: Exportability of EDA industry from North America?
    ... > if a stock RedHat 9 system really does have so much trouble installing ... RedHat never uses /usr/local/lib for its libraries, ... > standard or similar to the upstream source packages. ... that you have created in your development of gEDA, ...
    (sci.electronics.cad)
  • Re: Exportability of EDA industry from North America?
    ... > if a stock RedHat 9 system really does have so much trouble installing ... RedHat never uses /usr/local/lib for its libraries, ... > standard or similar to the upstream source packages. ... that you have created in your development of gEDA, ...
    (sci.electronics.design)
  • KDE - icons and fonts not anti-aliased
    ... from ports and the icons and fonts look jagged ... without the Xft support, when I was installing ... XFree86-libraries-4.3.0_6 XFree86-4 libraries and headers ... docbook-1.2_1 Meta-port for the different versions of the DocBook DTD ...
    (freebsd-questions)
  • KDE - icons and fonts not anti-aliased
    ... from ports and the icons and fonts look jagged ... without the Xft support, when I was installing ... XFree86-libraries-4.3.0_6 XFree86-4 libraries and headers ... docbook-1.2_1 Meta-port for the different versions of the DocBook DTD ...
    (freebsd-questions)
  • Re: [SLE] 9.1 already legacy?
    ... I'd just try compiling what you're installing so it uses the libraries ... If it -needs- the newer libraries.. ... You can't really blame SuSE for packages they use getting out of date. ... I attempted to upgrade ...
    (SuSE)