Error with Vector3 and Matrix types in Xbox360 with BulletX

Dec 3, 2007 at 7:45 PM
Hi, I ported the code on my engine to work on Xbox360 but I keep getting these errors about the Vector3 (gravity) and Matrix types not being referenced and that I need to add a reference to them in my project, but these types are included in XNA framework, as we all know, so, obviously, I have added them references to my project.

I wonder, what is wrong? It used to work well in Vista...
Dec 4, 2007 at 3:43 PM
This is most likely because you converted your own project but not the BulletX project. Xbox and PC use two different versions of the libraries, so you cannot reference windows xna libraries from xbox projects and vice versa. To convert a project from PC to xbox, you can do the following:

  • Copy the .csproj file in the same directory. Name the copy "Xbox360Game1.csproj".
  • Open Xbox360Game1.csproj in an editor.
  • Change the ProjectGuid value to a new GUID (use GuidGen.exe). This uniquely identifies the project in the solution, so it needs to be different.
  • Everywhere you see "x86", change it to "Xbox 360", except for PlatformTarget, which should remain x86. (Search and replace will work fine, and you can fix PlatformTarget afterward.)
  • Change <XnaPlatform>Windows</XnaPlatform> to <XnaPlatform>Xbox 360</XnaPlatform>
  • Save the file, and close it.
  • Open the original solution in VC# Express.
  • Right-click on the solution node, and select Add -> Existing Project... and choose Xbox360Game1.csproj.
  • Open Project Properties Fore each XBOX project and make these changes under the build tab:
    • Add XBOX;XBOX360 to conditional compilation symbols
    • set output path to bin\Xbox 360\Debug\ (xbox projects won't deploy unless you use the project wizard's default bin path)

I got this working last night. Performance is shaky on the xbox though. My game runs about 30fps on PC and 6 on the box.
Dec 12, 2007 at 4:27 AM

Sugarious wrote:
This is most likely because you converted your own project but not the BulletX project. Xbox and PC use two different versions of the libraries, so you cannot reference windows xna libraries from xbox projects and vice versa. To convert a project from PC to xbox, you can do the following:

thanks a lot. I assume it shall be done to BulletX's project, so I'll have to download the source code and add it, as you said, to my whole solution. 3 projects under one solution: my demo, my engine and my BulletX (made to compile for Xbox360 using your modifications).

Maybe even compile it outside the solution, then reference the Xbox360 compatible .DLLs.
Dec 21, 2007 at 4:12 AM
yep, now it works flawlessly! thanks a lot! :DDD