![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Undefined symbol: .log | ravindra_maddal | AIX | 0 | 05-15-2008 04:30 AM |
| undefined symbol: clock_gettime' error | dpa078 | High Level Programming | 4 | 04-09-2008 06:29 AM |
| shared object "undefined symbol: fstat" error | marcus121 | High Level Programming | 5 | 04-24-2006 04:11 PM |
| fread64 fwrite64 compilation problem (undefined symbol) | Isax50 | High Level Programming | 3 | 08-16-2005 12:26 AM |
| ld: 0711-317 ERROR: Undefined symbol: .hello | stockdan | High Level Programming | 2 | 11-25-2003 01:43 AM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Iam attempting a script to return the current cursor position using the getyc macro
I have #included the curses.h however on compilation (with gcc) it errors with Undefined symbol .getcury Undefined symbol .gercurx Any ideas where I can find a solution or what I've missed |
| Forum Sponsor | ||
|
|
|
|||
|
Quote:
did u compile with -lcurses option? If you still have problem. Please post your code!!! |
|
|||
|
I do have one further issue however, the line is returned 16424 and the column as 9001 no matter where the cusror is ?
The code is very basic but reads as follows; #include <curses.h> int rvline, rvcolumn; main() { WINDOW *my_window; getyx(my_window, rvline, rvcolumn); printf ("The line is %i\n", rvline); } |
|
|||
|
yes it will display some junk value,
you are still not in graphics mode and still in console mode, initialize graphics mode and find the cursor position !!! man initscr and man endwin for details |
|
|||
|
Thanks for the info, read the man pages but not sure how and where to put the subroutine in the script
I've put it at the top, but being fairly new and a bit of a novice to C I'm not confident #include <stdio.h> #include <curses.h> WINDOW *initscr(void); SCREEN *newterm(char *type, FILE *outfile, FILE *infile); initscr(); main() { int rvline, rvcolumn; WINDOW *my_window; getyx(my_window, rvline, rvcolumn); printf ("The line is %i\n", rvline); } compilation errors CursorPos.c:7: conflicting types for `initscr32' CursorPos.c:3: previous declaration of `initscr32' CursorPos.c:7: warning: data definition has no type or storage class |
|
|||
|
Quote:
and still you have not invoked the graphics mode and still in console mode. Try the following code, Code:
#include <stdio.h>
#include <curses.h>
int main()
{
int rvline, rvcolumn;
WINDOW *my_window;
my_window=initscr();
getyx(my_window, rvline, rvcolumn);
wprintw(my_window, "prior to cur movement %d %d\n", rvline, rvcolumn);
getyx(my_window, rvline, rvcolumn);
wprintw(my_window, "after to cur movement %d %d\n", rvline, rvcolumn);
wprintw(my_window, "CURSOR");
getyx(my_window, rvline, rvcolumn);
wprintw(my_window, "\nafter to cur movement %d %d\n", rvline, rvcolumn);
getch();
endwin();
return 0;
}
|
|||
| Google UNIX.COM |