Visual Studio .Net and 64 bit Unicode MFC Project

Discussion in 'Windows 64 Bit' 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

    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 Guertin, May 10, 2006
    1. Advertisements

  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. . .
    Tony Sperling, May 10, 2006
    1. Advertisements

  3. What, exactly, is the linker error you're getting?
    Homer J. Simpson, May 11, 2006
  4. Thank you for responding,
    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 *)"
    ([email protected]@@[email protected]@[email protected]@[email protected]@@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. I also noticed that the projects are OK for MultiBytes Characters set
    and also when it is not set.
    Simon Guertin, May 11, 2006
  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, May 16, 2006
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.