delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/04/22/15:05:03

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
X-YMail-OSG: HOU9XTYVM1lC9La_6sQZPwZxAcY2t22.HHs_ADXYtL9S2tEs5IVQH1CUbLJAofNffYnnxUjQlGnrw9SKYmmqiA4AFERNqgNLujCfiLBvNG00Xlm3j4mcg_5lrg--
Date: Tue, 22 Apr 2008 12:04:33 -0700 (PDT)
From: Robby Gieringer <thebhead AT yahoo DOT com>
Subject: 1.5.25-11 gcc compile issue
To: cygwin AT cygwin DOT com
MIME-Version: 1.0
Message-ID: <997030.99301.qm@web90606.mail.mud.yahoo.com>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019