APUE ld: arşiv, x86_64 mimarisi için '../lib/libapue.a' içindekiler dosyasına sahip değildir


0

APUE öğrenmeye ve kaynak kodu derlemeye başladım

1, kaynak kodunu Kaynak Kodundan indirir.

2, ayıklamak için

$ pwd
/Users/me/Desktop/PubRepo/C/APUE/apue.3e

3, readmd okumak

$ cat readme
Read the file called DISCLAIMER.

On Freebsd, type "gmake".
On other platforms, type "make" (as long as this is gnu make).

For FAQs, updated source code, and the lost chapter, see http://www.apuebook.com.
Please direct questions, suggestions, and bug reports to sar@apuebook.com.

Steve Rago
January 2013

makeVersiyonu kontrol ettim

$ make --version
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i386-apple-darwin11.3.0

4, ancak hata bildirme yapın:

gcc -ansi -I../include -Wall -DMACOS -D_DARWIN_C_SOURCE   -c -o sleep.o sleep.c
making intro
gcc -ansi -I../include -Wall -DMACOS -D_DARWIN_C_SOURCE  getcputc.c -o getcputc  -L../lib -lapue 
ld: archive has no table of contents file '../lib/libapue.a' for architecture x86_64
clang: error: unable to execute command: Segmentation fault: 11
clang: error: linker command failed due to signal (use -v to see invocation)
make[1]: *** [getcputc] Error 254
make: *** [all] Error 1

cp ./lib/error.c /usr/local/include/ $ Cp ./lib/error.c / usr / local / include / ' ı eklemek için cevabı aradım ve buldum.

temizle ve yap

making intro
gcc -ansi -I../include -Wall -DMACOS -D_DARWIN_C_SOURCE  getcputc.c -o getcputc  -L../lib -lapue 
ld: archive has no table of contents file '../lib/libapue.a' for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [getcputc] Error 1
make: *** [all] Error 1

Hata hala orada.

Nasıl başvurabilirim apue.h?


MacOS ve Xcode'un hangi sürümü var? (Sierra / kod 8 için çalışıyor) herhangi bir kanal olmadan değişiklikleri nereden aldınız?
Mark

macOS Mojave ve Xcode olmadan en son komut satırı. @Mark
Cebir
Sitemizi kullandığınızda şunları okuyup anladığınızı kabul etmiş olursunuz: Çerez Politikası ve Gizlilik Politikası.
Licensed under cc by-sa 3.0 with attribution required.