Solved

how do I install unicode libraries with Visual Studio 6.0?

Posted on 2006-11-27
11
1,063 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
 
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…

760 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now