About Monkey 2 › Forums › Monkey 2 Programming Help › Fatal error on build: Broken declaration in scope.
This topic contains 4 replies, has 3 voices, and was last updated by 
 Richard Betson
 2 years, 8 months ago.
- 
		AuthorPosts
 - 
		
			
				
July 29, 2016 at 6:24 am #2510
Hi
I’ve been on vacation so I thought I would see if this issue has come up. When building in either release or debug I get a fatal error. It looks like an issue with blend mode but I’m not sure. The source I’m using does build on Monkey2 1.0.0. Ideas?
This build attempt was done with Ted2 and Monkey2 v-1.0.2.
Monkey123456789101112131415161718192021mx2cc version 1.0.2***** Building app '/home/moonbasealpha/Programming/monkey2/phoenix/phoenixusc.monkey2' *****Parsing...Semanting...Translating...Compiling....Build error: System command 'g++ -std=c++11 -O0 -I"/home/moonbasealpha/Programming/monkey2-master/modules/freetype/freetype-2.6.3/include/" -I"/home/moonbasealpha/Programming/monkey2-master/modules/sdl2/SDL/include/" -I"/home/moonbasealpha/Programming/monkey2-master/modules/monkey/native" -c -o "/home/moonbasealpha/Programming/monkey2/phoenix/phoenixusc.buildv1.0.2/build_cache/desktop_debug_linux/phoenixusc_0phoenixwindow.cpp.o" "/home/moonbasealpha/Programming/monkey2/phoenix/phoenixusc.buildv1.0.2/build_cache/desktop_debug_linux/phoenixusc_phoenixwindow.cpp"' failed.g++ -std=c++11 -O0 -I"/home/moonbasealpha/Programming/monkey2-master/modules/freetype/freetype-2.6.3/include/" -I"/home/moonbasealpha/Programming/monkey2-master/modules/sdl2/SDL/include/" -I"/home/moonbasealpha/Programming/monkey2-master/modules/monkey/native" -c -o "/home/moonbasealpha/Programming/monkey2/phoenix/phoenixusc.buildv1.0.2/build_cache/desktop_debug_linux/phoenixusc_0phoenixwindow.cpp.o" "/home/moonbasealpha/Programming/monkey2/phoenix/phoenixusc.buildv1.0.2/build_cache/desktop_debug_linux/phoenixusc_phoenixwindow.cpp"In file included from /home/moonbasealpha/Programming/monkey2/phoenix/phoenixusc.buildv1.0.2/build_cache/desktop_debug_linux/phoenixusc_phoenixwindow.cpp:2:0:/home/moonbasealpha/Programming/monkey2/phoenix/phoenixusc.buildv1.0.2/build_cache/desktop_debug_linux/phoenixusc_phoenixwindow.h:118:60: error: t_mojo_graphics_BlendMode was not declared in this scopebbInt m__0window_0blend=bbInt(t_mojo_graphics_BlendMode(1));^***** Fatal mx2cc error *****Build error.August 1, 2016 at 7:21 am #2604Cause. You cant do:
Monkey12345Class TestField blend:Int=BlendMode.AlphaEnd ClassBefore it was converted to an integer.
August 1, 2016 at 1:37 pm #2632BendMode is an Enum. Do:
Monkey1Field blend:BlendMode=BlendMode.AlphaNot sure why putting it in an Int ever worked – it shouldn’t have.
Edit: actually, I’m wrong – the Implicit Type Conversions section in the help says putting it in an Int should work.
August 1, 2016 at 6:23 pm #2659Local blendMode:=BlendMode.Alpha *should* work – definitely a bug.
Can you post this in ‘issues’ at github Richard? Just copy and paste of the original post is fine.
August 1, 2016 at 11:44 pm #2671@Mark will do.
 - 
		AuthorPosts
 
You must be logged in to reply to this topic.