Horde3D http://horde3d.org/forums/ |
|
Beta3 _asm and MinGW http://horde3d.org/forums/viewtopic.php?f=2&t=679 |
Page 1 of 1 |
Author: | Pivot [ 28.03.2009, 11:46 ] |
Post subject: | Beta3 _asm and MinGW |
Hello, I trying to compile Horde beta3 with minGW and Code::Blocks but i have some error over here (beta2 works fine) : Code: _asm { CPUID }; D:\old\Horde3D\Source\Horde3DEngine\utTimer.h:61: error: `_asm' was not declared in this scope What I'm doing wrong? Thanks for help me |
Author: | phoenix64 [ 28.03.2009, 14:31 ] |
Post subject: | Re: Beta3 _asm and MinGW |
huh, shouldn't it be "asm volatile("cpuid");" with MinGW/GCC? EDIT: Of course with the appropriate ifdef around it, like Code: #ifdef _MSC_VER
_asm { CPUID }; #else asm volatile("cpuid"); #endif |
Author: | Pivot [ 28.03.2009, 15:37 ] |
Post subject: | Re: Beta3 _asm and MinGW |
Thanks it works but i have next error here Code: strncpy_s( _pipeSamplerBindings.back().sampler, 63, sampler.c_str(), len ); D:\old\Horde3D\Source\Horde3DEngine\egRenderer.cpp:1211: error: `strncpy_s' was not declared in this scope |
Author: | phoenix64 [ 28.03.2009, 16:38 ] |
Post subject: | Re: Beta3 _asm and MinGW |
huh. That looks like some really broken usage of that function. I mean, we are already checking for wrong size in the line before, aren't we? Anyways, look at Shared/utPlatform.h, line 53: Code: # define strncpy_s( dst, dstSize, src, count ) strncpy( dst, src, count < dstSize ? count : dstSize ) We need some code to use that in case _MSC_VER is not defined as well. |
Author: | marciano [ 30.03.2009, 00:16 ] |
Post subject: | Re: Beta3 _asm and MinGW |
The compiler defines for the Windows platform are very MSVC centric since we don't use any other compiler. But adapting the defines for MinGW should be very easy and not require many changes. |
Page 1 of 1 | All times are UTC + 1 hour |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |