0

EDIT: the linkage is for the #include directives for the .h files. I figured out that the error occurs when the same #include statements is declared twice in different .cpp files.

I m trying to use Emscripten to compile my c++ project codes, but keeping getting "File not found" error when including headers in VS Code.

I m using WSL 2 Ubuntu Distro.

I noticed the error occurs when the same include statement is declared before.

I used this code below to compile my codes but to avail:

emcc -o testnpsi.html OtBinMain.cpp -O3 -s WASM=1 --shell-file emscripten_enabler/shell_minimal.html -s NO_EXIT_RUNTIME=1 -s "EXTRA_EXPORTED_RUNTIME_METHODS=['ccall']"

I have been stuck with this for the past few months trying to compile this using Emscripten.

`/mnt/c/Users/DELL USER/OneDrive/Desktop/MultipartyPSI-190723/testnpsi$ emcc -o testnpsi.html main.cpp -O3 -s WASM=1 --shell-file emscripten_enabler/shell_minimal.html -s NO_EXIT_RUNT
IME=1 -s "EXTRA_EXPORTED_RUNTIME_METHODS=['ccall']"
main.cpp:3:10: fatal error: 'Network/BtChannel.h' file not found
    3 | #include "Network/BtChannel.h"
      |          ^~~~~~~~~~~~~~~~~~~~~
1 error generated.`
lit
  • 1
  • 1
  • ... what does the error message have to do with linkage? Is this a compile error or an intellisense error? – starball Jul 20 '23 at 08:31
  • 1
    where exactly does that header it exist? Where is your Emscripten installation located? – starball Jul 20 '23 at 08:39
  • Please always [edit] clarifications into your question post instead of hiding them in the comments! Comments are for _soliciting_ clarifications- not for providing them. – starball Jul 20 '23 at 09:12
  • What is this header? Is this something you wrote? And what does linkage have to do with anything? – HolyBlackCat Jul 20 '23 at 17:10

0 Answers0