1.5.25-11 gcc compile issue
Robby Gieringer
thebhead@yahoo.com
Tue Apr 22 19:45:00 GMT 2008
I am trying to compile a C program using gcc on
cygwin. This program has compiled on tru64, AIX, Sun,
MAC, ect...but now need it for a Windows box. I've
only used cygwin for 2 days and have researched this
problem, but have had no luck. I send my apologies if
this has already been answered, but I haven't been
lucky enough to find it.
When I compiled my program before using...
gcc -o code48_win -lncurses -D_WIN_ code_v49w.c
term.h: No such file or directory
I've carefully made sure everything was installed that
the web said...did it 3 times! I now understand that
the term.h is not in the include path with many other
header files, but in it's child path 'ncurses'. I did
three different things which gave the same results...
1 - Made symlinks that the ncurses cygwin package
doesn't:
/usr/include/ncurses/term.h -> /usr/include/term.h
2 - Changed my header file to #include
<ncurses/term.h>
3 - Add this argument -I/usr/include/ncurses when
compiling
This solved finding the term.h, but now...I get these
errors. Using the 3rd case
gcc -o code48_win -I/usr/include/ncurses -lncurses
-D_WIN_ code_v49w.c
(It gives a few warnings which are fine...then)
: undefined reference to `_initscr'
: undefined reference to `_newwin'
: undefined reference to `_LINES'
: undefined reference to `_COLS'
: undefined reference to `_keypad'
: undefined reference to `_nonl'
: undefined reference to `_noecho'
: undefined reference to `_wgetch'
: undefined reference to `_wmove'
: undefined reference to `_wrefresh'
(And continues unto about another 1100 undefined
references which a lot of them repeat)
This has compiled on nearly every other box imaginable
with no problems. I feel it now reads in all the
header files, but then blows up once it goes to the
runtime. If there is a solution to this, I would be
very grateful. Again, sorry for being a newb and
thanks for your help!
~Rob
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
More information about the Cygwin
mailing list