delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-1.1 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_DUL |
X-Spam-Check-By: | sourceware.org |
X-Yahoo-SMTP: | mjD.OBqswBAPbVUxYJaYPvc61jLEnpq8VnBwJGdbEJOPA9xw |
Message-ID: | <4CADD614.8090508@sbcglobal.net> |
Date: | Thu, 07 Oct 2010 14:15:48 +0000 |
From: | Greg Chicares <gchicares AT sbcglobal DOT net> |
User-Agent: | Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.9) Gecko/20100915 Thunderbird/3.1.4 |
MIME-Version: | 1.0 |
To: | cygwin AT cygwin DOT com |
Subject: | Re: Simple Cygwin Application Linking Problem |
References: | <54726 DOT 1286459553 AT cc DOT hs-owl DOT de> |
In-Reply-To: | <54726.1286459553@cc.hs-owl.de> |
X-IsSubscribed: | yes |
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 |
[please see http://cygwin.com/acronyms/#PCYMTWLL ] On 2010-10-07 13:52Z, Michael Jäger wrote: > > INCCYGSTDABS = C:/cygwin/usr/include It's generally preferable to use posix paths with cygwin tools. This one would be simply /usr/include for example. > LIBCYGSTDABS = C:/cygwin/usr/include/d/3.4.4/std/c The compiler knows where to find its own libraries. It's better to let it manage this itself. Then, when you upgrade to another version of gcc, you won't have to edit the makefile. > test.exe: target.o > ld $(LCOMP) target.o 'ld' is the linker, but it's better not to invoke it directly. Use 'gcc' to link C programs, and 'g++' for C++. They'll call the linker for you, automatically specifying the startup code and runtime library that are lacking here: > target.o:test.c(.text+0x12): undefined reference to ‘__main’ > target.o:test.c(.text+0x1e): undefined reference to ‘printf’ -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |