Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
November 21, 2024, 09:59:53 pm
News:
If you can't login, please
contact us
with your username and e-mail so we can fix it.
Home
Help
Search
Calendar
Login
Register
OpenXcom Forum
»
Contributions
»
Programming
»
Fixed build error with r146
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: Fixed build error with r146 (Read 6566 times)
sir_nacnud
Captain
Posts: 54
Fixed build error with r146
«
on:
September 29, 2010, 03:04:50 am »
MovingTarget.cpp needed cmath included for sqrt(). Attached patch fixes this.
I noticed you had defined PI yourself in a couple of places in the code. There is a define for PI in cmath, called M_PI. Just a heads up in case you didn't know about it.
Logged
SupSuper
Lazy Developer
Administrator
Commander
Posts: 2162
Re: Fixed build error with r146
«
Reply #1 on:
September 29, 2010, 01:26:09 pm »
M_PI is not standard and I don't think it's included in VC++.
Logged
SupSuper
Lazy Developer
Administrator
Commander
Posts: 2162
Re: Fixed build error with r146
«
Reply #2 on:
September 29, 2010, 10:10:43 pm »
Fixed, apparently I needed to add:
#define _USE_MATH_DEFINES
So I just replaced one define with another, but consistency and all that.
Logged
sir_nacnud
Captain
Posts: 54
Re: Fixed build error with r146
«
Reply #3 on:
September 30, 2010, 02:06:10 am »
Why not make _USE_MATH_DEFINES a compiler define so you don't have to define it each time you want to use M_PI?
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
OpenXcom Forum
»
Contributions
»
Programming
»
Fixed build error with r146