Author Topic: Error compiling just for Debug Mode  (Read 1039 times)

Offline Stu_C

  • Mc. Print
  • *
  • Posts: 34
    • View Profile
    • OvineByDesign
Error compiling just for Debug Mode
« on: 2009-Aug-15 »

I have a project that compiles fine as long as you dont compile as debug.

The compiler returns with

Code: GLBasic [Select]
error: expected constructor, destructor, or type conversion before '(' token
 

and the offending line is the ON_DEBUG ( 1, 109 );

Code: GLBasic [Select]
#undef __GLBNO__
#define __GLBNO__ 110

#undef __GLBNO__
#define __GLBNO__ 110
ON_DEBUG ( 1, 109 );

#undef __GLBNO__
#define __GLBNO__ 111

#undef __GLBNO__
#define __GLBNO__ 111
// auto-mid handle mode (T/F).

#undef __GLBNO__
#define __GLBNO__ 112

#undef __GLBNO__
#define __GLBNO__ 112
//.
 

any idea to why this is happening ?



Also a little niggle, once you have selected to view the gpc_temp file, then recompile,  the gpc_temp is not reloaded back in.




Offline Stu_C

  • Mc. Print
  • *
  • Posts: 34
    • View Profile
    • OvineByDesign
Re: Error compiling just for Debug Mode
« Reply #1 on: 2009-Aug-15 »

Bit more investigation and it appears the offending line was setting a var inside a type as an RGB() value.  Think I read somewhere that you cant have deault values defaulting to a function ? in which case case solved.


Code: GLBasic [Select]
type dummy
        color=  RGB(255,255,255)
end type
 


Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10697
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: Error compiling just for Debug Mode
« Reply #2 on: 2009-Aug-17 »
oh dear. I'll have a look.