From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1681 invoked by alias); 8 Jan 2003 03:32:16 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 1443 invoked from network); 8 Jan 2003 03:30:57 -0000 Received: from unknown (HELO sina.com) (202.108.35.238) by 209.249.29.67 with SMTP; 8 Jan 2003 03:30:57 -0000 Received: (qmail 12288 invoked by uid 99); 8 Jan 2003 03:23:28 -0000 Message-ID: <20030108032328.12287.qmail@sina.com> From: top_general To: cygwin@cygwin.com Subject: help... MIME-Version: 1.0 Date: Mon, 13 Jan 2003 03:04:00 -0000 X-Priority: 3 X-SW-Source: 2003-01/txt/msg00341.txt.bz2 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 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? who help me ? Thanks ______________________________________ =================================================================== Ãâ·ÑÊÔÓÃÐÂÀË15MÈÎÄãÓÊ »ñÊýÂëÏà»ú¡¢ÊÖ»ú´ó½± (http://vip.sina.com/sol_mail/promotion/pro_men.html) ÐÂÀ˶þÊÖÊг¡£ºÒ»ÔªÍ¶È룬ʮ·Ö¾ªÏ²£¬°Ù·ÖÂúÒâ (http://classad.sina.com.cn/2shou/) ÿÌì1²¿ÊÖ»ú£¡çÍ·×ÐÂÄê¶ÌÐÅרÌâ (http://sms.sina.com.cn/act/beautyxmas.html) -- 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/