Bug 261423 - math.h missing in kdeedu/kalgebra/analitzagui/graph2d.cpp
Summary: math.h missing in kdeedu/kalgebra/analitzagui/graph2d.cpp
Status: RESOLVED FIXED
Alias: None
Product: kalgebra
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources macOS
: NOR normal
Target Milestone: ---
Assignee: Aleix Pol
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-28 03:43 UTC by Jeremy Lavergne
Modified: 2011-01-03 03:14 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Lavergne 2010-12-28 03:43:14 UTC
Version:           unspecified (using KDE 4.5.90) 
OS:                OS X

isinf and isnan are undefined on the mac without math.h included

Reproducible: Always

Steps to Reproduce:
attempt to build on the mac

Actual Results:  
build fails, functions are undefined

/opt/local/var/macports/build/_Users_aeetes_kde_kdeedu4/work/kdeedu-4.5.90/kalgebra/analitzagui/graph2d.cpp: In member function 'void Graph2D::drawFunctions(QPaintDevice*)':
/opt/local/var/macports/build/_Users_aeetes_kde_kdeedu4/work/kdeedu-4.5.90/kalgebra/analitzagui/graph2d.cpp:245

Expected Results:  
successful build

Looks like isinf and isnan are defined in math.h:
http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man3/isinf.3.html
Comment 1 Jeremy Lavergne 2010-12-28 03:52:15 UTC
Hmm, adding math.h to the .cpp and .h files doesn't seem to have impacted the compilation. It might be more than simply adding the include, or perhaps I've not added it correctly.
Comment 2 Aleix Pol 2010-12-28 13:52:02 UTC
cmath is already included, that's not the problem.

Can you check if std:: is missing?
Comment 3 Jeremy Lavergne 2010-12-28 19:08:31 UTC
Yes, adding std:: allowed compilation. I used the lazy `using namespace std` method.
Comment 4 Aleix Pol 2011-01-03 03:14:07 UTC
SVN commit 1211066 by apol:

Use namespace std:: to compile graph2d. apparently makes it compile in MacOS X.
/me wonders why it works on his system :/...

BUG: 261423


 M  +2 -0      graph2d.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1211066