News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

Need help with Emscripten on Code::Blocks

Started by danguafer, January 04, 2014, 06:19:53 PM

Previous topic - Next topic

danguafer

Greetings!

Did someone already made it before?
I would appreciate if there is any enlightenment to this subject.

Anyway... If no one is familiar to it, let me ask few questions that might help me solve this issue:

1. How can I change the object file extension from .o to .js?
2. Is it possible to compile everything directly to the final output without linking? Ex: emcc s0.c s1.c s2.c ... s30.c -o output.js

I read somewhere that 1. is possible. But I couldn't find how in the latest version of Code::Blocks.

Hope I can get any help soon.

Thanks in advance!

oBFusCATed

1. I don't think you need to change the object file, but the output file. The object files are intermediate files.
2. I don't think this is possible or desirable.

Probably you'll have to make a new compiler, which builds c/c++ code to llvm bytecode and then a linker links the bytecode to js.
You can play with the advanced settings of the compiler.

Also you can take a look at this: http://wiki.codeblocks.org/index.php?title=Adding_support_for_non_C/C%2B%2B_files_to_the_build_system
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]