Hi,
I have a project I started 2 years ago to create a web view binding to and updated version of 'webview'. https://github.com/francisl/webview
The compilation was working fine, but when I try update the code I start having issues.
now I have
CC: minimal.nim
~//.cache/nim/minimal_d/@mminimal.nim.cpp:8:10: fatal error: 'webview.h' file not found
#include "webview.h"
^~~~~~~~~~~
1 error generated.
Error: execution of an external compiler program 'clang++ -c -std=gnu++14 -funsigned-char -DWEBVIEW_STATIC -DWEBVIEW_IMPLEMENTATION -I~//workspace/fl/nimwview/src/webview -I~//.choosenim/toolchains/nim-1.6.10/lib -I~//workspace/fl/nimwview/examples/minimal/webview -I~//workspace/fl/nimwview/examples/minimal -o ~//.cache/nim/minimal_d/@mminimal.nim.cpp.o ~//.cache/nim/minimal_d/@mminimal.nim.cpp' failed with exit code: 1
stack trace: (most recent call last)
/private/var/folders/1w/dy45d4v53_g835wygmqh99zr0000gp/T/nimblecache-1144436333/nimscriptapi_3645702110.nim(187, 16)
~//workspace/fl/nimwview/webview.nimble(26, 10) run_example2Task
~//.choosenim/toolchains/nim-1.6.10/lib/system/nimscript.nim(273, 7) exec
~//.choosenim/toolchains/nim-1.6.10/lib/system/nimscript.nim(273, 7) Error: unhandled exception: FAILED: nim cpp -p:./src --cincludes:./webview --run examples/minimal/minimal.nim [OSError]
Tip: 1 messages have been suppressed, use --verbose to show them.
Error: Exception raised during nimble script execution
Any hint on how I can solve that issue?
Now it can't find the header files
Try using an absolute path.
@sls1005 is right. --cincludes requires an absolute path. Alternatively, this seems to work:
nim cpp -p:./src --passC:"-I./webview" --run examples/minimal/minimal.nim
For the -p problem, you need to put a config.nims in your examples/ folder with the content if you don't want to use -p:
# config.nims
--path:"../src"
I got it working with --passC:"-I./webview"
But I can't make it work with an absolute path.
Thanks for the help.