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
Solved

_W64 Annotation

Posted on 2011-03-14
2
486 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:olmuser
  • 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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
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 viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

792 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