Visual Studio C++ 2010, problem build new version.

Isith
Member
 
Posts: 10
Joined: Wed Apr 04, 2012 19:14

Visual Studio C++ 2010, problem build new version.

by Isith » Wed Apr 04, 2012 19:17

Hello,
I have problem with build game using MS VS C++ 2010.
I got following errors :
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
content_cao.cpp(1089): error C2668: 'fabs' : ambiguous call to overloaded function
          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\math.h(565): could be 'long double fabs(long double)'
          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\math.h(517): or       'float fabs(float)'
          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\math.h(118): or       'double fabs(double)'
          while trying to match the argument list '(bool)'
content_cao.cpp(937): error C2668: 'fabs' : ambiguous call to overloaded function
          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\math.h(565): could be 'long double fabs(long double)'
          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\math.h(517): or       'float fabs(float)'
          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\math.h(118): or       'double fabs(double)'
          while trying to match the argument list '(bool)'

I building without openal, gettext.
Thanks for help ;)
 

Isith
Member
 
Posts: 10
Joined: Wed Apr 04, 2012 19:14

by Isith » Wed Apr 04, 2012 19:34

Okay, i've fixied it to chanage to "double", but i have new problem, my compiled game does not loading chunks.
Can anyone help me to fix it ?
Image
 

jn
Member
 
Posts: 106
Joined: Tue Jan 03, 2012 19:15

by jn » Thu Apr 05, 2012 01:56

I see three trees, some stone, and some dirt; what am I supposed to see?
 

Isith
Member
 
Posts: 10
Joined: Wed Apr 04, 2012 19:14

by Isith » Thu Apr 05, 2012 07:23

Game loading chunks but it are very slow like one chunk 5 minutes, digging block shows in debug after 2-3 min, is there any way to make it faster like Celeron builds ?
 

User avatar
bgsmithjr
Member
 
Posts: 436
Joined: Thu Mar 08, 2012 23:21

by bgsmithjr » Thu Apr 05, 2012 09:55

Sounds like a mod is lagging you.
 

Isith
Member
 
Posts: 10
Joined: Wed Apr 04, 2012 19:14

by Isith » Thu Apr 05, 2012 11:31

I downloaded VS Proffesional and compiled in it, can lagging this ? "if(double(m_prop.automatic_rotate > 0.001)){" I ve chanaged fabs to double but i cant build. Here is my recompiled with sound in VS Pro 2010, still lags.
DL : http://www.sendspace.com/file/8e83ep
Last edited by Isith on Thu Apr 05, 2012 11:31, edited 1 time in total.
 

jn
Member
 
Posts: 106
Joined: Tue Jan 03, 2012 19:15

by jn » Thu Apr 05, 2012 13:15

fabs is function, double is a type, please undo this change it doesn't make sense (sorry). And fabs(m_prop.automatic_rotate > 0.001) doesn't make much sense either: You check if m_prop.automatic_rotate is greater than 0.001, the result is a bool (a truth value, true or false), and then you try to cast this bool back into a floating point type, which should not make sense. You probably meant to write something like this (note the parentheses):
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
if(fabs(m_prop.automatic_rotate) > 0.001)

This line now checks whether m_prop.automatic_rotate is less than -0.001 or greater than 0.001.

(In this post "you" can refer to either you, Isith; the programmer who wrote the code we're taking about; or anyone else who's interested in this discussion. C++ is hard, it took me quite some time and at least one book to learn it)
 

Isith
Member
 
Posts: 10
Joined: Wed Apr 04, 2012 19:14

by Isith » Thu Apr 05, 2012 13:33

But if i undo this chanage, VS have errors in math.h.
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
content_cao.cpp(937): error C2668: 'fabs' : ambiguous call to overloaded function
          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\math.h(565): could be 'long double fabs(long double)'
          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\math.h(517): or       'float fabs(float)'
          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\math.h(118): or       'double fabs(double)'
          while trying to match the argument list '(bool)'
content_cao.cpp(1089): error C2668: 'fabs' : ambiguous call to overloaded function
          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\math.h(565): could be 'long double fabs(long double)'
          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\math.h(517): or       'float fabs(float)'
          C:\Program Files\Microsoft Visual Studio 10.0\VC\include\math.h(118): or       'double fabs(double)'
          while trying to match the argument list '(bool)'

And i can't fix it, only double helped to compile code.
Any fix for fabs in VS ?
Last edited by Isith on Thu Apr 05, 2012 13:33, edited 1 time in total.
 

jn
Member
 
Posts: 106
Joined: Tue Jan 03, 2012 19:15

by jn » Thu Apr 05, 2012 13:59

Where can I find the source code you're trying to compile?
 

Isith
Member
 
Posts: 10
Joined: Wed Apr 04, 2012 19:14

by Isith » Thu Apr 05, 2012 14:02

ZIP package from Github
 

jn
Member
 
Posts: 106
Joined: Tue Jan 03, 2012 19:15

by jn » Thu Apr 05, 2012 14:08

This problem should be fixed in a newer version, and there are pre-compiled packages on github now.
 

Isith
Member
 
Posts: 10
Joined: Wed Apr 04, 2012 19:14

by Isith » Sun Apr 08, 2012 08:49

Ok, now all build fine, but still is so slow, any fix ?
 

Isith
Member
 
Posts: 10
Joined: Wed Apr 04, 2012 19:14

by Isith » Mon Apr 09, 2012 10:45

 

User avatar
Jordach
Member
 
Posts: 4412
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach

by Jordach » Mon Apr 09, 2012 11:25

You have slow PC:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
12:43:58: INFO[ServerThread]: WARNING: active block modifiers took 2825ms (longer than 200ms)

( ͡° ͜ʖ ͡°) ( ͡o ͜ʖ ͡o) [$ ( ͡° ͜ʖ ͡°) $] ( ͡$ ͜ʖ ͡$) ヽ༼ຈل͜ຈ༽ノ



My image and media server is back online and is functioning as normal.
 

Isith
Member
 
Posts: 10
Joined: Wed Apr 04, 2012 19:14

by Isith » Mon Apr 09, 2012 11:35

But it's only on my build, Celeron builds works very fast.
What im doing wrong ?
 

User avatar
Jordach
Member
 
Posts: 4412
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach

by Jordach » Mon Apr 09, 2012 11:40

Nothing, it just could be something else, maybe a configuration with CMAKE, I've tried compiling and it is really slow, I just think celeron does his builds right, and, if you need latest Windows builds, ask Sfan5: http://minetest.net/forum/viewtopic.php?id=1523

( ͡° ͜ʖ ͡°) ( ͡o ͜ʖ ͡o) [$ ( ͡° ͜ʖ ͡°) $] ( ͡$ ͜ʖ ͡$) ヽ༼ຈل͜ຈ༽ノ



My image and media server is back online and is functioning as normal.
 

Isith
Member
 
Posts: 10
Joined: Wed Apr 04, 2012 19:14

by Isith » Mon Apr 09, 2012 11:54

Okay, thanks, i will try to build it with GCC on Linux.
 

User avatar
Jordach
Member
 
Posts: 4412
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach

by Jordach » Mon Apr 09, 2012 11:59

Use buildbot.sh remember to have these two files in the buildbot.sh directory openal_stripped.zip and mingwm.dll

Download them here: http://c55.me/~celeron55/random/2012-04/

( ͡° ͜ʖ ͡°) ( ͡o ͜ʖ ͡o) [$ ( ͡° ͜ʖ ͡°) $] ( ͡$ ͜ʖ ͡$) ヽ༼ຈل͜ຈ༽ノ



My image and media server is back online and is functioning as normal.
 


Return to Minetest Problems

Who is online

Users browsing this forum: No registered users and 54 guests

cron