Export single C function in binding.cpp

For example:

#include <emscripten/bind.h>
#include <emscripten/html5.h>
#include "worker.h"

EMSCRIPTEN_BINDINGS(worker) {
     function( "emscripten_performance_now", &emscripten_performance_now );
}

Link zlib dynamic library file and Zipper static library

target_link_libraries( ${PROJECT_NAME} z libZipper.a)

Build subfolder as sub-project to generate library file

#build sub-project ZIPPER_DIR to ZipperDir                      
add_subdirectory( ${ZIPPER_DIR} ${CMAKE_BINARY_DIR}/ZipperDir ) 
                                                                
LINK_DIRECTORIES(                                               
  ${CMAKE_BINARY_DIR}/ZipperDir/zlib_bin                        
)                                                                                                                              

zipper/CMakeLists.txt:

#find_package(ZLIB) #don't use system zlib for wasm.

Some notes about ubuntu and vmware workstation

Change permission of folder and subfolders.

find <folderPath> -type d -print0 | xargs -0 chmod 775

Vmware Workstation – Display shared folder on ubuntu

If you can’t see your folder in /mnt/hgdfs after setting it by Vmware Workstation, you can input the following command to mount it.

sudo vmhgfs-fuse .host:/ /mnt/hgfs/ -o allow_other -o uid=1000

Then you can see the shared-folder in path /mnt/hgfs/.


0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments

Content Summary
: Input your strings, the tool can get a brief summary of the content for you.

X
0
Would love your thoughts, please comment.x
()
x