I successfully compiled mandelbulber on win7 using Code::Block
Now i'm trying with VS2010 C++ Express
Here come troubles, of course
I'm a newbie with VStudio stuff
The first problem was 'M_PI' : undeclared identifier"
Easily solved by adding #define _USE_MATH_DEFINES before every include of math.h
A thread on microsoft connect suggest : to define _USE_MATH_DEFINES in ProjectProperties/C++/Preprocessor but i didn't tried.
Additionally : some warning about performance problem, unsafe function, nothing big.
Anyway... that was, by far, the easiest problem.
The first error :
settings.cpp(455): fatal error C1061: compiler limit : blocks nested too deeply
from msdn : Nesting of code blocks exceeds the limit of 128 nesting levels. Simplify nesting.
i simply remplaced the 127th "else if" with a "if", no more "deep nesting" (i didn't knew that a lot of "else if" were "nested blocks" ...)
Next problem :
1>image.cpp(529): error C2057: expected constant expression
1>image.cpp(529): error C2466: cannot allocate an array of constant size 0
1>image.cpp(529): error C2133: 'Thread' : unknown size
1>image.cpp(530): error C2057: expected constant expression
1>image.cpp(530): error C2466: cannot allocate an array of constant size 0
1>image.cpp(530): error C2133: 'err' : unknown size
1>image.cpp(532): error C2057: expected constant expression
1>image.cpp(532): error C2466: cannot allocate an array of constant size 0
1>image.cpp(532): error C2133: 'thread_param' : unknown size
There exact error is : int NR_THREADS Error: expression must have a constant value
As a workaround, i defined int const NR_THREADS = 2;
and removed : NR_THREADS = get_cpu_count();
But i don't have a good solution
1>Render3D.cpp(936): error C3861: 'chdir': identifier not found
remplaced by _chdir and included direct.h
i also had to remove unistd.h (don't exist on windows)
1>image.cpp(372): error C2668: 'sqrt' : ambiguous call to overloaded function
There are two pow/sqrt functions, one that takes a float and returns a float, and one that takes a double and returns a double.
So i modified the program that way : double r = sqrt(double(dx * dx + dy * dy));
Now it compile... but doesn't link, with tons of undefined reference to gtk stuff. probably just a project setting problem (hopefully)
There is a lot of win32 coder here.
Can someone help me to solve all thoses problems in a clean way ? (so buddy could include all the modifications in the original software and still keep it multiplatform)
thank you