Author Topic: Need help with Emscripten on Code::Blocks  (Read 4624 times)

Offline danguafer

  • Single posting newcomer
  • *
  • Posts: 2
Need help with Emscripten on Code::Blocks
« on: January 04, 2014, 06:19:53 pm »
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!

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: Need help with Emscripten on Code::Blocks
« Reply #1 on: January 04, 2014, 06:40:54 pm »
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!]