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 success...

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" test.cxx

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:

../vxl_mingw/lib/libvil.a(vil_stream_url.obj)(.text+0xa8a):vil_stream_url.cxx:
undefined reference to `WSAStartup@8'
../vxl_mingw/lib/libvil.a(vil_stream_url.obj)(.text+0xab3):vil_stream_url.cxx:
undefined reference to `socket@12'
../vxl_mingw/lib/libvil.a(vil_stream_url.obj)(.text+0xadc):vil_stream_url.cxx:
undefined reference to `WSAGetL

I had to link with all the following to successfully create the executable:

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