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

Compile on Ubuntu fails: Renderer_draw_gl.cpp #675

Open
cmcginty opened this issue Apr 30, 2017 · 6 comments
Open

Compile on Ubuntu fails: Renderer_draw_gl.cpp #675

cmcginty opened this issue Apr 30, 2017 · 6 comments

Comments

@cmcginty
Copy link

cmcginty commented Apr 30, 2017

home/panther/EmulationStation/es-core/src/Renderer_draw_gl.cpp:90:69: error: call of overloaded ‘round(float&)’ is ambiguous
   drawRect((int)round(x), (int)round(y), (int)round(w), (int)round(h), color, blend_sfactor, blend_dfactor);
                                                                     ^
@meatballz
Copy link

I get that one too. Ubuntu 17.04 64-bit.

@ghost
Copy link

ghost commented Jun 21, 2017

same here, ubuntu 17.04 64-bit, gcc 6.3.0

@ghost
Copy link

ghost commented Jun 21, 2017

It looks like this problem is fixed in #666. Look at the preprocessor guard they put around the prototype and definition of the function. Those guards are all you have to add to get it working.

@djnice
Copy link

djnice commented Jun 27, 2017

Please comment out the round function from /es-core/src/Util.cpp and /es-core/src/Util.h files, and will works on Ubuntu 17.04.

Util.h:
//float round(float num);

Util.cpp:
#if _MSC_VER < 1800
//float round(float num)
//{
// return (float)((int)(num + 0.5f));
//}
#endif

@ghost
Copy link

ghost commented Jun 27, 2017

@djnice, the reason it's not commented out is because it's required for certain Windows builds. it's not getting commented out, it won't need to be when the preprocessor expression is fixed.

@Funcron
Copy link

Funcron commented Feb 11, 2024

7 years later... getting the same error on Ubuntu 22, aarch64. commenting out the sections in util* seems to still work though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants