From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: cg Newsgroups: gmane.emacs.devel Subject: Re: Using stpcpy Date: Sat, 27 Dec 2014 13:56:14 +0800 Message-ID: References: <549849A7.3070208@yandex.ru> <54991006.8030208@cs.ucla.edu> <54994677.9080608@yandex.ru> <549C0242.3010402@cs.ucla.edu> <549C4C7C.2070001@yandex.ru> <549CA168.8050002@cs.ucla.edu> <83zjaaksua.fsf@gnu.org> Reply-To: chengang31@gmail.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------000709050905020404090604" X-Trace: ger.gmane.org 1419659939 14795 80.91.229.3 (27 Dec 2014 05:58:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 27 Dec 2014 05:58:59 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 27 06:58:53 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Y4kOr-0005Eu-Ox for ged-emacs-devel@m.gmane.org; Sat, 27 Dec 2014 06:58:53 +0100 Original-Received: from localhost ([::1]:55122 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y4kOr-000700-4g for ged-emacs-devel@m.gmane.org; Sat, 27 Dec 2014 00:58:53 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49792) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y4kOn-0006va-LZ for emacs-devel@gnu.org; Sat, 27 Dec 2014 00:58:50 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y4kOi-0005G5-Lv for emacs-devel@gnu.org; Sat, 27 Dec 2014 00:58:49 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:47736) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y4kOi-0005G0-Eo for emacs-devel@gnu.org; Sat, 27 Dec 2014 00:58:44 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Y4kOd-00059a-5U for emacs-devel@gnu.org; Sat, 27 Dec 2014 06:58:40 +0100 Original-Received: from 121.235.165.105 ([121.235.165.105]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 27 Dec 2014 06:58:39 +0100 Original-Received: from chengang31 by 121.235.165.105 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 27 Dec 2014 06:58:39 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 72 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 121.235.165.105 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:180705 Archived-At: This is a multi-part message in MIME format. --------------000709050905020404090604 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 12/27/2014 6:01 AM, Dani Moncayo wrote: > Same error: > > c:/cygwin64/home/Dani/devel/emacs/repo/lib-src/ntlib.c:350: undefined > reference to `stpcpy' > I got the same error. It seems caused by linking order of files, I fixed it by swapping $(NTLIB) and $(LOADLIBES) in lib-src/Makefile.in. Patch attached. --------------000709050905020404090604 Content-Type: text/x-patch; name="fix-stpcpy-link-error.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="fix-stpcpy-link-error.patch" diff --git a/lib-src/Makefile.in b/lib-src/Makefile.in index cae0898..13a7a05 100644 --- a/lib-src/Makefile.in +++ b/lib-src/Makefile.in @@ -321,7 +321,7 @@ regex.o: $(srcdir)/../src/regex.c $(srcdir)/../src/regex.h $(config_h) etags_deps = ${srcdir}/etags.c regex.o $(NTLIB) $(config_h) etags_cflags = -DEMACS_NAME="\"GNU Emacs\"" -DVERSION="\"${version}\"" -o $@ -etags_libs = regex.o $(LOADLIBES) $(NTLIB) +etags_libs = regex.o $(NTLIB) $(LOADLIBES) etags${EXEEXT}: ${etags_deps} $(AM_V_CCLD)$(CC) ${ALL_CFLAGS} $(etags_cflags) $< $(etags_libs) @@ -336,18 +336,18 @@ ctags${EXEEXT}: ${srcdir}/ctags.c ${etags_deps} ebrowse${EXEEXT}: ${srcdir}/ebrowse.c ${srcdir}/../lib/min-max.h $(NTLIB) \ $(config_h) $(AM_V_CCLD)$(CC) ${ALL_CFLAGS} -DVERSION="\"${version}\"" \ - $< $(LOADLIBES) $(NTLIB) -o $@ + $< $(NTLIB) $(LOADLIBES) -o $@ profile${EXEEXT}: ${srcdir}/profile.c $(NTLIB) $(config_h) $(AM_V_CCLD)$(CC) ${ALL_CFLAGS} $< \ - $(LOADLIBES) $(NTLIB) $(LIB_CLOCK_GETTIME) -o $@ + $(NTLIB) $(LOADLIBES) $(LIB_CLOCK_GETTIME) -o $@ make-docfile${EXEEXT}: ${srcdir}/make-docfile.c $(NTLIB) $(config_h) - $(AM_V_CCLD)$(CC) ${ALL_CFLAGS} $< $(LOADLIBES) $(NTLIB) -o $@ + $(AM_V_CCLD)$(CC) ${ALL_CFLAGS} $< $(NTLIB) $(LOADLIBES) -o $@ movemail${EXEEXT}: ${srcdir}/movemail.c pop.o $(NTLIB) $(config_h) $(AM_V_CCLD)$(CC) ${ALL_CFLAGS} ${MOVE_FLAGS} $< pop.o \ - $(LOADLIBES) $(NTLIB) $(LIBS_MOVE) -o $@ + $(NTLIB) $(LOADLIBES) $(LIBS_MOVE) -o $@ pop.o: ${srcdir}/pop.c ${srcdir}/pop.h ${srcdir}/../lib/min-max.h $(config_h) $(AM_V_CC)$(CC) -c ${CPP_CFLAGS} ${MOVE_FLAGS} $< @@ -378,7 +378,7 @@ hexl${EXEEXT}: ${srcdir}/hexl.c $(NTLIB) $(config_h) update-game-score${EXEEXT}: ${srcdir}/update-game-score.c $(NTLIB) $(config_h) $(AM_V_CCLD)$(CC) ${ALL_CFLAGS} \ -DHAVE_SHARED_GAME_DIR="\"$(gamedir)\"" \ - $< $(LOADLIBES) $(NTLIB) -o $@ + $< $(NTLIB) $(LOADLIBES) -o $@ emacsclient.res: ../nt/emacsclient.rc $(NTINC)/../icons/emacs.ico $(WINDRES) -O coff --include-dir=$(NTINC)/.. -o $@ $< --------------000709050905020404090604--