ppwwyyxx / OpenPano

Automatic Panorama Stitching From Scratch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fdup: Undeclared identifier

little-by opened this issue · comments

commented

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.

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

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);