Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7084603
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:19:21+00:00 2026-05-28T07:19:21+00:00

I am facing strange problem. I am compiling a MFC application(VS 2008) which uses

  • 0

I am facing strange problem.

I am compiling a MFC application(VS 2008) which uses static library MyLib.lib.it is compiling fine in debug mode.
but in Debug Unicode it is showing error.I am using Debug Unicode version of MyLib.lib in MFC application.

Main.obj : error LNK2019: unresolved external symbol "void * __cdecl  VCI_Open_Device(wchar_t *)" (?VCI_Open_Device@@YAPAXPA_W@Z) referenced in function _wmain    


VCIHANDLE 
VCI_Open_Device             (   TCHAR *ptszDevicePath   
                                );

Here I notice in MFC App that in debug mode TCHAR is typedef char TCHAR, which is correct but in Debug Unicode mode TCHAR should be typedef WCHAR TCHAR but here also it showing typedef char TCHAR.
I checked in WebCam.lib Project TCHAR is typedef WCHAR TCHAR in Debug Unicode mode which correct.

I guess it is problem with some setting in the Debug Unicode mode in MFC app mode.
Please help resolve this issue.
#ifdef UNICODE // r_winnt

#ifndef _TCHAR_DEFINED
typedef WCHAR TCHAR, *PTCHAR;
typedef WCHAR TBYTE , *PTBYTE ;
#define _TCHAR_DEFINED
#endif /* !_TCHAR_DEFINED */

typedef LPWCH LPTCH, PTCH;
typedef LPCWCH LPCTCH, PCTCH;
typedef LPWSTR PTSTR, LPTSTR;
typedef LPCWSTR PCTSTR, LPCTSTR;
typedef LPUWSTR PUTSTR, LPUTSTR;
typedef LPCUWSTR PCUTSTR, LPCUTSTR;    
typedef LPWSTR LP;
typedef PZZWSTR PZZTSTR;
typedef PCZZWSTR PCZZTSTR;
typedef PUZZWSTR PUZZTSTR;
 typedef PCUZZWSTR PCUZZTSTR;
typedef PNZWCH PNZTCH;
typedef PCNZWCH PCNZTCH;
typedef PUNZWCH PUNZTCH;
typedef PCUNZWCH PCUNZTCH;
#define __TEXT(quote) L##quote      // r_winnt

#else   /* UNICODE */               // r_winnt

#ifndef _TCHAR_DEFINED
typedef char TCHAR, *PTCHAR;
typedef unsigned char TBYTE , *PTBYTE ;
#define _TCHAR_DEFINED
#endif /* !_TCHAR_DEFINED */

typedef LPCH LPTCH, PTCH;
typedef LPCCH LPCTCH, PCTCH;
typedef LPSTR PTSTR, LPTSTR, PUTSTR, LPUTSTR;
typedef LPCSTR PCTSTR, LPCTSTR, PCUTSTR, LPCUTSTR;
typedef PZZSTR PZZTSTR, PUZZTSTR;
typedef PCZZSTR PCZZTSTR, PCUZZTSTR;
typedef PNZCH PNZTCH, PUNZTCH;
typedef PCNZCH PCNZTCH, PCUNZTCH;
#define __TEXT(quote) quote         // r_winnt

#endif /* UNICODE */             

Here when I do right click on TCHAR it is not going in UNICODE part.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T07:19:22+00:00Added an answer on May 28, 2026 at 7:19 am

    Make sure all your stuff is built with the same tchar treatment. Go to Project/Propeties/C-C++/Language/Treat w_chart as Built in Type and check if it is set to the same value for your library/ies as well for the application. The default setting is No (/Zc:wchar_t-)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am facing a strange problem with AVAudioRecorder. In my application i need to
I'm currently facing a strange problem in PHP. I have two scripts, index.php which
I'm facing a kind of strange problem and don't know in which direction to
I'm facing a strange problem when deploying my application to the production server. I've
I am facing quite strange problem. Application ~80.Mb Testing on simulator using Allocations Instrument,
I am facing a strange problem. My app works fine in 2.1 (emulator +
I am facing a strange problem while running my application. I have a class
i am facing strange problem i deployed a webservice in EC2 which is up
I am facing a strange problem. I created an apk of my application with
I am facing a strange problem regarding Hooking. I have a procedure which acts

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.