Solved

how do I install unicode libraries with Visual Studio 6.0?

Posted on 2006-11-27
11
1,092 Views
Last Modified: 2013-12-14
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
Comment
Question by:PMH4514
  • 5
  • 3
  • 2
  • +1
11 Comments
 
LVL 30

Expert Comment

by:Axter
ID: 18021635
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
 
LVL 48

Expert Comment

by:AlexFM
ID: 18021726
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
 

Author Comment

by:PMH4514
ID: 18021827
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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 48

Expert Comment

by:AlexFM
ID: 18021939
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
 

Author Comment

by:PMH4514
ID: 18022021
>>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
 
LVL 11

Expert Comment

by:cup
ID: 18051996
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
 

Author Comment

by:PMH4514
ID: 18053596
It worked, but it returned "Hello World! 1"  instead of '2'

0
 

Author Comment

by:PMH4514
ID: 18053645
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
 
LVL 11

Accepted Solution

by:
cup earned 50 total points
ID: 18056564
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
 

Author Comment

by:PMH4514
ID: 18056801
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
 
LVL 11

Expert Comment

by:cup
ID: 18058773
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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question