Open ganeshkbhat opened 10 months ago
If you want to create a static library such as lib7z.a
when you need to use emar
to create it, and not emcc
.
The emcc project.o libstuff.a -o final.html
example you give should work assuming things are setup correctly. Please share the full error message if you need more help with that.
If you see errors like xxx.o file format cannot be recognised
that probably means have not built xxx.o
with emcc but instread with the host compiler (e.g. clang or gcc). You need to make sure you use emcc when building the 7zip project.
I am trying to Compile C++ Project that results in multiple executables https://www.7-zip.org/. The make command generates o files, a single 7z.a file and multiple executables normally without issues. However, when I am trying to use the emcc the command
emcc -O2 a.o b.o -o project.js
or theemcc project.o libstuff.a -o final.html
from the https://emscripten.org/docs/tools_reference/emcc.html#emccdoc is giving me errors sayingxxx.o file format cannot be recognised
.What I wish to be doing is use the
xx.o
file andyy.o
file which useslib7z.a
producesxx.exe
andyy.exe
executable toxx.wasm
andyy.wasm
respectively to export the functions ofxx.exe
andyy.exe
files appropriately and not really the base functions oflib7z.a
directly many of which are then used in a usable mode in the .c and .h files that makes the .exe files.when the lib7z.a file created to create a lib7z.wasm file generates a lib7z.wasm file but the usage has become a lot more messy because the exported functions are not clear and not documented well. I am also unsure if all the executable functions of all 7z project's different executables exist in a directly usable format inside lib7z.wasm as well.
Commands:
Alternatively