printf after main and SYS_SystemHandle not recognized anymor

Compiling, libraries, modules, coding guidelines and porting

Moderators: jesterKing, stiv

Post Reply
modelAnimator
Posts: 0
Joined: Thu Feb 11, 2010 7:12 pm

printf after main and SYS_SystemHandle not recognized anymor

Post by modelAnimator » Fri Feb 12, 2010 5:58 am

Hye.
Aftercopiling succesfully in VS2008,i added a simple printf :
int main(int argc, char **argv)
{
printf( "Starting BLENDER.. ");
SYS_SystemHandle syshandle;

and got compiling error :
error C2275: 'SYS_SystemHandle'


:?:

modelAnimator
Posts: 0
Joined: Thu Feb 11, 2010 7:12 pm

no more compiling error when moving line !

Post by modelAnimator » Fri Feb 12, 2010 10:08 am

I move the printf line two lines under, and it works :D
Why :?:

bjornmose
Posts: 0
Joined: Tue Nov 25, 2003 5:27 pm
Location: Denzenberg, could walk to Hölderling-Tower
Contact:

Re: no more compiling error when moving line !

Post by bjornmose » Wed Feb 17, 2010 1:41 pm

modelAnimator wrote:I move the printf line two lines under, and it works :D
Why :?:
In .C files all variable declarations must be at the beginning of the scope.
In .CPP files variable declarations are allowed on the fly.

Post Reply