dart-archive/wasm

Exec "dart run wasm:setup" cmd return dart/dart_api.h:24:10: fatal error: 'assert.h' file not found

Imhven opened this issue · 1 comments

Windows 10

Exec "dart run wasm:setup" cmd return error result:

clang -DDART_SHARED_LIB -DNDEBUG -fno-exceptions -O3 -target x86_64-pc-windows-msvc -I I:\MyProgramFiles\flutter\bin\cache\dart-sdk\include\third_party\dart\ -I I:\MyProjects.dart_tool\wasm\include\ -c I:\MyProgramFiles\flutter\bin\cache\dart-sdk\include\third_party\dart\dart_api_dl.c -o I:\MyProjects.dart_tool\wasm\dart_api_dl.o

In file included from I:\MyProgramFiles\flutter\bin\cache\dart-sdk\include\third_party\dart\dart_api_dl.c:7:
In file included from I:\MyProgramFiles\flutter\bin\cache\dart-sdk\include\third_party\dart/dart_api_dl.h:10:
I:\MyProgramFiles\flutter\bin\cache\dart-sdk\include\third_party\dart/dart_api.h:24:10: fatal error: 'assert.h' file not found
#include <assert.h>
^~~~~~~~~~
1 error generated.
FAILED with exit code 1 clang -DDART_SHARED_LIB -DNDEBUG -fno-exceptions -O3 -target x86_64-pc-windows-msvc -I I:\MyProgramFiles\flutter\bin\cache\dart-sdk\include\third_party\dart\ -I I:\MyProjects\.dart_tool\wasm\include\ -c I:\MyProgramFiles\flutter\bin\cache\dart-sdk\include\third_party\dart\dart_api_dl.c -o I:\MyProjects\.dart_tool\wasm\dart_api_dl.o

I just did a fresh run of dart run wasm:setup on my windows machine and it worked, so I think this is an issue with your clang setup.

Getting your build environment set up on windows can be fiddly. Judging by the error, I suspect you're missing something in your PATH environment variable. Try searching your computer for an assert.h file, and adding that folder to your PATH variable.

Unfortunately there's not much I can do in package:wasm to help. StackOverflow is a good place to start though.