Scott
2008-12-22 19:34:01 UTC
I have broken this down to a very simple 3 line program. When I compile in 32
bit mode it compiles, switching to 64 bit I get the above error.
I am running on a Vista 64/Ultimate using VS2008. For this example I created
a console application:
#include <stdafx.h>
int _tmain(int argc, _TCHAR* argv[])
{
CONTEXT ctx;
DWORD dwEip = ctx.Eip;
return 0;
}
The stdafx looks like:
#pragma once
//#define _AMD64_
//#define _IA64_
#include <stdio.h>
#include <tchar.h>
#include <windows.h>
#include "targetver.h"
I have tried defining either _AMD64_ or _IA64_ with varying results.
If I use _AMD64_, which is appropriate for the computer I am on, I get the
above error.
Defining _IA64_ I get
error C3861: '__readgsqword': identifier not found
This is probably reasonable since I am on multiCore DELL box using an Intel
chip set.
Shouldn't the project just switch when I change my project type from Win32
to X64? What needs to be defined to get this to work correctly?
Looking at WinNT.h it seems that defining _AMD64_ should bring in the
correct version of _CONTEXT but it doesn't.
So how is this supposed to work? I have other programs that I have
converted from WIN32 to X64 without (major) issue.
bit mode it compiles, switching to 64 bit I get the above error.
I am running on a Vista 64/Ultimate using VS2008. For this example I created
a console application:
#include <stdafx.h>
int _tmain(int argc, _TCHAR* argv[])
{
CONTEXT ctx;
DWORD dwEip = ctx.Eip;
return 0;
}
The stdafx looks like:
#pragma once
//#define _AMD64_
//#define _IA64_
#include <stdio.h>
#include <tchar.h>
#include <windows.h>
#include "targetver.h"
I have tried defining either _AMD64_ or _IA64_ with varying results.
If I use _AMD64_, which is appropriate for the computer I am on, I get the
above error.
Defining _IA64_ I get
error C3861: '__readgsqword': identifier not found
This is probably reasonable since I am on multiCore DELL box using an Intel
chip set.
Shouldn't the project just switch when I change my project type from Win32
to X64? What needs to be defined to get this to work correctly?
Looking at WinNT.h it seems that defining _AMD64_ should bring in the
correct version of _CONTEXT but it doesn't.
So how is this supposed to work? I have other programs that I have
converted from WIN32 to X64 without (major) issue.
--
Scott Norberg
Scott Norberg