Spent hours on this and I think I need help, so I’ve condensed the problem to its shortest size possible for this post. Basically, I have three files, as shown below:
---------- main.cpp
#include <d3dx9.h>
#include "dx.h"
int main(int argc, char *argv[])
{
return 0;
}
---------- test.cu
#include <d3dx9.h>
#include "dx.h"
---------- dx.h
#pragma once
class TestDX {
public:
int i;
MSG msg;
};
If I exclude the .cu file from the project, it compiles perfectly. However, with the test.cu file in, it won’t compile since for some reason, CUDA won’t allow me to #include <d3dx9.h>. I get the cryptic error: 1>z:\zmain_dan\code_libs\directx_june2010\include\d3dx9math.h(416) : error C2059: syntax error : ‘’
… in the “d3dx9math.h” file on this line:
typedef D3DX_ALIGN16 _D3DXMATRIXA16 D3DXMATRIXA16, *LPD3DXMATRIXA16;
So can we find some way of getting CUDA to be friends with d3dx9.h/d3dx9math.h (perhaps by upgrading to the latest CUDA?)…?