Jump to content

Witaj!

Zaloguj lub Zarejestruj się aby uzyskać pełny dostęp do forum.

Photo
- - - - -

Free Pascal / Lazarus błąd podczas kompilacji


  • Please log in to reply
6 replies to this topic

#1 michalp92

michalp92
  • 5 posts

Posted 25 November 2021 - 18:05

Cześć. Mam taki problem:

Chciałem się pobawić Pascalem/Delphi. Tak wiem stary język programowania, ale że wieczory długie, to chciałem sobie przypomnieć stare "dobre" czasy. Zainstalowałem kompilator ze strony freepascal.org, ale podczas kompilacji (a właściwie już linkowania) wyskakuje błąd: 

air-micha:Testy michalpolak$ fpc test.pas
Free Pascal Compiler version 3.2.0 [2020/05/31] for x86_64
Copyright (c) 1993-2020 by Florian Klaempfl and others
Target OS: Darwin for x86_64
Compiling test.pas
Assembling (pipe) test.s
Linking test
ld: library not found for -lc
An error occurred while linking 
test.pas(4,21) Error: Error while linking
test.pas(4,21) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Error: /usr/local/bin/ppcx64 returned an error exitcode

Podobnie jest na Lazarusie. Ktoś pomoże? Chciałbym go uruchomić, co prawda mógłbym na Windowsie to zrobić, ale nie po to pogniewałem się na "10" żeby teraz się z nią przepraszać.

 

Bardzo proszę o jakąś pomoc.



#2 DanielF

DanielF
  • 5726 posts
  • SkądSiedlce

Posted 25 November 2021 - 18:27

https://medium.com/@...ra-c40706e86fda


Fallout ...war, war never changes...

#3 michalp92

michalp92
  • 5 posts

Posted 27 November 2021 - 18:19

Last login: Sat Nov 27 18:16:50 on ttys001

The default interactive shell is now zsh.
To update your account to use zsh, please run `chsh -s /bin/zsh`.
For more details, please visit https://support.apple.com/kb/HT208050.
air-micha:Testy michalpolak$ MACOSX_DEPLOYMENT_TARGET=10.12 fpc test.pas
Free Pascal Compiler version 3.2.0 [2020/05/31] for x86_64
Copyright (c) 1993-2020 by Florian Klaempfl and others
Target OS: Darwin for x86_64
Compiling test.pas
Assembling (pipe) test.s
Linking test
ld: library not found for -lc
An error occurred while linking 
test.pas(4,21) Error: Error while linking
test.pas(4,21) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Error: /usr/local/bin/ppcx64 returned an error exitcode
air-micha:Testy michalpolak$ 

Albo ja coś robię źle, albo to niestety nie działa.



#4 ftpd

ftpd

    Nie.


  • 23821 posts
  • Płeć:
  • SkądPoznań

Posted 27 November 2021 - 23:24

Ale dlaczego ustawiasz Sierrę?

Nie przepisuj rozwiązań na ślepo, pomyśl, co one robią. Nie masz macOS 10.12, prawda?


Używaj przycisku 'Zgłoś', zamiast edytować post i pisać w nim, na przykład, "do usunięcia".
Pisanie prywatnej wiadomości do moderatora powinno być ostatecznością. Do tego też służy przycisk 'Zgłoś'.
Do płaczu na pracę Moderacji służy ten wątek. Inne formy będą bezwzględnie kasowane.


#5 michalp92

michalp92
  • 5 posts

Posted 28 November 2021 - 18:32

Wpisanie "11.6" (mam 11.6.1) nic nie daje:

Last login: Sun Nov 28 13:34:24 on console

The default interactive shell is now zsh.
To update your account to use zsh, please run `chsh -s /bin/zsh`.
For more details, please visit https://support.apple.com/kb/HT208050.
macbook-air-micha:~ michalpolak$ cd Documents/Testy
macbook-air-micha:Testy michalpolak$ ls
HTML		link.res	ppaslink.sh	test.o
index.html	linkfiles.res	swift_nauka	test.pas
macbook-air-micha:Testy michalpolak$ MACOSX_DEPLOYMENT_TARGET=11.6 fpc test.pas
Free Pascal Compiler version 3.2.0 [2020/05/31] for x86_64
Copyright (c) 1993-2020 by Florian Klaempfl and others
Target OS: Darwin for x86_64
Compiling test.pas
Assembling (pipe) test.s
Linking test
ld: library not found for -lc
An error occurred while linking 
test.pas(4,21) Error: Error while linking
test.pas(4,21) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Error: /usr/local/bin/ppcx64 returned an error exitcode
macbook-air-micha:Testy michalpolak$ 



#6 DanielF

DanielF
  • 5726 posts
  • SkądSiedlce

Posted 28 November 2021 - 19:17

A masz xcode doinstalowane?

https://www.youtube....h?v=qhroej-cR7k


Edited by DanielF, 28 November 2021 - 19:18.

Fallout ...war, war never changes...

#7 michalp92

michalp92
  • 5 posts

Posted 01 December 2021 - 18:53

Mam Xcode i doinstalowywałem jeszcze po instalacji kompilatora Pascala jakiś dodatkowy pakiet chyba bibliotek, poleceniem "xcode-select --install".






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users