Blitzbat Posted December 13, 2009 Share Posted December 13, 2009 hi there, I'm getting every time I call leadwerks functions a BadImageFormatException. What is wrong ?! Here is the code: Leadwerks.Graphics.Initialize(800, 600); World w = new World(); while (!Leadwerks.Keyboard.KeyHit(Key.Escape)) { World.Update(1); World.Render(EntityType.All); Leadwerks.Graphics.Flip(1); } thank you Quote Link to comment Share on other sites More sharing options...
macklebee Posted December 13, 2009 Share Posted December 13, 2009 hi there, I'm getting every time I call leadwerks functions a BadImageFormatException. What is wrong ?! Here is the code: Leadwerks.Graphics.Initialize(800, 600); World w = new World(); while (!Leadwerks.Keyboard.KeyHit(Key.Escape)) { World.Update(1); World.Render(EntityType.All); Leadwerks.Graphics.Flip(1); } thank you I am probably wrong since i dont do any C#/C/C++/C--/C!&%%% programming, but wouldn't it be: w.Update(1); w.Render(EntityType.All); assuming that nothing else essential is missing from this code... Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
Blitzbat Posted December 13, 2009 Author Share Posted December 13, 2009 oh sorry i've forgotten to write where it happens it will fail on the Leadwerks.Graphics.Initialize(800, 600); command... It fails on every command i execute. Quote Link to comment Share on other sites More sharing options...
Blitzbat Posted December 13, 2009 Author Share Posted December 13, 2009 Just found the problem.... It's because i have windows 7 64bit and the c# compiler does not recognize that it's a 32bit assembly. I have to set the target plattform to 32 bit and it works Quote Link to comment Share on other sites More sharing options...
macklebee Posted December 13, 2009 Share Posted December 13, 2009 cool. Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
Niosop Posted December 13, 2009 Share Posted December 13, 2009 Ahh, thanks Blitzbat, I hadn't thought of that. Quote Windows 7 x64 - Q6700 @ 2.66GHz - 4GB RAM - 8800 GTX ZBrush - Blender Link to comment Share on other sites More sharing options...
L B Posted December 13, 2009 Share Posted December 13, 2009 I don't have a 64-bit OS so I can't compile it this way for you guys. If anyone has and is interested in re-compiling, contact me. Quote Link to comment Share on other sites More sharing options...
Blitzbat Posted December 13, 2009 Author Share Posted December 13, 2009 I don't have a 64-bit OS so I can't compile it this way for you guys. If anyone has and is interested in re-compiling, contact me. So, then give us the source . Quote Link to comment Share on other sites More sharing options...
TylerH Posted December 14, 2009 Share Posted December 14, 2009 C# is known to have an issue when compiler settings are set to Any CPU. You have to compile to either x86 or x64, though since Leadwerks is 32-bit native, it is best to just compile using x86, since you can't really gain anything from x64 using a x86 engine. Quote nVidia 530M Intel Core i7 - 2.3Ghz 8GB DDR3 RAM Windows 7 Ultimate (64x)----- Visual Studio 2010 Ultimate Google Chrome Creative Suite 5 FL Studio 10 Office 15 ----- Expert Professional Expert BMX Programmer ----- Link to comment Share on other sites More sharing options...
Blitzbat Posted December 14, 2009 Author Share Posted December 14, 2009 C# is known to have an issue when compiler settings are set to Any CPU. You have to compile to either x86 or x64, though since Leadwerks is 32-bit native, it is best to just compile using x86, since you can't really gain anything from x64 using a x86 engine. yes, that's right! But an 64 bit version of leadwerks were great! Quote Link to comment Share on other sites More sharing options...
Blitzbat Posted December 14, 2009 Author Share Posted December 14, 2009 C# is known to have an issue when compiler settings are set to Any CPU. You have to compile to either x86 or x64, though since Leadwerks is 32-bit native, it is best to just compile using x86, since you can't really gain anything from x64 using a x86 engine. huh?! 3 times? Quote Link to comment Share on other sites More sharing options...
Blitzbat Posted December 14, 2009 Author Share Posted December 14, 2009 C# is known to have an issue when compiler settings are set to Any CPU. You have to compile to either x86 or x64, though since Leadwerks is 32-bit native, it is best to just compile using x86, since you can't really gain anything from x64 using a x86 engine. yes, that's right! But an 64 bit version of leadwerks were great! Quote Link to comment Share on other sites More sharing options...
Blitzbat Posted December 14, 2009 Author Share Posted December 14, 2009 C# is known to have an issue when compiler settings are set to Any CPU. You have to compile to either x86 or x64, though since Leadwerks is 32-bit native, it is best to just compile using x86, since you can't really gain anything from x64 using a x86 engine. yes, that's right! But a 64 bit version of leadwerks were great! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.