Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MinGW and O3 #300

Closed
Lectem opened this issue Jan 13, 2015 · 5 comments
Closed

MinGW and O3 #300

Lectem opened this issue Jan 13, 2015 · 5 comments

Comments

@Lectem
Copy link

Lectem commented Jan 13, 2015

I'm having problems compiling a project under MinGW 32 (gcc 4.8.1).
If compiling with option -O3 or -O2, I get this error :

c:\mingw\include\math.h: In function 'float hypotf(float, float)':
c:\mingw\include\math.h:635:30: error: '_hypot' was not declared in this scope
{ return (float)(_hypot (x, y)); }

No problem when I use only #include with -O3

@Kaitto
Copy link

Kaitto commented Feb 9, 2015

Hi!, i had the same problem... well a few minutes ago.
i don't know if is the real solution, but i've changed that '_hypot' by 'hypot' and compiled without warnings. you can confirm this?, just replace that line.

@Groovounet
Copy link
Member

Hi,

How do you reproduce this issue?
GLM never uses directly hypotf or _hypot so when you are changing _hypot by hypot this is only updating GCC headers which can't be the right fix.

Thanks,
Christophe

@Lectem
Copy link
Author

Lectem commented Feb 9, 2015

Hi,
Sorry but I forgot to report the fact that it is actually a bug coming from MinGW, see https://ehc.ac/p/mingw/bugs/2250/
A workaround mentioned there is to use -D__NO_INLINE__ to the compiler options.

@Kaitto
Copy link

Kaitto commented Feb 12, 2015

yes is a bug from MinGW, am not using GLM but i found that is the same
error when it tries to inline some maths functions (that uses internal
hypot)... And because I WANT to inline what is suposed to be, i changed
that header (isn't the right fix, but works).

2015-02-09 20:49 GMT-03:00 Lectem notifications@github.com:

Hi,
Sorry but I forgot to report the fact that it is actually a bug coming
from MinGW, see https://ehc.ac/p/mingw/bugs/2250/
A workaround mentioned there is to use -D__NO_INLINE__ to the compiler
options.

Reply to this email directly or view it on GitHub
#300 (comment).

@Groovounet
Copy link
Member

This is a GCC issues with no apparent workaround on GLM side. Use -D__NO_INLINE__ or edit math.h as a workaround. Closing.

Thanks,
Christophe

zebastian added a commit to zebastian/mandelbulber2 that referenced this issue Mar 19, 2016
make with mingw not working, more info here: g-truc/glm#300
trying ms visual studio make instead -> nmake
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants