delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/01/08/00:25:02

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
Date: Tue, 7 Jan 2003 23:12:02 -0500
From: Christopher Faylor <cgf-cygwig AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: help...
Message-ID: <20030108041202.GA31411@redhat.com>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <20030108032328 DOT 12287 DOT qmail AT sina DOT com>
Mime-Version: 1.0
In-Reply-To: <20030108032328.12287.qmail@sina.com>
User-Agent: Mutt/1.5.1i

On Wed, Jan 08, 2003 at 11:23:28AM +0800, top_general wrote:
>I have a question . 
>Firstly: 
>I make a "C library".The "C library" source code is below: 
>http://www.uclinux.org/pub/uClinux/libraries/ 
>uC-libc-310899.tar.gz. 
>I build a "libc.a" using "make " in cygwin. 
>
>secondly: 
>I do an example "a.c".below: 
>//a.c 
>#include <stdio.h> 
>void main() 
>{ 
>printf("success!"); 
>return ; 
>} 
>
>I want to use "printf" function in libc.a, not in libcygwin.a. 
>so I using a new libcygwin.a ,not original libcygwin.a. 
>
>ar r libcygwin.a _cygwin_crt0_common.o _cygwin_S_IEXEC.o cygwin_attach_dll.o cygwin_crt0.o dll_entry.o dll_main.o libcmain.o premain0.o premain1.o premain2.o premain3.o regcomp.o regerror.o regexec.o regfree.o 
>
>thirdly: 
>complied the program: 
>gcc -g -o a.exe a.c -lc -lcygwin 
>
>there are some question below: 
>/cygdrive/d/DOCUME~1/ADMINI~1/LOCALS~1/Temp/ccSmKP9B.o: In function `main': 
>/cygdrive/e/develop/uc-libc_310899/1.c:4: undefined reference to `__main' 
>/cygdrive/e/develop/uc-libc_310899/1.c:5: undefined reference to `printf' 
>/usr/lib/libcygwin.a(cygwin_crt0.o)(.text+0x41): undefined reference to `import stub 
>for dll_crt0(per_process *)' 
>/usr/lib/libcygwin.a(_cygwin_crt0_common.o)(.text+0xca): undefined reference to `malloc' 
>/usr/lib/libcygwin.a(d000582.o)(.idata$7+0x0): undefined reference to `_head_cygwin1_dll' 
>/usr/lib/libcygwin.a(d001007.o)(.idata$7+0x0): undefined reference to `_head_cygwin1_dll' 
>/usr/lib/libcygwin.a(d000723.o)(.idata$7+0x0): undefined reference to `_head_cygwin1_dll' 
>/usr/lib/libcygwin.a(d000635.o)(.idata$7+0x0): undefined reference to `_head_cygwin1_dll' 
>collect2: ld returned 1 exit status 
>
>how can i do?

You can't.

>who help me ? Thanks

It's unlikely that anyone can.  You cannot just drop code into cygwin
without understanding what is going on.  If you are having problems with
printf you should report them.  If you want to augment printf to use
something available only in uClibc (a very nice embedded libc) then you
should look at the existing code for printf in newlib and modify that.
Trying to retrofit printf from uClibc for cygwin would be a daunting
task.

Wouldn't it be nice if the world worked that way, though?  No
understanding required.

"I'm trying to modify my television so that it will take HDTV signals.
I've pried the back off and randomly moved my hand around inside and now
it seems to work.  I'm off to modify my VCR so that it will take DVDs
next.  I assume that all that I'll need to do is close up the hole in
the front with some cardboard and just add a slot for the DVD..."

cgf
--
Please use the resources at cygwin.com rather than sending personal email.
Special for spam email harvesters: send email to aaaspam AT sources DOT redhat DOT com
and be permanently blocked from mailing lists at sources.redhat.com

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.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