Code Monkey home page Code Monkey logo

Comments (10)

aleks-f avatar aleks-f commented on March 28, 2024

copysign* is C99/C++ TR1, apparently still not in std namespace with gcc 4.7. Remove std:: in front of it and see if it helps. If you provide a patch, we'll test and include it for future releases.

from poco.

davidraleigh avatar davidraleigh commented on March 28, 2024

I just removed the std from in front of copysign and copysignf and it fixed my gcc compile problem for iOS.

from poco.

aleks-f avatar aleks-f commented on March 28, 2024

please post a patch here, or send pull request

from poco.

davidraleigh avatar davidraleigh commented on March 28, 2024

pull request submitted.

from poco.

aleks-f avatar aleks-f commented on March 28, 2024

merged in to develop for next release:

a867fb8

Will leave this issue open for better visibility.

from poco.

 avatar commented on March 28, 2024

Digging a little deeper, there are several options to fix this:

  • Removing the "std" in front of "copysign" indeed fixes the issue for iOS and Android, but only for "copysign" definition. For the others (isinf, isnan, etc.) removing "std" fixes the build for Android, but breaks it for iOS ... I don't really know how to manage this...
  • On a side note, it seems that removing the "-DPOCO_NO_FPENVIRONMENT" from the Android build configuration (in build/config/Android) fix the compilation issue. However, it seems that it's intentionally disabled so I don't know if it's a viable option.

Any insights would be appreciated :)

Thanks,
BQ.

PS: The submitted patch only fixes the iOS build. Android one is still broken.

from poco.

aleks-f avatar aleks-f commented on March 28, 2024

The best permanent solution is probably our usual way to deal with this kind of problem: separate .h/.cpp files.

from poco.

 avatar commented on March 28, 2024

I can surely give it a try. What would you suggest for naming ?

FPEnvironment_ANDROID and FPEnvironment_IOS ?

from poco.

aleks-f avatar aleks-f commented on March 28, 2024

That will work. FPEnvironment_DUMMY should remain as is now (all in std:: except copysign*).

from poco.

 avatar commented on March 28, 2024

End of the discussion here : #62

from poco.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.