[build2] Need more help(tutorial) about how can I link to libraries that released on cppget.

good 770326 good770326 at hotmail.com
Wed Dec 15 09:52:41 UTC 2021


Hello,
    I've just been trying to use build2 for a few weeks. Recently I try to use bdep to create a new project and add SQLite3 dependencies according to the chapter toolchain intro 2.3. Although it automatically downloads and compiles libsqlite3 from cppget, it always indicates that the header file "libsqlite3/sqlite3.h" cannot be found.
I know I must have not configured enough, but I have no idea on how to do next.

====
PS C:\Users\Administrator\Desktop\sqlitelinktest\sqlitelinktest> bdep update
error: header 'libsqlite3\sqlite3.h' not found and no rule to generate it
  info: failure deferred to compiler diagnostics
  info: re-run with --verbose=4 for more information
  info: while extracting header dependencies from sqlitelinktest\cxx{sqlitelinktest}@..\sqlitelinktest-built\sqlitelinktest\sqlitelinktest\
  info: while applying rule cxx.compile to update ..\sqlitelinktest-built\sqlitelinktest\sqlitelinktest\obje{sqlitelinktest}
  info: while applying rule cxx.link to update ..\sqlitelinktest-built\sqlitelinktest\sqlitelinktest\exe{sqlitelinktest}
  info: while applying rule alias to update ..\sqlitelinktest-built\sqlitelinktest\dir{sqlitelinktest\}
  info: while applying rule alias to update ..\sqlitelinktest-built\dir{sqlitelinktest\}
c++ sqlitelinktest\cxx{sqlitelinktest}@..\sqlitelinktest-built\sqlitelinktest\sqlitelinktest\
C:\Users\Administrator\Desktop\sqlitelinktest\sqlitelinktest\sqlitelinktest\sqlitelinktest.cpp(3): fatal error C1083: Cannot open include file: “libsqlite3/sqlite3.h”: No such file or directory
info: failed to update ..\sqlitelinktest-built\dir{sqlitelinktest\}
====

The following are the commands I actually executed:
1.C:\"Program Files"\"Microsoft Visual Studio"\2022\Community\VC\Auxiliary\Build\vcvars64.bat
2.bdep new -l c++,cpp -t exe sqlitelinktest
3.//Then I edit manifest, repositories.manifest, sqlitelinktest/buildfile as described in docs, and write #include <libsqlite3/sqlite3.h> in the code.
4.cd sqlitelinktest
5.bdep init -C - at built // (And agree to fetch libsqlite3 here)
6.bdep update

I've tried to add config.import.libsqlite3, and changing -I in sqlitelinktest/buildfile to /I (because I'm using Visual Studio), but it doesn't work. So more guidances are needed.

Best Regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.build2.org/archives/users/attachments/20211215/6ab9af60/attachment.html>


More information about the users mailing list