FlasCC (Flash Compiling) with SDL2.0, any luck compiling?

I use MingW for my PC builds… but I recently stumbled across with this
compiler from Adobe to make flash games from C/C++ code (FlasCC) …

They said it runs with Cygwin , but it has a custom GCC v4 that is
recognized as unknown-unknown-freebsd8.2 …
FlasCC comes with SDL 1.2 , but I wanted to use SDL2… I tried my libs and
got linker error, my first thought was to compile to Cygwin but I got
linker errors too…

I’m compiling now with the GCC’s from FlasCC but I can’t get any video lib
to work (nor DirectX nor OpenGL) , I’ll try Cross Compiling
to unknown-unknown-freebsd8.2 (fingers crossed) , but if anyone has any
experience with this compiler , I’d really appreciate any advise!–

https://www.facebook.com/abraaocsantana https://twitter.com/abraaocsantana
http://br.linkedin.com/in/abraaocsantana

Abra?o C. de Santana
CEO @ Skywatch

abraao.c.santana
Mobile : +55 (21) 9307-9868

I use MingW for my PC builds… but I recently stumbled across with this
compiler from Adobe to make flash games from C/C++ code (FlasCC) …

They said it runs with Cygwin , but it has a custom GCC v4 that is
recognized as unknown-unknown-freebsd8.2 …
FlasCC comes with SDL 1.2 , but I wanted to use SDL2… I tried my libs and
got linker error, my first thought was to compile to Cygwin but I got
linker errors too…

I’m compiling now with the GCC’s from FlasCC but I can’t get any video lib
to work (nor DirectX nor OpenGL) , I’ll try Cross Compiling
to unknown-unknown-freebsd8.2 (fingers crossed) , but if anyone has any
experience with this compiler , I’d really appreciate any advise!–

https://www.facebook.com/abraaocsantana https://twitter.com/abraaocsantana
http://br.linkedin.com/in/abraaocsantana

Abra?o C. de Santana
CEO @ Skywatch

abraao.c.santana
Mobile : +55 (21) 9307-9868

My understanding is that FlasCC is just a GCC toolchain that targets the
Flash Runtime as a platform. It doesn’t actually have native support for
OpenGL or ES, but they offer an abstraction layer called GLS3D to
"translate" C GL calls to the stumpy subset of capabilities in Adobe’s
Stage3D. (they’ve also hijacked the “inline asm” mechanism to inject
ActionScript instead, which is nice)

The copy of SDL 1.2 included in the FlasCC SDK looks identical to the
mainline; it uses the libVGL backend (not in SDL2 alas) for graphics and
input handling.

Adobe have included a handful of example projects ported with FlasCC and
GLS3D - https://github.com/alexmac/alcexamples - you might want to have a
go at building them just to make sure the toolchain is sound. They go into
detail here about the changes required for porting Neverball to the new
platform -
http://www.adobe.com/devnet/games/articles/compiling-opengl-games.htmlOn 13 February 2013 08:38, Abra?o Caldas de Santana < abraao at skywatchgames.com> wrote:

I use MingW for my PC builds… but I recently stumbled across with this
compiler from Adobe to make flash games from C/C++ code (FlasCC) …

They said it runs with Cygwin , but it has a custom GCC v4 that is
recognized as unknown-unknown-freebsd8.2 …
FlasCC comes with SDL 1.2 , but I wanted to use SDL2… I tried my libs
and got linker error, my first thought was to compile to Cygwin but I got
linker errors too…

I’m compiling now with the GCC’s from FlasCC but I can’t get any video
lib to work (nor DirectX nor OpenGL) , I’ll try Cross Compiling
to unknown-unknown-freebsd8.2 (fingers crossed) , but if anyone has any
experience with this compiler , I’d really appreciate any advise!

https://www.facebook.com/abraaocsantana https://twitter.com/abraaocsantana
http://br.linkedin.com/in/abraaocsantana

Abra?o C. de Santana
CEO @ Skywatch

abraao.c.santana
Mobile : +55 (21) 9307-9868


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

hmm… I’m ahead at a small game developing company… A programmer here
was responsible for researching this but he traveled.
I was following what he said he noticed about the tool, but it seems it’s
not as simple as he thought it would be. Conversion to acceptable code for
FlasCC is going to be tricky.

Strange think is that i can’t make any static lib built by any means
compatible with FlasCC’s toolchain. I get linker problems with every one of
the libs I use.

By the way, thanks for the quick answer , Scott!

2013/2/13 Scott Percival > My understanding is that FlasCC is just a GCC toolchain that targets the

Flash Runtime as a platform. It doesn’t actually have native support for
OpenGL or ES, but they offer an abstraction layer called GLS3D to
"translate" C GL calls to the stumpy subset of capabilities in Adobe’s
Stage3D. (they’ve also hijacked the “inline asm” mechanism to inject
ActionScript instead, which is nice)

The copy of SDL 1.2 included in the FlasCC SDK looks identical to the
mainline; it uses the libVGL backend (not in SDL2 alas) for graphics and
input handling.

Adobe have included a handful of example projects ported with FlasCC and
GLS3D - https://github.com/alexmac/alcexamples - you might want to have a
go at building them just to make sure the toolchain is sound. They go into
detail here about the changes required for porting Neverball to the new
platform -
http://www.adobe.com/devnet/games/articles/compiling-opengl-games.html

On 13 February 2013 08:38, Abra?o Caldas de Santana < @Abraao_Caldas_de_San> wrote:

I use MingW for my PC builds… but I recently stumbled across with this
compiler from Adobe to make flash games from C/C++ code (FlasCC) …

They said it runs with Cygwin , but it has a custom GCC v4 that is
recognized as unknown-unknown-freebsd8.2 …
FlasCC comes with SDL 1.2 , but I wanted to use SDL2… I tried my libs
and got linker error, my first thought was to compile to Cygwin but I got
linker errors too…

I’m compiling now with the GCC’s from FlasCC but I can’t get any video
lib to work (nor DirectX nor OpenGL) , I’ll try Cross Compiling
to unknown-unknown-freebsd8.2 (fingers crossed) , but if anyone has any
experience with this compiler , I’d really appreciate any advise!

https://www.facebook.com/abraaocsantana https://twitter.com/abraaocsantana
http://br.linkedin.com/in/abraaocsantana

Abra?o C. de Santana
CEO @ Skywatch

abraao.c.santana
Mobile : +55 (21) 9307-9868


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

https://www.facebook.com/abraaocsantana https://twitter.com/abraaocsantana
http://br.linkedin.com/in/abraaocsantana

Abra?o C. de Santana
CEO @ Skywatch

abraao.c.santana
Mobile : +55 (21) 9307-9868

Does “by any means” include building the library with the FlasCC toolchain?
Regular x86-built libraries won’t cut it, as FlasCC would expect all the
object files to be native to the platform (in this case, whatever
horrifying bytecode is used by the Flash runtime), so naturally you’ll have
to build the static libraries with FlasCC to use them.On 13 February 2013 14:37, Abra?o Caldas de Santana < abraao at skywatchgames.com> wrote:

hmm… I’m ahead at a small game developing company… A programmer here
was responsible for researching this but he traveled.
I was following what he said he noticed about the tool, but it seems it’s
not as simple as he thought it would be. Conversion to acceptable code for
FlasCC is going to be tricky.

Strange think is that i can’t make any static lib built by any means
compatible with FlasCC’s toolchain. I get linker problems with every one of
the libs I use.

By the way, thanks for the quick answer , Scott!

2013/2/13 Scott Percival <@Scott_Percival>

My understanding is that FlasCC is just a GCC toolchain that targets the
Flash Runtime as a platform. It doesn’t actually have native support for
OpenGL or ES, but they offer an abstraction layer called GLS3D to
"translate" C GL calls to the stumpy subset of capabilities in Adobe’s
Stage3D. (they’ve also hijacked the “inline asm” mechanism to inject
ActionScript instead, which is nice)

The copy of SDL 1.2 included in the FlasCC SDK looks identical to the
mainline; it uses the libVGL backend (not in SDL2 alas) for graphics and
input handling.

Adobe have included a handful of example projects ported with FlasCC and
GLS3D - https://github.com/alexmac/alcexamples - you might want to have
a go at building them just to make sure the toolchain is sound. They go
into detail here about the changes required for porting Neverball to the
new platform -
http://www.adobe.com/devnet/games/articles/compiling-opengl-games.html

On 13 February 2013 08:38, Abra?o Caldas de Santana < abraao at skywatchgames.com> wrote:

I use MingW for my PC builds… but I recently stumbled across with this
compiler from Adobe to make flash games from C/C++ code (FlasCC) …

They said it runs with Cygwin , but it has a custom GCC v4 that is
recognized as unknown-unknown-freebsd8.2 …
FlasCC comes with SDL 1.2 , but I wanted to use SDL2… I tried my libs
and got linker error, my first thought was to compile to Cygwin but I got
linker errors too…

I’m compiling now with the GCC’s from FlasCC but I can’t get any video
lib to work (nor DirectX nor OpenGL) , I’ll try Cross Compiling
to unknown-unknown-freebsd8.2 (fingers crossed) , but if anyone has any
experience with this compiler , I’d really appreciate any advise!

https://www.facebook.com/abraaocsantana https://twitter.com/abraaocsantana
http://br.linkedin.com/in/abraaocsantana

Abra?o C. de Santana
CEO @ Skywatch

abraao.c.santana
Mobile : +55 (21) 9307-9868


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

https://www.facebook.com/abraaocsantana https://twitter.com/abraaocsantana
http://br.linkedin.com/in/abraaocsantana

Abra?o C. de Santana
CEO @ Skywatch

abraao.c.santana
Mobile : +55 (21) 9307-9868


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Yeah. Includes FlasCC toolchain…I also tried other LLVM-based toolchains
targeting some freeBSD architectures (when I lost the hope on FlasCC’s).

I’ll try now some other libs with FlasCC toolchain just to be sure I’m not
doing anything wrong with mine.–
Abra?o C. de Santana

Sent from my Motorola RAZR
Em 14/02/2013 13:02, “Scott Percival” escreveu:

Does “by any means” include building the library with the FlasCC
toolchain? Regular x86-built libraries won’t cut it, as FlasCC would expect
all the object files to be native to the platform (in this case, whatever
horrifying bytecode is used by the Flash runtime), so naturally you’ll have
to build the static libraries with FlasCC to use them.

On 13 February 2013 14:37, Abra?o Caldas de Santana < @Abraao_Caldas_de_San> wrote:

hmm… I’m ahead at a small game developing company… A programmer here
was responsible for researching this but he traveled.
I was following what he said he noticed about the tool, but it seems it’s
not as simple as he thought it would be. Conversion to acceptable code for
FlasCC is going to be tricky.

Strange think is that i can’t make any static lib built by any means
compatible with FlasCC’s toolchain. I get linker problems with every one of
the libs I use.

By the way, thanks for the quick answer , Scott!

2013/2/13 Scott Percival

My understanding is that FlasCC is just a GCC toolchain that targets the
Flash Runtime as a platform. It doesn’t actually have native support for
OpenGL or ES, but they offer an abstraction layer called GLS3D to
"translate" C GL calls to the stumpy subset of capabilities in Adobe’s
Stage3D. (they’ve also hijacked the “inline asm” mechanism to inject
ActionScript instead, which is nice)

The copy of SDL 1.2 included in the FlasCC SDK looks identical to the
mainline; it uses the libVGL backend (not in SDL2 alas) for graphics and
input handling.

Adobe have included a handful of example projects ported with FlasCC and
GLS3D - https://github.com/alexmac/alcexamples - you might want to have
a go at building them just to make sure the toolchain is sound. They go
into detail here about the changes required for porting Neverball to the
new platform -
http://www.adobe.com/devnet/games/articles/compiling-opengl-games.html

On 13 February 2013 08:38, Abra?o Caldas de Santana < @Abraao_Caldas_de_San> wrote:

I use MingW for my PC builds… but I recently stumbled across with
this compiler from Adobe to make flash games from C/C++ code (FlasCC) …

They said it runs with Cygwin , but it has a custom GCC v4 that is
recognized as unknown-unknown-freebsd8.2 …
FlasCC comes with SDL 1.2 , but I wanted to use SDL2… I tried my libs
and got linker error, my first thought was to compile to Cygwin but I got
linker errors too…

I’m compiling now with the GCC’s from FlasCC but I can’t get any video
lib to work (nor DirectX nor OpenGL) , I’ll try Cross Compiling
to unknown-unknown-freebsd8.2 (fingers crossed) , but if anyone has any
experience with this compiler , I’d really appreciate any advise!

https://www.facebook.com/abraaocsantana https://twitter.com/abraaocsantana
http://br.linkedin.com/in/abraaocsantana

Abra?o C. de Santana
CEO @ Skywatch

abraao.c.santana
Mobile : +55 (21) 9307-9868


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

https://www.facebook.com/abraaocsantana https://twitter.com/abraaocsantana
http://br.linkedin.com/in/abraaocsantana

Abra?o C. de Santana
CEO @ Skywatch

abraao.c.santana
Mobile : +55 (21) 9307-9868


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Any news regarding this issue? I’ve come to the point that I would be interested in setting up a small example project of SDL 2.0 (I usually do this as a proof of concept), and I’m very interested in the basics of how to do that. The quake example is a bit complicated as I’m still learning the makefile process, and it uses SDL 1.2 as well.
So my question would be to anyone, who have some experiment in it: how am I able to simply compile just a one-file application, which displays a single image, using SDL 2, and SDL2_image?

Thank you very much in advance for your help!------------------------
Runic Girls - a hexa match3 game with girls created using SDL 2.0:
http://www.facebook.com/RunicGirls

Gameplay trailer:

SDL is already able to be built with GCC.

The issue here is not the compiler, but that FlashCC is essentially a new OS and architecture, so SDL must basically be ported to a new system.
Apparently FlasCC injects actionscript rather than platform-dependent assembly with inline asm (If I were them, I’d have used 32-bit LLVM bitcode instead, but…), so the atomics APIs are probably impossible to implement (unless FlasCC provides an API already; who knows, maybe their libc is C11 compliant).
I’m sure there’s FlasCC-specific APIs for other elements of SDL (sound, 2D/3D graphics, concurrent programming, file I/O, event handling), but probably not multiple windows (but maybe popups).
Of course, I see this as a very valuable target for SDL (since EVERYONE who the internet uses Flash, and Flash is available on just about every platform, this would enable programmers to implement a universal download), so it certainly seems worth further research.

One other forseeable roadblock would probably be that FlashCC probably expects an applet-style interface, rather than a main() function, while expecting all graphics and event function calls to be on the main thread; meaning that SDL_main must be run in a new thread. For events, this is easy enough (just have the applet interface feed events to SDL, while SDL_PumpEvents does nothing), but for graphics calls, this requires implementing some method of telling the main thread to call functions from another thread (the most most practical method probably being filling a thread-safe queue of functor-esque structures from the SDL thread, with SDL_RenderUpdate telling the applet thread to empty). Of course, another option is to not use a thread at all, and instead use coroutines, with calls into certain SDL functions implying a switch between coroutines (of course, for this, FlasCC needs to provide either ucontext_t or setjmp/longjmp), but this might be a clunky method (with those SDL functions potentially taking much longer, events possibly being lost, etc).------------------------
Nate Fries