English 中文(简体)
Enabling C++ linkage for Emscripten compilation
原标题:

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.`
问题回答

暂无回答




相关问题
PHP include_once not working for file in parent directory

I just started working on a site that has been passed down to me that isn t working. I ve found that there s a problem when in /admin/index.php it tries to instantiate an instance of /classes/admin....

How does include path resolution work in require_once?

I was writing an web app in PHP, when I encountered a strange situation. To illustrate my problem, consider a web app of this structure: / index.php f1/ f1.php f2/ f2.php ...

Proper way to set PHP include path for *Nix and Windows

Is this the proper way to define an include path for both *nix and Windows? define( INCPATH , realpath( dirname( __FILE__ ) ) . / ); Note the trailing forward-slash I included above. Is the ...

Symfony Fails opening my sfDoctrineDatabase.class.php

My problem is very simple, yet I feel lost while looking at it ... I am currently working on a Symfony project located on an SVN repository. It has worked well all day but suddenly it crashed... Now ...

Fatal error: Class Zend_Controller_Action not found

I ve found some answers that are closely related to this problem, but I still can t get it resolved. I believe folks are saying that something is not correct with my include path, but I ve tried all ...

new Zend_Loader_Autoloader not finding files

I just upgraded from ZF 1.7 to ZF 1.9, and almost everything works fine... except for Autoloader. Old: require_once( Zend/Loader.php ); Zend_Loader::registerAutoload(); New: require_once ...

Adding my custom PHP Library in include_path

I want to add my PHP library file to be included in include_path, so that i can access it from anywhere in my application running on that server. I tried adding it as per the syntax for include_path ...

php relative and absolute paths

I have read that when including a php file that using absolute paths has a faster processing time than relative paths. What would you suggest to use? include("includes/myscript.php"); or include("/...

热门标签