[LLVMdev] Undefined referenceto`llvm::sys::CopyFile(llvm::sys::Path const&, llvm::sys::P

Jeff Cohen jeffc at jolt-lang.org
Thu Dec 23 18:40:47 PST 2004


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

Jeff Cohen wrote:

> 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:
>
>> 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.
>>
>> On Thu, 2004-12-23 at 15:48, Henrik Bach wrote:
>>  
>>
>>> Hi Reid,
>>>
>>> The error still exists. However, looking on the function in 
>>> Win32/Path.cpp:
>>> --------------
>>> void
>>> sys::CopyFile(const sys::Path &Dest, const sys::Path &Src) {
>>>  if (!::CopyFile(Src.c_str(), Dest.c_str(), false))
>>>    ThrowError("Can't copy '" + Src.toString() +
>>>               "' to '" + Dest.toString() + "'");
>>> }
>>> --------------
>>>
>>> I notice, that the function is living in the sys namespace. 
>>> Shouldn't it live in the Path class instead? A copy-past to fast ;-)
>>>
>>>
>>> Henrik.
>>>
>>> _________________________________________________________________
>>> Log på MSN Messenger direkte fra nettet  http://webmessenger.msn.com/
>>>
>>> _______________________________________________
>>> LLVM Developers mailing list
>>> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
>>> http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev
>>>   
>>> ------------------------------------------------------------------------ 
>>>
>>>
>>> _______________________________________________
>>> LLVM Developers mailing list
>>> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
>>> http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev
>>>   
>>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev
>




More information about the llvm-dev mailing list