0 / 0 / 0
Регистрация: 18.08.2018
Сообщений: 11
1
24.11.2019, 05:13. Показов 4396. Ответов 2
Тема лабки: Динамические структуры данных
Задача: создать массив, состоящий из элементов, расчитаных по формуле x[i] = sin(i/(i^2 + 1)). Заполнение массива, вывод, а также подсчёт количества элементов (с выводом их на экран), имеющих значение выше 0, и тех, у которых значение ниже 0, в отдельных подпрограммахж
Когда run-ил, выскочили ошибки: «type identifier expected», «syntax error, «)» expected but «const char» found» на знаке «^» в 9-ой строчке. Думу думаю, да никак не вдумаю. Памагити
Pascal | ||
|
… пожалуйста
__________________
Помощь в написании контрольных, курсовых и дипломных работ, диссертаций здесь
0
|
|
|
Дата следующего дня
- Подписаться на тему
- Сообщить другу
- Скачать/распечатать тему
|
|
Пишу программу, опрeдeляющую дaту слeдующeго дня. Ceгoдняшняя дата вводится с клавиатуры. var d, m, y, d1, m1, y1, r: integer; last: boolean; BEGIN {Ввод данных добавлю позже} last:=false; case m of 4, 6, 9, 11: if d=30 then last:=true; 2: if d=28 then begin r:=y mod 4; if r <> 0 then last:=true; end; else if d=31 then last=true; end; if last then begin d:=1; if m=12 then begin m:=1; y1:=y+1; end else m1:=m+1; end else d1:=d+1; END. Free Pascal v2.4.0 при компиляции выдает ошибку: «Error Illegal expression». Помогите исправить. В алгоритме нет ошибок? |
Polinom2686 |
|
Senior Member Рейтинг (т): 13 |
Var d, m, y, d1, m1, y1, r: integer; last: boolean; BEGIN {Ввод данных добавлю позже} last:=false; case m of 4, 6, 9, 11: if d=30 then last:=true; 2: if d=28 then begin r:=y mod 4; if r <> 0 then last:=true; end; else if d=31 then last=true; // тут ошибка end; if last then begin d:=1; if m=12 then begin m:=1; y1:=y+1; end else m1:=m+1; end else d1:=d+1; END. |
Yagami |
|
Polinom2686 |
volvo877 |
|
Moderator Рейтинг (т): 878 |
Цитата Yagami @ 30.10.10, 09:59 Можно решить задачу используя перечислимые и интервальные типы? Разумеется. Для дней достаточно интервала 1..31, для месяцев — 1..12 (или вообще сделать перечислимый тип Jan, Feb, …, Dec), совсем не обязательно использовать Integer. P.S. Цитата Polinom2686 @ 30.10.10, 09:25 r:=y mod 4; if r <> 0 then last:=true; Этого недостаточно, чтобы определить високосность года: Является-ли год високосный ? (сообщение #580679) |
Polinom2686 |
|
Senior Member Рейтинг (т): 13 |
Yagami, ты смотри на сообщения компилятора, он показывает место ошибки. |
Yagami |
|
volvo877 var y, y1, r: integer; d, d1: 1..31; m, m1: 1..12; last: boolean; BEGIN Writeln(‘Ввод даты: ‘); read(d); last:=false; case m of 4, 6, 9, 11: if d=30 then last:=true; 2: if d=28 then begin r := (y mod 4) = 0) and not (((n mod 100) = 0) and ((n mod 400) <> 0) then last:=true; end; else if d=31 then last:=true; end; if last then begin d:=1; if m=12 then begin m:=1; y1:=y+1; end else m1:=m+1; end else d1:=d+1; END. Компилятор сообщает об ошибке: «(26,35) Error: Incompatible types: got «Boolean» expected «SmallInt».» |
volvo877 |
|
Moderator Рейтинг (т): 878 |
if ((y mod 4) = 0) and not (((y mod 100) = 0) and ((y mod 400) <> 0)) then last := true; Красным выделены места ошибок. По ссылке же было правильное написание, ЗАЧЕМ понадобилось убирать скобки? |
Yagami |
|
volvo877 Сообщение отредактировано: Yagami — 31.10.10, 07:39 |
Yagami |
|
Дописал проверку введенных данных, опять появились ошибки. BEGIN Write(‘Введите день, месяц, год, разделяя пробелами: ‘); {$I-} read(d, m, y); {$I+} if IOResult <> 0 then begin writeln(‘Вы не ввели три числа. Повторите ввод.’); reset(input); readln; exit; end; if (d<1) or (d>31) then begin writeln(‘Ошибка ввода. Введите день (1-31)’); reset(input); readln; exit; end; if (m<1) or (m>12) then begin writeln(‘Ошибка ввода. Введите месяц (1-12)’); readln; exit; end; if y<1 then begin writeln(‘Ошибка ввода. Год не долшен быть меньше 1.’); reset(input); readln; exit; end; (74,20) Fatal: Syntax error, «)» expected but «const char» found Сообщение отредактировано: Yagami — 03.11.10, 10:30 |
volvo877 |
|
Moderator Рейтинг (т): 878 |
Телепаты в отпуске. Либо приводи код полностью, либо ищи ошибки сам. В приведенном фрагменте всего 32 строки, какая из них 74-я? |
Yagami |
|
program NextDay; uses crt; var y, y1, r: integer; d, d1: 1..31; m, m1: 1..12; last: boolean; BEGIN Write(‘Введите день, месяц, год, разделяя пробелами: ‘); {$I-} read(d, m, y); {$I+} if IOResult <> 0 then begin writeln(‘Вы не ввели три числа. Повторите ввод.’); reset(input); readln; exit; end; if (d<1) or (d>31) then begin writeln(‘Ошибка ввода. Введите день (1-31)’); reset(input); readln; exit; end; if (m<1) or (m>12) then begin writeln(‘Ошибка ввода. Введите месяц (1-12)’); readln; exit; end; if y<1 then begin writeln(‘Ошибка ввода. Год не долшен быть меньше 1.’); reset(input); readln; exit; end; last:=false; case m of 4, 6, 9, 11: if d=30 then last:=true; 2: if d=28 then begin if ((y mod 4) = 0) and not (((y mod 100) = 0) and ((y mod 400) <> 0)) then last:=true; end; else if d=31 then last:=true; end; if last then begin d:=1; if m=12 then begin m:=1; y1:=y+1; end else m1:=m+1; end else d1:=d+1; writeln(‘Следующий день: ‘); writeln(d1′,’, m1′,’, y1′,’); END. Сообщение отредактировано: Yagami — 03.11.10, 10:38 |
volvo877 |
|
Moderator Рейтинг (т): 878 |
Цитата Yagami @ 03.11.10, 10:35 writeln(d1, ‘,’, m1, ‘,’, y1); У тебя этих запятых (разделяющих строки и числа) не было, были только строковые литералы для вывода запятой на экран. |
Yagami |
|
Исправил, спасибо. Почему-то выводит только день, а месяц и год — 0, 0. |
volvo877 |
|
Moderator Рейтинг (т): 878 |
Потому что: Цитата if last then begin d:=1; if m=12 then begin m:=1; y1:=y+1; end else m1:=m+1; end else d1:=d+1; И что? Ну, допустим, при Last = true в Y1 что-то хотя бы теоретически может записаться (правда произойдет это только если месяц = декабрь, и должен меняться год, но хоть когда-то). Но если Last = False — то даже теоретически этого не произойдет. У тебя по Else просто нет кода, изменяющего Y1 и M1. Выходов 2: Выбирать тебе. |
Yagami |
|
volvo877 Сообщение отредактировано: Yagami — 14.11.10, 20:06 |
0 пользователей читают эту тему (0 гостей и 0 скрытых пользователей)
0 пользователей:
- Предыдущая тема
- Pascal
- Следующая тема
[ Script execution time: 0,0449 ] [ 15 queries used ] [ Generated: 12.02.23, 18:39 GMT ]
Topic: FPC 3.2.0 or Higher on OpenBSD and Solaris (Read 9158 times)
Hi all.
Is anyone willing to help me test some codes in the following compilers and OSes?
FPC 3.2.0 or trunk, OpenBSD and Solaris.
Thanks a lot. Anticipating your responses.
Logged
julkas
@Xor-el can you give more details about your code? Hardware requirements if any. VM or host OS? Thanks.
Logged
@Xor-el can you give more details about your code? Hardware requirements if any. VM or host OS? Thanks.
@julkas, first of all, thanks for replying. I was starting to think that no one was willing to help.
well, the code in question is just Unit Tests for a Library I have been working on for sometime.
below are the supported operating systems.
Windows => Tested Compiler => FPC and Delphi => Test Level => Very Extensive
Linux => Tested Compiler => FPC => Test Level => Very Extensive
(No access to Delphi Linux Compiler)
Android => Tested Compiler => Delphi => Test Level => Very Extensive
(No access to FPC Android Compiler)
Raspberry PI => Tested Compiler => FPC => Test Level => Very Limited
Mac OS X => Tested Compiler => FPC and Delphi => Test Level => Very Limited
iOS => Tested Compiler => Delphi => Test Level => Very Limited
FreeBSD, NetBSD, OpenBSD, DragonBSD => Tested Compiler => FPC => Test Level => Untested (No access to the specified Oses)
Solaris => Tested Compiler => FPC => Test Level => Untested (No access to the specified Os)
Hardware/ software Requirements, none to be exact just a modern version of these operating systems.
Compiler versions needed: FPC 3.2.0 or greater.
you can find the library and it’s respective unit tests here
https://github.com/Xor-el/CryptoLib4Pascal
It’s dependencies can be found in the README.
It will be very much appreciated if anyone can help run tests on those operating systems where limited or no testing has been done.
« Last Edit: July 05, 2019, 03:03:54 am by Xor-el »
Logged
julkas
Hardware/ software Requirements, none to be exact just a modern version of these operating systems.
So, testing in VM (e.g OpenBSD on Windows 8 host) is OK?
Logged
Hardware/ software Requirements, none to be exact just a modern version of these operating systems.
So, testing in VM (e.g OpenBSD on Windows 8 host) is OK?
Yes, very ok.
Logged
Logged
julkas
I am planning make tests on FreeBSD 12 VM first.
I will provide additional information about VM and Host CPU, Memory, …
Regards.
Testing requirements:
Compiler — FPC 3.2.0
Software deps — HashLib4Pascal, SimpleBaseLib4Pascal.
Please confirm.
« Last Edit: July 06, 2019, 10:56:52 am by julkas »
Logged
Testing requirements:
Compiler — FPC 3.2.0
Software deps — HashLib4Pascal, SimpleBaseLib4Pascal.
Please confirm.
yes and thanks once again.
Logged
julkas
Xor-el I cloned your repos from GitHub
-
root@freebsd:~/bench# ls -al
-
total 20
-
drwxr-xr-x 5 root wheel 512 Jul 8 09:01 .
-
drwxr-xr-x 7 root wheel 512 Jul 8 08:56 ..
-
drwxr-xr-x 7 root wheel 512 Jul 8 09:01 CryptoLib4Pascal
-
drwxr-xr-x 7 root wheel 512 Jul 8 09:00 HashLib4Pascal
-
drwxr-xr-x 7 root wheel 512 Jul 8 09:00 SimpleBaseLib4Pascal
Output from FPC
-
root@freebsd:~# fpc fpt.pas
-
Free Pascal Compiler version 3.2.0-beta [2019/06/19] for x86_64
-
Copyright (c) 1993-2018 by Florian Klaempfl and others
-
Target OS: FreeBSD for x86-64
-
Compiling fpt.pas
-
Linking fpt
-
5 lines compiled, 0.2 sec
Output from dmesg
-
Copyright (c) 1992-2018 The FreeBSD Project.
-
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
-
The Regents of the University of California. All rights reserved.
-
FreeBSD is a registered trademark of The FreeBSD Foundation.
-
FreeBSD 12.0-RELEASE r341666 GENERIC amd64
-
FreeBSD clang version 6.0.1 (tags/RELEASE_601/final 335540) (based on LLVM 6.0.1)
-
VT(vga): text 80×25
-
Hyper-V Version: 6.3.9600 [SP19]
-
Features=0xe7f<VPRUNTIME,TMREFCNT,SYNIC,SYNTM,APIC,HYPERCALL,VPINDEX,REFTSC,IDLE,TMFREQ>
-
PM Features=0x0 [C2]
-
Features3=0x17b2<DEBUG,XMMHC,IDLE,NUMA,TMFREQ,SYNCMC,CRASH,NPIEP>
-
Timecounter «Hyper-V» frequency 10000000 Hz quality 2000
-
CPU: Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz (3591.69-MHz K8-class CPU)
-
Origin=»GenuineIntel» Id=0x306c3 Family=0x6 Model=0x3c Stepping=3
-
Features=0xf83fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE,SSE2,SS>
-
Features2=0xfeda3203<SSE3,PCLMULQDQ,SSSE3,FMA,CX16,PCID,SSE4.1,SSE4.2,MOVBE,POPCNT,AESNI,XSAVE,OSXSAVE,AVX,F16C,RDRAND,HV>
-
AMD Features=0x20100800<SYSCALL,NX,LM>
-
AMD Features2=0x21<LAHF,ABM>
-
Structured Extended Features=0x27a9<FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,NFPUSG>
-
XSAVE Features=0x1<XSAVEOPT>
-
Hypervisor: Origin = «Microsoft Hv»
-
real memory = 4294967296 (4096 MB)
-
avail memory = 4123271168 (3932 MB)
give me further instructions, please.
Logged
give me further instructions, please.
Guess you should try to run the tests (CryptoLib4Pascal/CryptoLib.Tests) like FreePascal.Tests/CryptoLibConsole.lpr
Logged
« Last Edit: July 08, 2019, 02:27:28 pm by Xor-el »
Logged
julkas
Hello @Xor-el
I have compilation error. Here is compiler output. Any idea ?
-
Free Pascal Compiler version 3.2.0-beta [2019/06/19] for x86_64
-
Copyright (c) 1993-2018 by Florian Klaempfl and others
-
Target OS: FreeBSD for x86-64
-
Compiling CryptoLibConsole.lpr
-
Compiling /root/bench/CryptoLib4Pascal/CryptoLib.Tests/src/Asn1/Asn1SequenceParserTests.pas
-
Compiling /root/bench/CryptoLib4Pascal/CryptoLib/src/Math/ClpBigInteger.pas
-
Compiling /root/bench/CryptoLib4Pascal/CryptoLib/src/Security/ClpSecureRandom.pas
-
Compiling /root/bench/CryptoLib4Pascal/CryptoLib/src/Security/ClpDigestUtilities.pas
-
Compiling /root/bench/CryptoLib4Pascal/CryptoLib/src/Asn1/Pkcs/ClpPkcsObjectIdentifiers.pas
-
Compiling /root/bench/CryptoLib4Pascal/CryptoLib/src/Asn1/ClpAsn1Objects.pas
-
Compiling /root/bench/CryptoLib4Pascal/CryptoLib/src/Utils/Encoders/ClpEncoders.pas
-
Compiling /root/bench/SimpleBaseLib4Pascal/SimpleBaseLib/src/Bases/SbpBase16.pas
-
Compiling /root/bench/SimpleBaseLib4Pascal/SimpleBaseLib/src/Utils/SbpSimpleBaseLibTypes.pas
-
Compiling /root/bench/SimpleBaseLib4Pascal/SimpleBaseLib/src/Utils/SbpUtilities.pas
-
Writing Resource String Table file: SbpBase16.rsj
-
Compiling /root/bench/SimpleBaseLib4Pascal/SimpleBaseLib/src/Bases/SbpBase58.pas
-
Compiling /root/bench/SimpleBaseLib4Pascal/SimpleBaseLib/src/Bases/SbpBase58Alphabet.pas
-
Compiling /root/bench/SimpleBaseLib4Pascal/SimpleBaseLib/src/Bases/SbpEncodingAlphabet.pas
-
Compiling /root/bench/SimpleBaseLib4Pascal/SimpleBaseLib/src/Interfaces/SbpIEncodingAlphabet.pas
-
Writing Resource String Table file: SbpEncodingAlphabet.rsj
-
Compiling /root/bench/SimpleBaseLib4Pascal/SimpleBaseLib/src/Interfaces/SbpIBase58Alphabet.pas
-
Compiling /root/bench/SimpleBaseLib4Pascal/SimpleBaseLib/src/Interfaces/SbpIBase58.pas
-
Writing Resource String Table file: SbpBase58.rsj
-
Compiling /root/bench/SimpleBaseLib4Pascal/SimpleBaseLib/src/Bases/SbpBase64.pas
-
Compiling /root/bench/SimpleBaseLib4Pascal/SimpleBaseLib/src/Utils/SbpBits.pas
-
Compiling /root/bench/SimpleBaseLib4Pascal/SimpleBaseLib/src/Bases/SbpBase64Alphabet.pas
-
Compiling /root/bench/SimpleBaseLib4Pascal/SimpleBaseLib/src/Interfaces/SbpIBase64Alphabet.pas
-
Compiling /root/bench/SimpleBaseLib4Pascal/SimpleBaseLib/src/Interfaces/SbpIBase64.pas
-
Writing Resource String Table file: SbpBase64.rsj
-
Compiling /root/bench/CryptoLib4Pascal/CryptoLib/src/Utils/ClpStringUtils.pas
-
Compiling /root/bench/CryptoLib4Pascal/CryptoLib/src/Utils/ClpConverters.pas
-
Compiling /root/bench/CryptoLib4Pascal/CryptoLib/src/Utils/ClpBitConverter.pas
-
Writing Resource String Table file: ClpConverters.rsj
-
Compiling /root/bench/CryptoLib4Pascal/CryptoLib/src/Interfaces/ClpIAsn1Objects.pas
-
Compiling /root/bench/CryptoLib4Pascal/CryptoLib/src/Asn1/ClpOidTokenizer.pas
-
Compiling /root/bench/CryptoLib4Pascal/CryptoLib/src/Interfaces/ClpIOidTokenizer.pas
-
Writing Resource String Table file: ClpAsn1Objects.rsj
-
Compiling /root/bench/CryptoLib4Pascal/CryptoLib/src/Asn1/RossStandart/ClpRosstandartObjectIdentifiers.pas
-
Compiling /root/bench/CryptoLib4Pascal/CryptoLib/src/Asn1/Oiw/ClpOiwObjectIdentifiers.pas
-
Compiling /root/bench/CryptoLib4Pascal/CryptoLib/src/Asn1/Nist/ClpNistObjectIdentifiers.pas
-
Compiling /root/bench/CryptoLib4Pascal/CryptoLib/src/Asn1/Misc/ClpMiscObjectIdentifiers.pas
-
Compiling /root/bench/CryptoLib4Pascal/CryptoLib/src/Asn1/TeleTrust/ClpTeleTrusTObjectIdentifiers.pas
-
Compiling /root/bench/CryptoLib4Pascal/CryptoLib/src/Asn1/CryptoPro/ClpCryptoProObjectIdentifiers.pas
-
Writing Resource String Table file: ClpDigestUtilities.rsj
-
Compiling /root/bench/CryptoLib4Pascal/CryptoLib/src/Crypto/Prng/ClpCryptoApiRandomGenerator.pas
-
Compiling /root/bench/CryptoLib4Pascal/CryptoLib/src/Interfaces/ClpIRandomNumberGenerator.pas
-
Compiling /root/bench/CryptoLib4Pascal/CryptoLib/src/Utils/Rng/ClpRandomNumberGenerator.pas
-
Compiling /root/bench/CryptoLib4Pascal/CryptoLib/src/Utils/Randoms/ClpOSRandom.pas
-
ClpOSRandom.pas(328,1) Fatal: Syntax error, «IMPLEMENTATION» expected but «const char» found
-
Fatal: Compilation aborted
-
Error: /usr/local/bin/ppcx64 returned an error exitcode
Logged
Hello @Xor-el
I have compilation error. Here is compiler output. Any idea ?
Free Pascal Compiler version 3.2.0-beta [2019/06/19] for x86_64
Copyright (c) 1993-2018 by Florian Klaempfl and others
Target OS: FreeBSD for x86-64
Compiling CryptoLibConsole.lpr
Compiling /root/bench/CryptoLib4Pascal/CryptoLib.Tests/src/Asn1/Asn1SequenceParserTests.pas
Compiling /root/bench/CryptoLib4Pascal/CryptoLib/src/Math/ClpBigInteger.pas
Compiling /root/bench/CryptoLib4Pascal/CryptoLib/src/Security/ClpSecureRandom.pas
Compiling /root/bench/CryptoLib4Pascal/CryptoLib/src/Security/ClpDigestUtilities.pas
Compiling /root/bench/CryptoLib4Pascal/CryptoLib/src/Asn1/Pkcs/ClpPkcsObjectIdentifiers.pas
Compiling /root/bench/CryptoLib4Pascal/CryptoLib/src/Asn1/ClpAsn1Objects.pas
Compiling /root/bench/CryptoLib4Pascal/CryptoLib/src/Utils/Encoders/ClpEncoders.pas
Compiling /root/bench/SimpleBaseLib4Pascal/SimpleBaseLib/src/Bases/SbpBase16.pas
Compiling /root/bench/SimpleBaseLib4Pascal/SimpleBaseLib/src/Utils/SbpSimpleBaseLibTypes.pas
Compiling /root/bench/SimpleBaseLib4Pascal/SimpleBaseLib/src/Utils/SbpUtilities.pas
Writing Resource String Table file: SbpBase16.rsj
Compiling /root/bench/SimpleBaseLib4Pascal/SimpleBaseLib/src/Bases/SbpBase58.pas
Compiling /root/bench/SimpleBaseLib4Pascal/SimpleBaseLib/src/Bases/SbpBase58Alphabet.pas
Compiling /root/bench/SimpleBaseLib4Pascal/SimpleBaseLib/src/Bases/SbpEncodingAlphabet.pas
Compiling /root/bench/SimpleBaseLib4Pascal/SimpleBaseLib/src/Interfaces/SbpIEncodingAlphabet.pas
Writing Resource String Table file: SbpEncodingAlphabet.rsj
Compiling /root/bench/SimpleBaseLib4Pascal/SimpleBaseLib/src/Interfaces/SbpIBase58Alphabet.pas
Compiling /root/bench/SimpleBaseLib4Pascal/SimpleBaseLib/src/Interfaces/SbpIBase58.pas
Writing Resource String Table file: SbpBase58.rsj
Compiling /root/bench/SimpleBaseLib4Pascal/SimpleBaseLib/src/Bases/SbpBase64.pas
Compiling /root/bench/SimpleBaseLib4Pascal/SimpleBaseLib/src/Utils/SbpBits.pas
Compiling /root/bench/SimpleBaseLib4Pascal/SimpleBaseLib/src/Bases/SbpBase64Alphabet.pas
Compiling /root/bench/SimpleBaseLib4Pascal/SimpleBaseLib/src/Interfaces/SbpIBase64Alphabet.pas
Compiling /root/bench/SimpleBaseLib4Pascal/SimpleBaseLib/src/Interfaces/SbpIBase64.pas
Writing Resource String Table file: SbpBase64.rsj
Compiling /root/bench/CryptoLib4Pascal/CryptoLib/src/Utils/ClpStringUtils.pas
Compiling /root/bench/CryptoLib4Pascal/CryptoLib/src/Utils/ClpConverters.pas
Compiling /root/bench/CryptoLib4Pascal/CryptoLib/src/Utils/ClpBitConverter.pas
Writing Resource String Table file: ClpConverters.rsj
Compiling /root/bench/CryptoLib4Pascal/CryptoLib/src/Interfaces/ClpIAsn1Objects.pas
Compiling /root/bench/CryptoLib4Pascal/CryptoLib/src/Asn1/ClpOidTokenizer.pas
Compiling /root/bench/CryptoLib4Pascal/CryptoLib/src/Interfaces/ClpIOidTokenizer.pas
Writing Resource String Table file: ClpAsn1Objects.rsj
Compiling /root/bench/CryptoLib4Pascal/CryptoLib/src/Asn1/RossStandart/ClpRosstandartObjectIdentifiers.pas
Compiling /root/bench/CryptoLib4Pascal/CryptoLib/src/Asn1/Oiw/ClpOiwObjectIdentifiers.pas
Compiling /root/bench/CryptoLib4Pascal/CryptoLib/src/Asn1/Nist/ClpNistObjectIdentifiers.pas
Compiling /root/bench/CryptoLib4Pascal/CryptoLib/src/Asn1/Misc/ClpMiscObjectIdentifiers.pas
Compiling /root/bench/CryptoLib4Pascal/CryptoLib/src/Asn1/TeleTrust/ClpTeleTrusTObjectIdentifiers.pas
Compiling /root/bench/CryptoLib4Pascal/CryptoLib/src/Asn1/CryptoPro/ClpCryptoProObjectIdentifiers.pas
Writing Resource String Table file: ClpDigestUtilities.rsj
Compiling /root/bench/CryptoLib4Pascal/CryptoLib/src/Crypto/Prng/ClpCryptoApiRandomGenerator.pas
Compiling /root/bench/CryptoLib4Pascal/CryptoLib/src/Interfaces/ClpIRandomNumberGenerator.pas
Compiling /root/bench/CryptoLib4Pascal/CryptoLib/src/Utils/Rng/ClpRandomNumberGenerator.pas
Compiling /root/bench/CryptoLib4Pascal/CryptoLib/src/Utils/Randoms/ClpOSRandom.pas
ClpOSRandom.pas(328,1) Fatal: Syntax error, «IMPLEMENTATION» expected but «const char» found
Fatal: Compilation aborted
Error: /usr/local/bin/ppcx64 returned an error exitcode
Hi @julkas, I just pushed a fix for the compilation error you are getting.
can you please pull the CryptoLib4Pascal Repo again or in your current source file, replace line 328, currently this
-
procedure arc4random_buf(bytes: PByte; count: LongWord); cdecl;
-
external; ‘c’ name ‘arc4random_buf’;
with this
-
procedure arc4random_buf(bytes: PByte; count: LongWord); cdecl;
-
external ‘c’ name ‘arc4random_buf’;
thanks.
Logged
julkas
Compiler output after pull. May be {$mode …} is missing ?
-
Compiling /root/bench/CryptoLib4Pascal/CryptoLib.Tests/src/CryptoLibTestBase.pas
-
CryptoLibTestBase.pas(23,24) Error: Identifier not found «class»
-
CryptoLibTestBase.pas(23,30) Error: Error in type definition
-
CryptoLibTestBase.pas(23,30) Fatal: Syntax error, «;» expected but «identifier ABSTRACT» found
-
Fatal: Compilation aborted
-
Error: /usr/local/bin/ppcx64 returned an error exitcode
« Last Edit: July 09, 2019, 10:22:00 am by julkas »
Logged
Compiler output after pull.
Compiling /root/bench/CryptoLib4Pascal/CryptoLib.Tests/src/CryptoLibTestBase.pas
CryptoLibTestBase.pas(23,24) Error: Identifier not found «class»
CryptoLibTestBase.pas(23,30) Error: Error in type definition
CryptoLibTestBase.pas(23,30) Fatal: Syntax error, «;» expected but «identifier ABSTRACT» found
Fatal: Compilation aborted
Error: /usr/local/bin/ppcx64 returned an error exitcode
Will look into the error you are getting now but can you please confirm that the CryptoLib4PascalPackage.lpk compiles fine?
Logged