Re: some headers seems to conflict the others by Alexander
Alexander
Sat Sep 23 08:16:03 CDT 2006
This happens if some of your files are compiled with MFC, and some without.
"golnar" <golnar_19@yahoo.com> wrote in message
news:1159005548.483139.63100@h48g2000cwc.googlegroups.com...
> Though I agree that it's most probably another problem but I insist it
> is a result of these includings and compiler commands. And though this
> is progress comparing to the previous stage, it is not comparing to
> time the program was working. anyway, the problem is unsolved because I
> don't know how to solve this new problem. Of course all these doesn't
> lessen the value of your explanation, advice and concern.
>
> Regards
>
>
> John Carson wrote:
>> "golnar" <golnar_19@yahoo.com> wrote in message
>> news:1158997549.936970.120720@b28g2000cwb.googlegroups.com
>> > about what Fred said currentpath is a String * so the syntax is ok and
>> > about what you said I understood why I am receiving something about
>> > GetCurrentDirectoryA but even by trying #undef GetCurrentDirectory I
>> > couldn't solve the problem. after inserting #undef GetCurrentDirectory
>> > I got the link errors:"error LNK2005: "void * __cdecl operator
>> > new(unsigned int)" (??2@YAPAXI@Z) already defined in
>> > libcpmtd.lib(newop.obj)
>> > " and "error LNK2005: "void __cdecl operator delete(void *)"
>> > (??3@YAXPAX@Z) already defined in LIBCMTD.lib(dbgdel.obj)".
>>
>>
>> In other words,
>>
>> #undef GetCurrentDirectory
>>
>> solved the problem, but you had another unrelated problem. That is
>> progress.
>> You got to the link stage, which means your compilation was
>> successful ---
>> which it wasn't before.
>>
>> The error message is saying that new and delete have been defined twice.
>> You
>> are only allowed to define any operator or function once. If you haven't
>> defined new and delete yourself, then this probably means that you have
>> linked to two different libraries, each of which uses a different
>> definition
>> of new and delete.
>>
>> --
>> John Carson
>