473,386 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Suggestion about Bug Fixing of "error C2371: 'WCHAR' : redefinition; different basic types"

Hi,

i am developing an application which uses WAB API's, for doing all
this i am using vs2k5. I have wab.h header file included in my project
to use WAB api's but after compilation one error comes like

Error 1 error C2371: 'WCHAR' : redefinition; different basic types c:
\program files\microsoft visual studio 8\vc\platformsdk\include
\wabdefs.h 78

The error occurs on the following statement, because of redefinition
of 'WCHAR'

#if !defined(UNIX) && !defined(WIN16)
typedef WORD WCHAR;
#endif

but i know the solution of this problem. it solves by changing project
setting of "Treat wchar_t as Built-in Type" value "No (/Zc:wchar_t-)".
But I am using "Xtreme Toolkit Professional Edition" for making good
look & Feel of an application, when i fix the above problem by
changing project settings a new linking errors come from Xtreme
Toolkit Library. So what i do to fix this problem, in project setting
"Treat wchar_t as Built-in Type" value "yes" and i wrote following
statements where i included wab.h header file.

#define WIN16
#include "wab.h"
#undef WIN16

and after that my project is working fine and all the things related
to WAB is also working fine. any one guide me, is that the right way
to solve this problem??? and, will this have any effect on the rest of
project??

Regards,

-aims

Feb 14 '07 #1
2 9975
but i know the solution of this problem. it solves by changing project
setting of "Treat wchar_t as Built-in Type" value "No (/Zc:wchar_t-)".
But I am using "Xtreme Toolkit Professional Edition" for making good
look & Feel of an application, when i fix the above problem by
changing project settings a new linking errors come from Xtreme
Toolkit Library. So what i do to fix this problem, in project setting
"Treat wchar_t as Built-in Type" value "yes" and i wrote following
statements where i included wab.h header file.
You can change that setting on a per-codefile basis so that only specific
files are compiled with that particular setting.
If you can solve your problems that way it would be the cleanest solution.
>
#define WIN16
#include "wab.h"
#undef WIN16

and after that my project is working fine and all the things related
to WAB is also working fine. any one guide me, is that the right way
to solve this problem??? and, will this have any effect on the rest of
project??
I wouldn't worry about it. whatever the definition, it is a 16 bit variable
in both cases.
I agree that it isn't the best looking solution, but it should work IF WIN16
has no other impact inside the wab.h file.
--

Kind regards,
Bruno van Dooren
br**********************@hotmail.com
Remove only "_nos_pam"
Feb 14 '07 #2
Thanks Bruno!

regards,

-aims

On Feb 14, 5:27 pm, "Bruno van Dooren [MVP VC++]"
<bruno_nos_pam_van_doo...@hotmail.comwrote:
but i know the solution of this problem. it solves by changing project
setting of "Treat wchar_t as Built-in Type" value "No (/Zc:wchar_t-)".
But I am using "Xtreme Toolkit Professional Edition" for making good
look & Feel of an application, when i fix the above problem by
changing project settings a new linking errors come from Xtreme
Toolkit Library. So what i do to fix this problem, in project setting
"Treat wchar_t as Built-in Type" value "yes" and i wrote following
statements where i included wab.h header file.

You can change that setting on a per-codefile basis so that only specific
files are compiled with that particular setting.
If you can solve your problems that way it would be the cleanest solution.
#define WIN16
#include "wab.h"
#undef WIN16
and after that my project is working fine and all the things related
to WAB is also working fine. any one guide me, is that the right way
to solve this problem??? and, will this have any effect on the rest of
project??

I wouldn't worry about it. whatever the definition, it is a 16 bit variable
in both cases.
I agree that it isn't the best looking solution, but it should work IF WIN16
has no other impact inside the wab.h file.

--

Kind regards,
Bruno van Dooren
bruno_nos_pam_van_doo...@hotmail.com
Remove only "_nos_pam"

Feb 16 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Petr Prikryl | last post by:
Hi, Summary: In my opinion, the C-like prefix increment and decrement operators (++i and --i) should be marked as "syntax error". Current situation: try... (Python 2.4 (#60, ...)) >>> i =...
9
by: Wally | last post by:
I am trying to display images from an Access 2000 database and I get an error "Invalid Parameter Used" when I execute the code line "picBLOB.Image = Image.FromStream(stmBLOBData)" in my Visual...
2
by: Chuck Martin | last post by:
I am having a most frustrating problem that references, web searches, and other resources are no help so far in solving. Basically, I'm trying to design a pop-up window to be called with a funciton...
1
by: gerr | last post by:
Visual studio 2003 "HTTP/1.1 500 Internal Server Error" when trying to create a new Asp.net site with Visual Studio 2003 on localServer XP Pro/IIS 5.1. Everything worked fine prior to installing...
2
by: Florian G. Pflug | last post by:
Hi Since sometime yesterday, my postgresql (7.4.5) reports "ERROR: cannot compare arrays of different element types", when I analyze a specific table in my database. Here is the tables...
0
by: Jonathan | last post by:
Hi Everyone, I have a problem which I've been able to reproduce with a nice and small test ASP.NET web application. The page sets the window.onbeforeunload event so that we will get an Ok/Cancel...
4
by: JackBlack | last post by:
Hi, all! Need a little help tracking down a runtime error problem. I'm getting this error: "Unable to cast object of type 'myStruct' to type 'myStruct'... but the two types are identical! I...
11
by: kimiraikkonen | last post by:
Hello, I'm very new to C# and just installed VC# 2005 express edition and i have VB 2005 express installed previously. But i saw a thing which may be called as a "Visual C# 2005 express" bug? ...
1
by: =?ISO-8859-1?Q?Lasse_V=E5gs=E6ther_Karlsen?= | last post by:
I get the above error in some of the ASP.NET web applications on a server, and I need some help figuring out how to deal with it. This is a rather long post, and I hope I have enough details that...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.