Sign in to follow this  
supagu

sqrtf not being defined!!!!

Recommended Posts

okay i have a problem where i've included math.h but sqrtf is not defined! #include <math.h> #ifndef sqrtf #error "sqrtf has not yet been defined" #endif #include some header here that requires sqrtf so whien i do a build, i get the error hit in visual studio 2005. I suspect this may have something to do with x64 build (_M_AMD64 is defined)?

Share this post


Link to post
Share on other sites
Why are you expecting the symbol to be #defined? A function is not a preprocessor definition.

Σnigma

Share this post


Link to post
Share on other sites
sqrtf is a function, not a macro. Besides, why doesn't the header that requires sqrtf just include math.h itself?

EDIT: You are using C++, right? sqrt is only a macro if you're using plain C.

Share this post


Link to post
Share on other sites
oh, probably because ive sometimes used #undef <function>.

Any way, my problem is i have a directx header file that uses sqrtf, but when i go to compile, says sqrtf doesnt exist

"error C3861: 'sqrtf': identifier not found"

Share this post


Link to post
Share on other sites
all fixed, dont know what the problem was, i made a copy of the directory (project) moved it else where and it works fine

[Edited by - supagu on June 11, 2006 8:43:34 AM]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this