Well, my little hack worked in so far as the vil project compiles, but the vil.lib has 75 unresolved external symbols that turn up when I try to use it in a project. For example:
vil.lib(vil_png.obj) : error LNK2019: unresolved external symbol _png_destroy_read_struct referenced in function "public: __thiscall vil_png_structures::vil_png_structures(bool)" (??0vil_png_structures@@QAE@_N@Z)
which is indicating some problem with libpng. I'm rather at a loss of how to proceed. Any help would be greatly appreciated. Thank you in advance!
Hi Everyone, I'm new to VXL, and relatively new to CMake, so it's possible that my problem stems from a simple configuration setting of which I am unaware. I think I could hack together a solution to my problem, but I suspect that there is a better way.
First some background. I'm using Visual Studio 2010 on Windows XP 64-bit (but compiling VXL for 32-bit). I downloaded VXL 1.14 and updated to CMake 2.8.3. With the CMake GUI I accepted the default configuration, and hit configure. Upon hitting configure for the second and third times, I get a large number of Windows error boxes (starting shortly after the "Looking for MFC - found" message appears) with the following information:
Title: Windows - No Disk
Message: Exception Processing Message c0000013 Parameters 7c7df5f8 96cfc118 7c7df5f8 7c7df5f8
Buttons: Cancel, Try Again, Continue
I can eventually continue past this stage, and generate the build files, which open successfully in Visual Studio 2010.
But when I build the vil project I get hundreds of warnings, such as:
.\..\..\v3p\zlib\gzio.c(106): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\string.h(105) : see declaration of 'strcpy'
..\..\..\v3p\tiff\tif_stream.cxx(62): warning C4244: 'return' : conversion from 'std::streamsize' to 'tsize_t', possible loss of data
..\..\..\v3p\geotiff\cpl_csv.c(139): warning C4996: 'stricmp': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _stricmp. See online help for details.
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\string.h(246) : see declaration of 'stricmp'
c:\mrepucci\c3vision\libs\vxl\core\vil\vil_rgb.h(80): warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
and eventually the error:
..\..\..\core\vil\vil_stream_url.cxx(234): error C2039: 'snprintf' : is not a member of 'std'
where line 234 reads:
vcl_snprintf(buffer, 4090, "GET /%s / HTTP/1.1\r\n", path.c_str());
So I tracked down the definition of vcl_snprintf to vcl/vcl_cstdio.h. Since I'm running Visual Studio 2010, I believe that VCL_VC_10 is defined, which means that vcl_snprintf doesn't get defined to _snprintf as it does for earlier versions of Visual Studio (see line 28), which means that it gets the default from vcl/generic/vcl_cstdio.h line 162 as vcl_generic_cstdio_STD :: snprintf, where vcl_generic_cstdio_STD is defined as std in vcl/iso/vcl_cstdio.h. And hence the error.
Now I'm tempted to just hack away and add VCL_VC_10 to line 28 of vcl/vcl_cstdio.h, but I can't be the only person running this type of system, so I'm guessing that there's a better solution. Any thoughts or suggestions?