Visual Studio .Net and 64 bit Unicode MFC Project

Discussion in 'Windows 64bit' started by Simon Guertin, May 10, 2006.

  1. 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
    Simon Guertin, May 10, 2006
    #1
    1. Advertising

  2. 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" <> wrote in message
    news:...
    > 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
    Tony Sperling, May 10, 2006
    #2
    1. Advertising

  3. What, exactly, is the linker error you're getting?
    Homer J. Simpson, May 11, 2006
    #3
  4. 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!
    Simon Guertin, May 11, 2006
    #4
  5. 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!
    Simon Guertin, May 11, 2006
    #5
  6. 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!
    Simon Guertin, May 16, 2006
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ¢harlie
    Replies:
    0
    Views:
    616
    ¢harlie
    Dec 26, 2003
  2. Jimmy Dean
    Replies:
    3
    Views:
    1,038
    Duane Arnold
    Jul 25, 2005
  3. =?Utf-8?B?VmlqYXk=?=

    Should I write Visual studio 2005 or Visual studio 2003 MCSD

    =?Utf-8?B?VmlqYXk=?=, Jun 29, 2006, in forum: Microsoft Certification
    Replies:
    14
    Views:
    1,025
    Simon Hart
    Jun 30, 2006
  4. Soumya
    Replies:
    5
    Views:
    1,322
  5. TJ
    Replies:
    1
    Views:
    336
    =-Zero@HK-=ASP.Net / VB
    Sep 23, 2005
Loading...

Share This Page