Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Reply-To: Cygwin List Message-Id: <6.1.0.6.0.20040611171421.03297b68@pop.prospeed.net> X-Sender: Date: Fri, 11 Jun 2004 17:22:57 -0400 To: geneSmith , cygwin AT cygwin DOT com From: Larry Hall Subject: Re: __getreent undefined on linux app build In-Reply-To: References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" At 04:40 PM 6/11/2004, you wrote: >geneSmith wrote, On 6/11/2004 2:58 PM: > >>I have tried to build a linux app (actually a app and a shared library) that was made for linux and works there under cygwin. Was hoping for minimal changes. First off, it seemed that I had to tell the linker the c library name with -lc. That got rid of a ton of undefined references. However, it still has undefined reference to __getreent is every file when linking the shared library. >> From reading this list, I see that __getreent comes from the cygwin1.dll at run time. I had more than cywwin1.dll on my system from misc apps and renamed them and rebooted. Still get the link error. > >Looks like I can link to /lib/libcygwin.a to resolve it. Not sure if that is right way but program links and runs. (Not sure if it really works since need to talk to a box which I don't yet have via tcp/ip.) I tried to follow the procedure in the docs for linking against a dll but cygwin1.dll has no symbols. > >Or is libcygwin.a the "import library" for cygwin1.dll? If so, I guess I am ok. Yes, libcygwin.a is the import library. But I don't understand why you need it (or -lc either for that matter). Just compiling with Cygwin's gcc/g++ gets you all this, unless you're using -mno-cygwin, in which case you're undoing it by explicitly linking Cygwin anyway. Clearly, you're doing something I don't understand but in the whole sheme of things, my understanding of your problem isn't a requirement for anything. ;-) -- Larry Hall http://www.rfk.com RFK Partners, Inc. (508) 893-9779 - RFK Office 838 Washington Street (508) 893-9889 - FAX Holliston, MA 01746 -- 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/