Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

how do I install unicode libraries with Visual Studio 6.0?

Posted on 2006-11-27
11
Medium Priority
?
1,180 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Industry Leaders: 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!

 
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 200 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

Tech or Treat! - Giveaway

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

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

IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
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…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

618 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