Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1204
  • Last Modified:

how do I install unicode libraries with Visual Studio 6.0?

I need to create unicode configurations and didn't install it first time through installing visual studio 6.0. I put the Disc 1 of Visual Studio 6.0 in and tried to modify the configuration, but I see no way to add unicode libraries. What am I missing?

thanks!
0
PMH4514
Asked:
PMH4514
  • 5
  • 3
  • 2
  • +1
1 Solution
 
AxterCommented:
Hi PMH4514,
> I need to create unicode configurations and didn't install it first
> time through installing visual studio 6.0. I put the Disc 1 of Visual
> Studio 6.0 in and tried to modify the configuration, but I see no way
> to add unicode libraries. What am I missing?

I don't believe you're missing anything.  The Unicode library should install by default.
You probably just need to change the property settings of your project.
Change your project to UNICODE via project property settings, and it should then using unicode library.

David Maisonave (Axter)
Cheers!
0
 
AlexFMCommented:
Run Visual Studio Installation, select Add - Remove components. In the components dialog you need to select Unicode libraries. The simplest way is to hightlight C++ line and click "Select all". Or open C++ components, then MFC libraries (I don't remember exactly, you can find this), and then select MFC Libraries for Unicode.
0
 
PMH4514Author Commented:
David - all comments I have read in past threads here on EE say that the unicode libraries are NOT installed by default, that they have to be manually installed. Which is what led me to put the visual studio installation discs in.  Setup then searches for installed components, I click Add/Remove.

Alex - I clicked Select All, and I clicked on Change Option for all that are listed, but I don't see anything like "MFC Libraries for Unicode" - regardless I did select all and let it run it's install. I'm still getting these compile errors on my project:

error C2664: 'wcscpy' : cannot convert parameter 2 from 'char [2]' to 'const unsigned short *'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast

- the errors in a 3rd party API source. The vendor tells me these errors are because I'm not compiling with UNICODE enabled.

I created new configurations, using existing configurations as the source to copy, and  replaced _MBCS with _UNICODE but nothing seems to change.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
AlexFMCommented:
This is not because Unicode libraries are missing. This is compilation error.
You made some mistake converting MBCS configuration to Unicode. Unfortunately, I don't have VC++ 6.0 installed, wait for somebody who can tell exact instructions.
0
 
PMH4514Author Commented:
>>You made some mistake converting MBCS configuration to Unicode.

by "converting" are you referring to my changes in the project link properties or something with code itself? I have not attempted any code changes.

I went to Build->Configurations and clicked  Add

I made a new name UnicodeDebug and copied the settings from the existing Win32 Debug configuration.

I then followed the directions from, well, it was your post actually, found here (accepted answer):

http://www.experts-exchange.com/Programming/Programming_Languages/Cplusplus/Q_20987805.html?query=install+unicode+visual+studio&clearTAFilter=true

That is the extend of what I have done thus far.
0
 
cupCommented:
Try something simple first

1) Create a new hello world console application
2) Edit project settings - Under C++/General, change _MBCS to _UNICODE
3) Change the content of the main program to
#include "stdafx.h"
#include <tchar.h>
int main(int argc, TCHAR* argv[])
{
      _tprintf(_T("Hello World! %d\n"), sizeof (TCHAR));
      return 0;
}

4) Run the program.  You should get

Hello World! 2

If that works, compare it with what you have and see what is different.
0
 
PMH4514Author Commented:
It worked, but it returned "Hello World! 1"  instead of '2'

0
 
PMH4514Author Commented:
whoops, I tested the app after making the release build, hadn't changed to _UNICODE on the release config.. This did return "Hello World! 2"

So what then does this tell me? Ok, I must have the libraries installed, but it is 3rd party code that is not compiling, and they are telling me that this is because I must not have them installed.. ??
0
 
cupCommented:
1) Your VS libraries are installed OK
2) If you have the source for the 3rd party, clear out all the objects, set _UNICODE and rebuild
3) If you do not have the source for the 3rd party they should provide you with both a MBCS and Unicode source.  Look for codes like libraries ending with D for debug and U for unicode.
0
 
PMH4514Author Commented:
hmm.. well a brand new project set UNICODE and including the 3rd party header w/ nothing else compiles.. no idea why linking in the same modules and including the same headers in my acutal project would produce all those compiler errors, but it must be something relating to my  project configuration.. .no idea what though.
0
 
cupCommented:
1) You have to set _UNICODE: not UNICODE.  It has to have a leading underscore and it should be con the command line: not #defined somewhere.
2) The project is probably consistent within itself.  If they use declarations like TCHAR and routines like _tcscpy, they will build with both MBCS and UNICODE.  If however, they have two variants of each routine which are pointed to by macros, then there will only be one libarary.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 5
  • 3
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now