TileDB: Compiling tiledb examples results in an import error

Running tiledb examples results in an error: What am I missing ?

wsl

error:

(tiledbenv) roy@LP-0209:~/TileDB/examples/c_api$ gcc quickstart_dense.c
quickstart_dense.c:35:10: fatal error: tiledb/tiledb.h: No such file or directory
   35 | #include <tiledb/tiledb.h>
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.

tiledb version:

(tiledbenv) roy@LP-0209:/mnt/c/Users/roya$ conda list | grep tiledb
# packages in environment at /home/roy/anaconda3/envs/tiledbenv:
tiledb                    2.3.3                h1132f93_2

os version:

(tiledbenv) roy@LP-0209:/mnt/c/Users/roya$ uname -a
Linux LP-0209 5.10.102.1-microsoft-standard-WSL2 #1 SMP Wed Mar 2 00:30:59 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

gcc version:

(tiledbenv) roy@LP-0209:~/TileDB/examples/c_api$ gcc --version
gcc (Ubuntu 9.4.0-1ubuntu1~20.04) 9.4.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

windows 10

error:

(tiledbenv) PS C:\Users\roya\Downloads\TileDB\examples\c_api> gcc .\quickstart_dense.c
.\quickstart_dense.c:35:10: fatal error: tiledb/tiledb.h: No such file or directory
   35 | #include <tiledb/tiledb.h>
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.

tiledb version:

(tiledbenv) PS C:\Users\roya\Downloads\TileDB\examples\c_api> conda list | grep tiledb

# packages in environment at C:\Users\roya\Anaconda3\envs\tiledbenv:
tiledb                    2.10.3               h5689973_0    conda-forge

os version:

(tiledbenv) PS C:\Users\roya\Downloads\TileDB\examples\c_api> (Get-WmiObject Win32_OperatingSystem).Caption
Microsoft Windows 10 Pro

gcc version:

(tiledbenv) PS C:\Users\roya\Downloads\TileDB\examples\c_api> gcc --version
gcc.exe (MinGW-W64 x86_64-posix-seh, built by Brecht Sanders) 11.2.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 19 (10 by maintainers)

Most upvoted comments

@royassis Sorry again for being plum-eyed there. I didn’t expect Conda under C++, and that’s on me.

The possibly quickest way to building an example may be Docker. I just (re-)pulled tiledb/tiledb and then from the directoy (on my local disk) containing the C API example:

edd@rob:~/git/tiledb/examples/c_api(dev)$ docker run --rm -ti -v $PWD:/dkr -w /dkr tiledb/tiledb
tiledb@b674fcae5987:/dkr$ gcc -o quickstart_dense quickstart_dense.c -ltiledb
tiledb@b674fcae5987:/dkr$ ./quickstart_dense 
2 3 4 6 7 8 
tiledb@b674fcae5987:/dkr$