Brion,
Thanks for taking time to address my question.
Where should I put that compiler flag?
This is my CMakeLists.txt file
=================================================================
cmake_minimum_required(VERSION 3.5)
#project(hello_library)
project(myspell)
############################################################
# Create a library
############################################################
#Generate the static library from the library sources
add_library(myspell STATIC•
src/myspell.cxx
src/dict.cxx
src/msp.cxx
)
target_include_directories(myspell
PUBLIC•
${PROJECT_SOURCE_DIR}/include
)
############################################################
# Create an executable
############################################################
# Add an executable with the above sources
add_executable(myspell-bin•
src/main.cxx
)
# link the new myspell target with the myspell-bin target
target_link_libraries( myspell-bin
PRIVATE•
myspell
)
# now we rename myspell-bin executable to myspell using target properties
set_target_properties(myspell-bin
PROPERTIES OUTPUT_NAME myspell)
=================================================================
and this is how I am building it
===============================================
#! /bin/bash
ls
rm -rf build
mkdir -p build
cd build
emcmake cmake ..
emmake make
em++ -s ALLOW_MEMORY_GROWTH=1 -s INITIAL_MEMORY=33554432 -s EXPORTED_FUNCTIONS="['_Myspell_create', '_Myspell_spell', '_Myspell_suggest', '_Myspell_free_list', '_Myspell_destroy']" ./libmyspell.a -o myspell.js
cp ../myspell-worker.js .
===============================================
Please let me know where should I make the changes.
Also please let me know if I need to provide more details
Thanks
-Mahesh
On Wednesday, December 29, 2021 at 10:03:08 PM UTC-5 br..com wrote: