1.10.0 WIP4 compilation problems
If i compile w/ the asm vm i get an error such that it states that it cannot convert overloaded-function to void*. The problem function is the work_around_fmod pointer.
i use .NET 2003 compiler.
Thanks for letting me know. I'll try to find a better way to call the function from the assembler code.
If you could tell me how to fix it with the .NET 2003 compiler I would be grateful.
If you could tell me how to fix it with the .NET 2003 compiler I would be grateful.
my best estimation would be to call it w/ c++ code.
I am not at all familiar enough with assembly to suggest a more intelligent solution.
I am not at all familiar enough with assembly to suggest a more intelligent solution.
I had this problem, all I did was to tell the compiler which version of fmod I needed. So in the as_context_86.cpp file, change the declaration to this:
This works with VC++ 2005 Express, so should work with the VC++ 2003?
BTW, in that file you include <math.h> and <stddef.h>. I believe the C++ standard is to include <cmath> <cstddef>. That was just in that file, there may be others.
static double (*double_fmod)(double, double) = fmod; //Create pointer to overloaded fmod functionstatic void *work_around_fmod = (void*)double_fmod;
This works with VC++ 2005 Express, so should work with the VC++ 2003?
BTW, in that file you include <math.h> and <stddef.h>. I believe the C++ standard is to include <cmath> <cstddef>. That was just in that file, there may be others.
Thanks, that makes sense. Though it is probably easier to do it like this:
static void *work_around_fmod = (double (*)(double, double))fmod;
Yeah, I know about the header files. I haven't gotten into the habit of including the C++ headers, as the old C headers works just as well.
static void *work_around_fmod = (double (*)(double, double))fmod;
Yeah, I know about the header files. I haven't gotten into the habit of including the C++ headers, as the old C headers works just as well.
yeah, this is what i added and it worked now.
static double double_fmod(double &a, double &b)
{
return fmod(a, b);
}
// Take the address of these functions, as MSVC6++ can't resolve
// them in inline assembler with full optimizations turned on
static void *work_around_memcpy = (void*)memcpy;
static void *work_around_fmod = (void*)double_fmod;
That seems to work for me.
static double double_fmod(double &a, double &b)
{
return fmod(a, b);
}
// Take the address of these functions, as MSVC6++ can't resolve
// them in inline assembler with full optimizations turned on
static void *work_around_memcpy = (void*)memcpy;
static void *work_around_fmod = (void*)double_fmod;
That seems to work for me.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement