Hi Arvind! You need to prepare emscripten-friendly versions of the opencv libraries , by compiling them from their C++ sources using emcc.
emcc *cannot* utilise native x86-64 machine code libraries. perhaps one of the links here will help: https://duckduckgo.com/?q=opencv+emscripten&atb=v140-1&ia=web https://www.google.com/search?hl=en&q=opencv%20emscripten And please avoid sending people 2MB-sized emails. On Thu, 11 Nov 2021 03:19:22 -0800 (PST) Arvind Arya <[email protected]> wrote: > [image: Screenshot 2021-11-11 at 4.01.41 PM.png]I > [image: Screenshot 2021-11-11 at 4.04.29 PM.png]rojects but here is the > issue.[image: Screenshot 2021-11-11 at 4.01.13 PM.png] > I have used Emscripten to compile basic c++ program how do I get these > libraries and header file in the mix. So that they can work in WebAssembly > or in the browser. People said that I need to link these .a files with the > project. How do I go about doing it. I cannot even get this code to run in > Visual studio code. Cannot link libraries there. Please tell me how to move > forward. Library linking is the main issue I am facing. > On Thursday, November 11, 2021 at 3:08:30 PM UTC+5:30 Shlomi Fish wrote: > > > Hi Arvind! > > > > On Wed, 10 Nov 2021 23:19:46 -0800 (PST) > > Arvind Arya <[email protected]> wrote: > > > > > Thank You for the reply loved the jokes Chuck Norris jokes are like > > > Rajnikanth jokes if you had seen his movies he actually is the GOAT in > > that > > > genre. > > > > I'm glad you did. I didn't watch Rajnikanth's films. > > > > > I want to know how do I make object(.o) file from my project and then > > link > > > it with a static library(.a) file which there are multiple of in my > > project. > > > # Compile libstuff to libstuff.a emconfigure ./configure emmake make # > > > Compile project to project.o emconfigure ./configure emmake make # Link > > the > > > library and code together. emcc project.o libstuff.a -o final.html > > > This is what I want to run. How do I go about it. > > > > I didn't get too far with emconfigure and emmake (I use this instead: > > > > https://github.com/shlomif/fc-solve/blob/master/fc-solve/scripts/Makefile.to-javascript.mak > > ). > > > > Did you install emsdk yet: https://github.com/emscripten-core/emsdk ? > > > > What did you run and what were the errors: > > > > * https://github.com/shlomif/writing-the-perfect-question > > > > * https://github.com/shlomif/how-to-share-code-online > > > > Thanks! > > > > > On Thursday, November 11, 2021 at 11:34:53 AM UTC+5:30 Shlomi Fish wrote: > > > > > > > Hi Arvind! > > > > > > > > On Wed, 10 Nov 2021 04:32:49 -0800 (PST) > > > > Arvind Arya <[email protected]> wrote: > > > > > > > > > I have a c++ program of openCV where I open an image and do > > > > Manipulations > > > > > on it and write it back the header files I use are > > > > > > > > > > #include<opencv2/imgcodecs.hpp> > > > > > > > > > > #include <opencv2/highgui.hpp> > > > > > > > > > > #include <opencv2/imgproc.hpp> > > > > > > > > > > #include <opencv2/shape/shape_transformer.hpp> > > > > > > > > > > I want to run this file in WebAssembly I am really lost.I am new how > > do > > > > I > > > > > go about doing it. how do I link the libraries what libraries should > > I > > > > > link. How does Emscripten goes about compiling my C++ program how > > and > > > > where > > > > > I link libraries. Do I need to make an executable first. Please can > > > > someone > > > > > give me steps. > > > > > > > > > > > > > I suggest you start by reading the intro documentation at > > > > https://emscripten.org/ . I think building [parts of] opencv using > > emcc > > > > may not > > > > be trivial. > > > > > > > > > Thank You So Much, > > > > > > > > > > Arvind > > > > > > > > > > > > > > > > > > > > > -- > > > > > > > > Shlomi Fish https://www.shlomifish.org/ > > > > Humanity - Parody of Modern Life - https://shlom.in/humanity > > > > > > > > The Knights Who Say “Ni” once said “Ni” to Chuck Norris. They are now > > no > > > > longer > > > > The Knights Who Say “Ni”. > > > > — https://www.shlomifish.org/humour/bits/facts/Chuck-Norris/ > > > > > > > > Please reply to list if it's a mailing list post - > > https://shlom.in/reply > > > > . > > > > > > > > > > > > > > > -- > > > > Shlomi Fish https://www.shlomifish.org/ > > Star Trek: “We, the Living Dead” - https://shlom.in/st-wtld > > > > For every A, Chuck Norris is both A and not-A. > > Chuck Norris is freaking everything. > > — https://www.shlomifish.org/humour/bits/facts/Chuck-Norris/ > > > > Please reply to list if it's a mailing list post - https://shlom.in/reply > > . > > > -- Shlomi Fish https://www.shlomifish.org/ Interview with Ben Collins-Sussman - https://shlom.in/sussman The Angel of Death cannot keep up with Chuck Norris’s throughput of killing. — https://www.shlomifish.org/humour/bits/facts/Chuck-Norris/ Please reply to list if it's a mailing list post - https://shlom.in/reply . -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/20211111164646.04cb2786%40shlomifish.org.
