# emcc-array-of-pointers-example **Repository Path**: mirrors_shlomif/emcc-array-of-pointers-example ## Basic Information - **Project Name**: emcc-array-of-pointers-example - **Description**: emcc array of C strings / C pointers example. - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-12-25 - **Last Updated**: 2026-03-01 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Array of strings example [Shlomi Fish](https://github.com/shlomif/) modified this repo to contain an emcc exampleof interfacing with an array of strings (or an array of C pointers in general). The interesting files are: * [c_array_strings.c](./src/c_array_strings.c) * [./wrap/post.js](./wrap/post.js) * [h.js](./h.js) * [build.sh](./build.sh) It is based on https://github.com/ZuchaoWang/emcc-example . Thanks! # emcc-example Showing how to compile c++ project into javascript library using emscripten. ### Features * Export a function mysqrt * Pass float argument to/from a function mysqrt * Pass array argument to/from a function mysqrtArray * Construct/destruct a class MyClass and call its member function * Wrap the compiled asmjs code for easy access using pre.js & post.js * Build the project using ./build.sh ### Build Enter the main directory and run ./build.sh (works only in UNIX-like system) ### Repository overview * src & include directory: the C++ project * wrap directory: a javascript wrapper which will provide more friendly access to the built library, following [umd pattern](https://github.com/umdjs/umd) * dist directory: the built javascript library will be here * test directory: html testing files that call the built javascript library * build.sh: a shell script that reads C++ project and javascript wrapper, then build the javascript library