Calculator Community > Calculator C
TIGCC kbd_queue problem
Jonson26:
Well, I started into tigcc programming, and i am unable t compile this example. Has anyona an idea why?
--- Code: ---#include <tigcclib.h>
void _main(void) {
void *kbq = kbd_queue();
unsigned short key;
unsigned long count = 0;
// clear the screen
clrscr();
// print the string telling the user to press a key
printf("Please press a key.\n");
// while no key was retrieved from the keyboard queue
while (OSdequeue(&key, kbq)) {
// increment the variable number by one
printf("Queue Check: %lu.\n", count);
++count;
}
// tell them what key they pressed
printf("The keycode was %hu\n", key);
// wait for input before exiting
ngetchx();
}
--- End code ---
Eeems:
It would help if you included the compiler output.
Jonson26:
Well.. I only get this one error:
--- Quote ---Unresolved reference to 'OSdequeue'.
--- End quote ---
123outerme:
--- Quote from: Jonson26 on October 14, 2017, 04:16:28 pm ---Well.. I only get this one error:
--- Quote ---Unresolved reference to 'OSdequeue'.
--- End quote ---
--- End quote ---
That usually signifies a missing -l(library) argument, forgetting to #include something, not having the library files in the right places, or the PATH variables being wrong. Try any of those things and you'll probably fix it.
TravisE:
Are you using TIGCC, or GCC4TI? What version is it, how is your environment set up, and how are you running the compiler?
I have no problem compiling the example myself with GCC4TI on the command line in my Linux system (after adding the appropriate #define USE_TI89/USE_TI92PLUS/USE_V200 lines to the source). It's possible your installation or setup may be misconfigured somehow.
Navigation
[0] Message Index
[#] Next page
Go to full version