Solved

_W64 Annotation

Posted on 2011-03-14
2
496 Views
Last Modified: 2012-05-11

I am compiling a open source library using Embarcadero RAD studio.

The library builds OK under VS2010. So I am keeping all the include/library paths the same as what is used in the VS2010 project.

The following are the VC++ Directories used in VS2010 as part of the project properties.

Executable Directories
Include Directories
Reference Directories
Library Directories
Source Directories
Exclude Directories

Out of the above I am only syncing Include and Library directories.

The directories refenced in the include section are:

$(VCInstallDir)include;
$(VCInstallDir)atlmfc\include;
$(WindowsSdkDir)include;
$(FrameworkSDKDir)\include;

I am not using atlmfc and .Net Framework. So I am just using VC include and SDK include. Similar set-up for library directories too.

Since I have included the SDK folder in the include path I was not expecting an error with the line below

typedef _W64 unsigned int   uintptr_t;

And yet when the build the library Embarcadero C++ builder throws the error below:

[BCC32 Error] vadefs.h(48): E2257 , expected

The file refered above I beleive is pulled into my build as an external dependency.

So my questions are, is _W64 a typedef? Where is it defined?

Why is my build giving the error above? Is there another include location I need to include to fix this error?
0
Comment
Question by:Mydeen Yussouf
[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
  • 2
2 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 250 total points
ID: 35132898
Well, it is more like a helper and it is defined as '__w64' in BaseTsd.h' when building a 32 bit project:

 
#if !defined(_W64)
#if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300
#define _W64 __w64
#else
#define _W64
#endif
#endif

Open in new window


Regarding '__w64', see http://msdn.microsoft.com/en-us/library/s04b5w00%28v=VS.100%29.aspx

"(Microsoft Specific) Lets you mark variables, such that when you compile with /Wp64 the compiler will report any warnings that would be reported if you were compiling with a 64-bit compiler."

So you can basically get rid of that by adding

#define _W64

before including any headers.
0
 
LVL 86

Expert Comment

by:jkr
ID: 35148931
Anything still unclear?
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
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 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 learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

695 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