Good afternoon gentlemen, I am trying to build a 64 bit MFC application.
with Visual Studio 2003.
I succesfully did that. I installed the latest the Microsoft Plateform
SDK R2 in order to build my MFC application.

My problem is that the application does not link anymore when I change
the property of my application to use UNICODE character set. (I was also
able to build a Win32 Unicode project)


Is it possible to build an MFC application using Microsoft Visual Studio
2003 that support unicode? Do I have to explicitely link the mfc4.2
librairies?

I also noticed that the libraries are MFC version 42 for 64 bits? and
they look like they should support Unicode (MFC42U.LIB for example) or
am I wrong? What can I do with those mfc unicode librairies then?

Thank you to help me get out of the dark!

Simon

Re: Visual Studio .Net and 64 bit Unicode MFC Project by Tony

Tony
Wed May 10 16:47:10 CDT 2006

If that is the full size VS edition perhaps your 64 bit project relies on
specific libraries - check your Include Path in the Project Properties
somewhere, (I am a bit rusty, I think that is where it used to be?).

If however, your VS is the 'Express' edition, it does not support 64bit
projects, as far as I know.

Whatever is included should support whatever edition you have, but all
Include Paths may not be filled in as default. MS usually is quite good at
providing the info one needs, but you may have a lot of reading to do:

README files and release notes and stuff, and all the documentation that
is relevant to your project - it could be anywhere, but the info
is there somewhere.

If you didn't personalize your environment, but went with the default, the
Include Paths would be a likely cause, I'd say.

Tony. . .


"Simon Guertin" <sguertin@AtTrelliaNetworks.com> wrote in message
news:u2VfraFdGHA.1656@TK2MSFTNGP02.phx.gbl...
> Good afternoon gentlemen, I am trying to build a 64 bit MFC application.
> with Visual Studio 2003.
> I succesfully did that. I installed the latest the Microsoft Plateform SDK
> R2 in order to build my MFC application.
>
> My problem is that the application does not link anymore when I change the
> property of my application to use UNICODE character set. (I was also able
> to build a Win32 Unicode project)
>
>
> Is it possible to build an MFC application using Microsoft Visual Studio
> 2003 that support unicode? Do I have to explicitely link the mfc4.2
> librairies?
>
> I also noticed that the libraries are MFC version 42 for 64 bits? and they
> look like they should support Unicode (MFC42U.LIB for example) or am I
> wrong? What can I do with those mfc unicode librairies then?
>
> Thank you to help me get out of the dark!
>
> Simon



Re: Visual Studio .Net and 64 bit Unicode MFC Project by Homer

Homer
Thu May 11 08:18:17 CDT 2006

What, exactly, is the linker error you're getting?



Re: Visual Studio .Net and 64 bit Unicode MFC Project by Simon

Simon
Thu May 11 08:53:20 CDT 2006

Thank you for responding,
Homer J. Simpson wrote:
> What, exactly, is the linker error you're getting?
>
>
Here is my error.
ChildFrm.obj : error LNK2001: unresolved external symbol "public:
virtual int __cdecl CMDIChildWnd::Create(wchar_t const *,wchar_t const
*,unsigned long,struct tagRECT const &,class CMDIFrameWnd *,struct
CCreateContext *)"
(?Create@CMDIChildWnd@@UEAAHPEB_W0KAEBUtagRECT@@PEAVCMDIFrameWnd@@PEAUCCreateContext@@@Z)


Take note that prior to this error I was building the same project
succesfully (actually it is just an empty SDI MFC project generated by
the Wizard)
Then I just change in the project property to use UNICODE character set
and then the linker has problems.

As you can see, the parameters for Create() are wchar_t's
Before launching VS Studio .NET I selected the XP x64 Retail environment
because I need my app to run on WIndows XP 64 bit.

Just for the record, I installed Visual Studio 2005 with the x64
platform and I did the same exercise and it worked perfectly.
I also renamed the MFC42U.lib from the paletform sdk R2 to make sure the
linker was actually linking with this librairy and it effectively, the
linker complained that it was missing.

Thank you again!

Re: Visual Studio .Net and 64 bit Unicode MFC Project by Simon

Simon
Thu May 11 12:47:22 CDT 2006

I also noticed that the projects are OK for MultiBytes Characters set
and also when it is not set.
Simon Guertin wrote:
> Thank you for responding,
> Homer J. Simpson wrote:
>
>> What, exactly, is the linker error you're getting?
>>
>>
> Here is my error.
> ChildFrm.obj : error LNK2001: unresolved external symbol "public:
> virtual int __cdecl CMDIChildWnd::Create(wchar_t const *,wchar_t const
> *,unsigned long,struct tagRECT const &,class CMDIFrameWnd *,struct
> CCreateContext *)"
> (?Create@CMDIChildWnd@@UEAAHPEB_W0KAEBUtagRECT@@PEAVCMDIFrameWnd@@PEAUCCreateContext@@@Z)
>
>
>
> Take note that prior to this error I was building the same project
> succesfully (actually it is just an empty SDI MFC project generated by
> the Wizard)
> Then I just change in the project property to use UNICODE character set
> and then the linker has problems.
>
> As you can see, the parameters for Create() are wchar_t's
> Before launching VS Studio .NET I selected the XP x64 Retail environment
> because I need my app to run on WIndows XP 64 bit.
>
> Just for the record, I installed Visual Studio 2005 with the x64
> platform and I did the same exercise and it worked perfectly.
> I also renamed the MFC42U.lib from the paletform sdk R2 to make sure the
> linker was actually linking with this librairy and it effectively, the
> linker complained that it was missing.
>
> Thank you again!

Re: Visual Studio .Net and 64 bit Unicode MFC Project by Simon

Simon
Tue May 16 08:59:45 CDT 2006

For those interrested, I found what was causing my error:
it was the LANGUAGE property in the C/C++ tab of my project, I turned it
to NO.

TREAT wchar_t as built in type = NO!!!

have a good week!
Simon Guertin wrote:
> I also noticed that the projects are OK for MultiBytes Characters set
> and also when it is not set.
> Simon Guertin wrote:
>
>> Thank you for responding,
>> Homer J. Simpson wrote:
>>
>>> What, exactly, is the linker error you're getting?
>>>
>>>
>> Here is my error.
>> ChildFrm.obj : error LNK2001: unresolved external symbol "public:
>> virtual int __cdecl CMDIChildWnd::Create(wchar_t const *,wchar_t const
>> *,unsigned long,struct tagRECT const &,class CMDIFrameWnd *,struct
>> CCreateContext *)"
>> (?Create@CMDIChildWnd@@UEAAHPEB_W0KAEBUtagRECT@@PEAVCMDIFrameWnd@@PEAUCCreateContext@@@Z)
>>
>>
>>
>> Take note that prior to this error I was building the same project
>> succesfully (actually it is just an empty SDI MFC project generated by
>> the Wizard)
>> Then I just change in the project property to use UNICODE character
>> set and then the linker has problems.
>>
>> As you can see, the parameters for Create() are wchar_t's
>> Before launching VS Studio .NET I selected the XP x64 Retail
>> environment because I need my app to run on WIndows XP 64 bit.
>>
>> Just for the record, I installed Visual Studio 2005 with the x64
>> platform and I did the same exercise and it worked perfectly.
>> I also renamed the MFC42U.lib from the paletform sdk R2 to make sure
>> the linker was actually linking with this librairy and it effectively,
>> the linker complained that it was missing.
>>
>> Thank you again!