Sorry for this query, if it sounds too elementary. I didnot fully
understand why loading a jpeg image for example require linking with
jpeg, tiff, png, z, ws2_32 libraries? On top of this..in the build of
VXL that I have, I seem to be requiring to link to dcmtk as well (for
Can anyone please explain this requirements?
I am also getting the following error after linking with dcmtk
dcmtk.lib(dcuid.obj) : error LNK2019: unresolved external symbol
_Netbios@4 referenced in function "unsigned char * __cdecl
getMACAddress(unsigned char * const)" (?getMACAddress@@YAPAEQAE@Z)
Thanks a lot
Date: Fri, 30 Dec 2005 10:10:04 +0100
From: Quique Fernandez <
To: "Miguel A. Figueroa-Villanueva" <email@example.com>
Subject: Re: [Vxl-users] Linker errors with Dev C++
Content-Type: text/plain; charset=ISO-8859-1
> These errors are most probably due to compiling with different
> libraries, given that the symbols it complains about are in fact part of
> vil, vcl. I have vxl built with MinGW and with
VS.net, both in a windows
> XP machine. So, this shouldn't be a problem for you.
I've finally changed to linux, because I'm not sure that visual had built
the vxl libraries correctly, and when windows fails, usually linux have
I've just compiled the file successfully using the libraries you told me
However, it appears that vil, vcl are not enough. In other words after
> you use the same compiler for both (i.e., VXL and your code) you will
> likely encounter other undefined symbols due to other libraries (e.g.,
> jpeg, tiff, etc).
> I copied the code you have there and compiled it with mingw successfully:
> g++ -c -I"/path/to/vcl" -I"/path/to/core"
> Then I linked to the mingw vxl libs:
> g++ test.o -L"/path/to/vxl_mingw/lib" -lvil -lvcl
> but this gives me errors such as:
> undefined reference to `WSAStartup@8'
> undefined reference to `socket@12'
> undefined reference to `WSAGetL
> I had to link with all the following to successfully create the
> g++ test.o -L"/path/to/vxl_mingw/lib" -lvil -lvcl -ljpeg -ltiff -lpng
> -lz -lws2_32
It gave me the same errors until I wrote the aditional libraries.
My suggestion is that you build both VXL and your code, not only with
> the same compiler, but also with cmake. This way cmake will determine
> that it needs all the other libraries (i.e., jpeg, tiff, png, z, ws2_32)
> when you add the vil library. Of course, you can do this manually as I
> did above, but if you start handling a lot of code it is easier to let
> CMake take care of the dependencies...
I'm very interested in the compilation with CMake, because I don't know the
library very well yet, and I don't know the dependencies between libraries.
How can I compile using cmake, so that it takes care of the dependencies?
Thank you a lot. I was beginning to hate the library before being able to
load an image. xD