Thread View: pl.comp.lang.pascal
3 messages
3 total messages
Started by Terrmit
Mon, 31 Dec 2007 22:33
[Lazarus] Instalacja komponentu CurlPas
Author: Terrmit
Date: Mon, 31 Dec 2007 22:33
Date: Mon, 31 Dec 2007 22:33
64 lines
3801 bytes
3801 bytes
Witam,
Trochę pomęczyłem instalację CurlPas w Lazarusie, więc
chciałem podzielić się swoimi doświadczeniami.
Komponent pobrałem z:
http://sourceforge.net/project/showfiles.php?group_id=150871
Niestety ostatnia wersja jest z dnia 05.11.2005, a więc dość leciwa.
Podczas instalacji pakietu w lazarusie trzeba dodać wymóg LCL,
gdyż inaczej woła o LResources:
Can't find unit LResources
potem przy kompilacji wywala jeszcze błędy:
<errors>
ocurlacc.inc(24,20) Error: Illegal type conversion: "ShortString" to "^Char"
ocurlacc.inc(24,45) Warning: Local variable "R" does not seem to be
initialized
ocurlacc.inc(24,78) Error: Illegal type conversion: "ShortString" to "^Char"
ocurlacc.inc(32,14) Error: Illegal type conversion: "ShortString" to "^Char"
ocurlacc.inc(32,63) Warning: Local variable "R" does not seem to be
initialized
ocurlacc.inc(42,16) Error: Illegal type conversion: "ShortString" to "^Char"
ocurlacc.inc(43,19) Warning: Local variable "R" does not seem to be
initialized
ocurlacc.inc(43,52) Error: Illegal type conversion: "ShortString" to "^Char"
ocurlacc.inc(45,19) Error: Illegal type conversion: "ShortString" to "^Char"
ocurlacc.inc(47,23) Error: Illegal type conversion: "ShortString" to "^Char"
ocurlacc.inc(47,81) Error: Illegal type conversion: "ShortString" to "^Char"
ocurlcll.inc(27,37) Error: Illegal type conversion: "ShortString" to "^Char"
ocurlcll.inc(31,17) Error: Illegal type conversion: "ShortString" to "^Char"
ocurlcll.inc(132,22) Error: Illegal type conversion: "ShortString" to
"^Char"
ocurlcb2.inc(30,69) Error: Wrong type "TCurl" in array constructor
ocurlcb2.inc(93,65) Error: Wrong type "TCurl" in array constructor
ocurlcb2.inc(164,26) Error: Illegal type conversion: "ShortString" to
"^Char"
ocurlset.inc(11,64) Error: Illegal type conversion: "ShortString" to "^Char"
ocurlset.inc(19,21) Error: Illegal type conversion: "ShortString" to "^Char"
ocurlget.inc(8,24) Error: Call by var for arg no. 1 has to match
exactly: Got "ShortString" expected "WideString"
</errors>
Z błędami Illegal type conversion: "ShortString" to "^Char"
można sobie poradzić dopisując dyrektywę:
{$IFDEF FPC}{$mode objfpc}{$H+}{$ENDIF}
na początku pliku ocurlacc.inc.
Błąd Wrong type "TCurl" in array constructor
występuje np. w linii:
SetResultCode(curl_easy_setopt(fCurl, CURLOPT_PROGRESSDATA, Self),
CURLOPT_PROGRESSDATA);
Odnosi się on do słowa Self.
Zamieniamy w funkcjach curl_easy_setopt słowo Self na Pointer(Self)
w pliku ocurlcb2.inc oraz ocurlini.inc (w sumie 3 miejsca)
Teraz kompilacja pakietu powinna się udać. Po zainstalowaniu komponentu
polecam uruchomić demo curldemo.lpi znajdujące się w katalogu /gui/
W komponencie memo powinien pojawić się tekst dokumentu ze wskazanej
strony.
Pozdrawiam,
Sławek
P.S. Instalacja robiona była w Lazarusie 0.9.25 beta SVN Revision: 13549
FreePascal 2.2.0-0, Libcurl-7.17.1-1, w systemie Fedora 8.
Re: [Lazarus] Instalacja komponentu CurlPas
Author: Solaris
Date: Tue, 01 Jan 2008 18:05
Date: Tue, 01 Jan 2008 18:05
15 lines
1252 bytes
1252 bytes
Dnia Mon, 31 Dec 2007 23:33:37 +0100, jakże pięknego Terrmit <terrmitv@poczta.onet.pl> wystukał co zawarte poniżej: : Witam, : : Trochę pomęczyłem instalację CurlPas w Lazarusie, więc ... Rozumiem, że sylwestra spędziłeś z Lazarusem? ;) -- Home: admin.idns.pl Linux registered user: 408584 Contact: GG#44450, solaris#idns.pl 19:16:28 -!- Platyna Erroneous Nickname
Re: [Lazarus] Instalacja komponentu CurlPas
Author: Terrmit
Date: Tue, 01 Jan 2008 20:09
Date: Tue, 01 Jan 2008 20:09
6 lines
1071 bytes
1071 bytes
Solaris pisze: > Rozumiem, że sylwestra spędziłeś z Lazarusem? ;) > Tak jakoś wyszło :) Wszystkiego Najlepszego w Nowym Roku!
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads