Jump to content
  • Advertisement
Sign in to follow this  
supagu

sqrtf not being defined!!!!

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

If you intended to correct an error in the post then please contact us.

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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!