ppwwyyxx / OpenPano

Automatic Panorama Stitching From Scratch
MIT License
1.85k stars 552 forks source link

fdup: Undeclared identifier #113

Open little-by opened 3 years ago

little-by commented 3 years ago

My problem: I compile the code in the win10 using vs2015. First, I compile and install the eigen3.

When I compile the openpano, I get the error, “'.serialize' must have class/struct/union D:\Libs\PCL\flann\include\flann\util\serialization.h”. Then I fix this by adding the following code in include/flann/util/serialization.h.

ifdef _MSC_VER

BASIC_TYPE_SERIALIZER(unsigned __int64);

endif

But I get the error, “fdup: Undeclared identifier” How can I deal with it? I can't find useful information on the Internet.

preethamam commented 3 years ago

Same problem, did you find any solution on Windows 10?

shivarajmd commented 3 years ago

Since using MSVC I commented the line as shown below and was able to build it.

ifdef _MSC_VER

std::tr2::sys::path _fbase(file); auto fbase = _fbase.stem().c_str();

else

char fdup = strdup(file); char fbase = basename(fdup);

endif

c_fprintf(colormap[line].c_str(), stderr, "[%s@%s:%d] ", func, fbase, line); //free(fbase);