Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compilation issue #289

Open
1vijayvanga opened this issue Mar 5, 2025 · 0 comments
Open

compilation issue #289

1vijayvanga opened this issue Mar 5, 2025 · 0 comments

Comments

@1vijayvanga
Copy link

while compiling the code it shows
async_gatt.c:42:24: error: unknown type name ‘gatt_connection_t’; did you mean ‘gatt_connect_cb_t’?
42 | static void connect_cb(gatt_connection_t* connection) {
| ^~~~~~~~~~~~~~~~~
| gatt_connect_cb_t
async_gatt.c: In function ‘main’:
async_gatt.c:64:9: error: unknown type name ‘gatt_connection_t’; did you mean ‘gatt_connect_cb_t’?
64 | gatt_connection_t* connection;
| ^~~~~~~~~~~~~~~~~
| gatt_connect_cb_t
async_gatt.c:96:30: warning: implicit declaration of function ‘gattlib_connect_async’; did you mean ‘gattlib_connect’? [-Wimplicit-function-declaration]
96 | connection = gattlib_connect_async(NULL, argv[1], BDADDR_LE_RANDOM, BT_SEC_LOW, 0, 0, connect_cb);
| ^~~~~~~~~~~~~~~~~~~~~
| gattlib_connect
async_gatt.c:96:85: error: ‘BT_SEC_LOW’ undeclared (first use in this function)
96 | connection = gattlib_connect_async(NULL, argv[1], BDADDR_LE_RANDOM, BT_SEC_LOW, 0, 0, connect_cb);
| ^~~~~~~~~~
async_gatt.c:96:85: note: each undeclared identifier is reported only once for each function it appears in
async_gatt.c:96:103: error: ‘connect_cb’ undeclared (first use in this function); did you mean ‘connection’?
96 | connection = gattlib_connect_async(NULL, argv[1], BDADDR_LE_RANDOM, BT_SEC_LOW, 0, 0, connect_cb);
| ^~~~~~~~~~
| connection
async_gatt.c:102:44: warning: passing argument 1 of ‘gattlib_disconnect’ from incompatible pointer type [-Wincompatible-pointer-types]
102 | gattlib_disconnect(connection);
| ^~~~~~~~~~
| |
| int *
In file included from async_gatt.c:29:
/usr/local/include/gattlib.h:385:46: note: expected ‘gattlib_connection_t *’ {aka ‘struct _gattlib_connection ’} but argument is of type ‘int
385 | int gattlib_disconnect(gattlib_connection_t
connection, bool wait_disconnection);
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
async_gatt.c:102:25: error: too few arguments to function ‘gattlib_disconnect’
102 | gattlib_disconnect(connection);
| ^~~~~~~~~~~~~~~~~~
/usr/local/include/gattlib.h:385:5: note: declared here
385 | int gattlib_disconnect(gattlib_connection_t
connection, bool wait_disconnection);
| ^~~~~~~~~~~~~~~~~~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant