User forums > Using Code::Blocks

C::B Newb - Trying to use C::B for NaCl Development

(1/3) > >>

Kyall:
NaCl is google's sdk for running c++ (with opengl ES 2 support if wanted) in chrome, I've been trying to find an IDE I can use to do this as google doesn't supply one, however google has it's own gnu C and libs etc for building for security reasons the code has to be compiled using these.  I couldn't see where to add a custom compiler to c::b so I've come seeking some help and here's basically what I want to do to get this working, if it's possible, and any one can help me, I'd be thankful.

On c::b build:
1)  Save the project (the cbp, maybe this is saved automagically when I hit build by default in c::b?)
2)  From c::b, as a prebuild step, run an application I've built that generates a Makefile from the cbp of the code blocks project, that generates the make file for all the build targets ( NaCl, Android, or whatever target is genned for the makefile with the proper compiler and that )  - doing this because NaCl build is a bit complicated
3)  Run make on the custom generated make file

Obviously I can use cbp as the IDE, when I generate the make file from the cbp, where I would save the project then run the make file generator and build thing manually.  But I'd feel better if I can set up a build process using the IDE that kicks this off.  

The big thing about this, is that when I've got a project with all of that working, I'll create a template file that I can create NaCl projects on from it.

oBFusCATed:
Why would you want to generate a makefile from the C::B project?
Why don't you set the compiler options inside the C::B project?

If you want to modify a compiler go to Settings -> Compiler -> you compiler -> Other settings ->Advanced options.

Kyall:

--- Quote from: oBFusCATed on April 17, 2012, 07:33:30 am ---Why would you want to generate a makefile from the C::B project?
Why don't you set the compiler options inside the C::B project?

If you want to modify a compiler go to Settings -> Compiler -> you compiler -> Other settings ->Advanced options.

--- End quote ---

Sorry didn't realize there was a Copy button for global compiler settings,

So Settings -> Compiler & Debugger -> Toolchain Executables  And I'll modify those to fit what I need

Thanks for the help, much appreciated.

Kyall:
I've got that set up and working, but now I'd still like to add something to run an application that goes over the cbp file so that I can generate the nmf file that nacl needs ( it's the nmf file that you embed into the webpage, and it's basically a JSON manifest of the url location of the 32 bit or 64 bit executable )

Also with the advanced option:
$linker $libdirs -o $exe_output $link_objects $link_resobjects $link_options $libs

I want to change each item of  $link_objects to have a prefix/postfix on it so that I can call this twice for 32 and 64 bit. 

$link_objects_x86_64 sort of thing, but that doesn't work... is there an array op for these options?

Because native client generally compiles by compiling both, I can just compile the one platform at a time, if there is a build all platforms I haven't found it yet.

oBFusCATed:
You can use post builds steps for this and there you can also use squirrel scripts.

For the second question I'm not sure I've understood it.

Navigation

[0] Message Index

[#] Next page

Go to full version