Test program fails to compile #6

Open
opened 2024-12-30 13:51:14 -05:00 by lw-everestlinux · 2 comments

The source code of the test program is:

/* queue.c */
#include <glacier/data.h>

int
main(void)
{
	init_queue("ops_queue");
}

With the following compile command:

(user)$ gcc queue.c -lglalcier

The following errors are outputted by gcc:

/usr/include/glacier/data.h:91:17: error: unknown type name ‘queue’
   91 | void init_queue(queue *q);
      |                 ^~~~~
/usr/include/glacier/data.h:112:1: error: unknown type name ‘bool’
  112 | bool queue_is_empty(queue *q);
      | ^~~~
/usr/include/glacier/data.h:1:1: note: ‘bool’ is defined in header ‘<stdbool.h>’; this is probably fixable by adding ‘#include <stdbool.h>’
  +++ |+#include <stdbool.h>
    1 | /*
/usr/include/glacier/data.h:112:21: error: unknown type name ‘queue’
  112 | bool queue_is_empty(queue *q);
      |                     ^~~~~
/usr/include/glacier/data.h:133:1: error: unknown type name ‘bool’
  133 | bool queue_is_full(queue *q);
      | ^~~~
/usr/include/glacier/data.h:133:1: note: ‘bool’ is defined in header ‘<stdbool.h>’; this is probably fixable by adding ‘#include <stdbool.h>’
/usr/include/glacier/data.h:133:20: error: unknown type name ‘queue’
  133 | bool queue_is_full(queue *q);
      |                    ^~~~~
queue.c: In function ‘main’:
queue.c:8:9: error: implicit declaration of function ‘init_queue’ [-Wimplicit-function-declaration]
    8 |         init_queue("ops_queue");
      |         ^~~~~~~~~~

This is most likely due to data.h being incomplete. Will fix soon.

The source code of the test program is: ``` /* queue.c */ #include <glacier/data.h> int main(void) { init_queue("ops_queue"); } ``` With the following compile command: `(user)$ gcc queue.c -lglalcier` The following errors are outputted by gcc: ``` /usr/include/glacier/data.h:91:17: error: unknown type name ‘queue’ 91 | void init_queue(queue *q); | ^~~~~ /usr/include/glacier/data.h:112:1: error: unknown type name ‘bool’ 112 | bool queue_is_empty(queue *q); | ^~~~ /usr/include/glacier/data.h:1:1: note: ‘bool’ is defined in header ‘<stdbool.h>’; this is probably fixable by adding ‘#include <stdbool.h>’ +++ |+#include <stdbool.h> 1 | /* /usr/include/glacier/data.h:112:21: error: unknown type name ‘queue’ 112 | bool queue_is_empty(queue *q); | ^~~~~ /usr/include/glacier/data.h:133:1: error: unknown type name ‘bool’ 133 | bool queue_is_full(queue *q); | ^~~~ /usr/include/glacier/data.h:133:1: note: ‘bool’ is defined in header ‘<stdbool.h>’; this is probably fixable by adding ‘#include <stdbool.h>’ /usr/include/glacier/data.h:133:20: error: unknown type name ‘queue’ 133 | bool queue_is_full(queue *q); | ^~~~~ queue.c: In function ‘main’: queue.c:8:9: error: implicit declaration of function ‘init_queue’ [-Wimplicit-function-declaration] 8 | init_queue("ops_queue"); | ^~~~~~~~~~ ``` This is most likely due to `data.h` being incomplete. Will fix soon.
lw-everestlinux added the
bug
label 2024-12-30 13:51:14 -05:00
lw-everestlinux self-assigned this 2024-12-30 13:51:14 -05:00
lw-everestlinux added this to the libglacier v4.0.0 project 2024-12-30 13:51:14 -05:00
lw-everestlinux started working 2024-12-30 13:55:54 -05:00
Author
Owner

Merged #7

Merged #7
lw-everestlinux stopped working 2024-12-30 14:31:21 -05:00
35 minutes 27 seconds
Author
Owner

Fixes didn't work, will continue investigating

Fixes didn't work, will continue investigating
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Total Time Spent: 35 minutes 27 seconds
lw-everestlinux
35 minutes 27 seconds
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: EverestLinux/libglacier#6
No description provided.