# 1.10.0 WIP4 compilation problems

This topic is 4993 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

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.

##### Share on other sites
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.

##### Share on other sites
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.

##### Share on other sites
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:

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.

##### Share on other sites
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.

##### Share on other sites
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.

• 48
• 12
• 10
• 10
• 9
• ### Forum Statistics

• Total Topics
631374
• Total Posts
2999661
×