Hi,

I confirm the problem:
Windows XP, mingw32 with gcc 4.5

And the message that I got was:

Building CXX object core/vul/CMakeFiles/vul.dir/vul_temp_filename.obj
D:\vxl\1.14.0_src\core\vul\vul_temp_filename.cxx: In function 'std::string vul_temp_filename()':
D:\vxl\1.14.0_src\core\vul\vul_temp_filename.cxx:87:29: error: '_tempnam' was not declared in this scope
mingw32-make[2]: *** [core/vul/CMakeFiles/vul.dir/vul_temp_filename.obj] Error 1
mingw32-make[1]: *** [core/vul/CMakeFiles/vul.dir/all] Error 2
mingw32-make: *** [all] Error 2

And I confirm as well that your proposed fix works for me :).

Your report helped me a lot ! Thanks,
Chris



De : Peng Liu <telecomliu@gmail.com>
À : vxl-users@lists.sourceforge.net
Envoyé le : Jeu 16 décembre 2010, 11h 52min 18s
Objet : [Vxl-users] problem when vxl building, and a possible solution

Hi, vxl

I met a problem when trying to build vxl with mingw32 4.5 on Windows.
The compiler reports that the "_tempnam" function is not declared in core/vul/vul_temp_filename.cxx.(I lost the exact error messages).

I added  #include <stdio.h> at LINE 16 of vul_temp_filename.cxx as

#if defined(VCL_VC) || defined(VCL_BORLAND) || defined(__MINGW32__)
  #include <Windows.h>
  #include <stdio.h>
#else
#if defined(unix) || defined(__unix) || defined(__unix__) || defined(__APPLE__)

It seems work well after that. All tests have been passed.

Don't know it is a bug or something else. But I wish this report may help.


Jason LIU