Undefined reference to `llvm::sys::CopyFile(llvm::sys::Path const&, llvm::sys::P

Hi,

Can anyone tell me why CopyFile is the only undefined reference from Path.cpp?

Get the latest version. I committed a fix to Path.cpp last night. It
wasn't being defined in the sys:: namespace which is why its undefined.

Reid.

Hi Reid,

Get the latest version. I committed a fix to Path.cpp last night. It
wasn't being defined in the sys:: namespace which is why its undefined.

It didn't do any better by removing the old debug files, getting the latest version and reconfiguration of the build. No diffs of Path.cpp and gccld.cpp against top of mainline were were found.

Henrik.

Its version 1.27 of lib/System/Unix/Path.cpp for Cygwin
and version 1.22 of lib/System/Win32/Path.cpp for Win32

Please note that 1.22 of Win32/Path.cpp was *just* committed. I fixed
the Unix side, but not the Win32 side until just now. Sorry about that.
Promise to get better about this soon (more machines to test on).

Reid.

Hi Reid,

The error still exists. However, looking on the function in Win32/Path.cpp:

Hi Reid,

Looking closer at the build process, I find that Path.cpp doesn't get compiled, even if it is a newer version than its *.o file. That's probaly the reason the error still exists. I'm to tired to think, but I'll look closer at it tomorrow.

Merry Christmas
Henrik.

----Original Message Follows----

No, although its declared in the Path.h file, its actually not in the
Path class. Have a look. Not sure why you're still seeing that problem.
The same change to Unix/Path.cpp fixed the same problem on Cygwin and
Linux.

Reid.

But breaks VC++.

The problem is, Windows.h defines "CopyFile" as a macro that's either "CopyFileA" or "CopyFileW". Path.h is included before Windows.h, so the declaration has the name "CopyFile" while the definition has "CopyFileA". Instant compilation error.

Not sure what the best way to fix it is, but I'll check it in as soon as I figure it out.

Reid Spencer wrote:

Fix committed. And I hope mingw doesn't have a problem with it.

Jeff Cohen wrote: