Is libcurl ready to use lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- Goodman H__ · 2013-09-03 07:31 Greetings to everybody here! Could be a silly question.But I failed to compile the exampe program under \lazarus\fpc\2.7.1\source\packages\libcurl\examples\testcurl.pp I got an error something like : Code: [Select] cant' find unixtypeWhen I tried to add unit unixtype to the projecct ,it complained again: Code: [Select] could not find ptypes.inc I stopped.I think this coul not work. Is there anything I missed? God,I was always encountering such issues that the project(compiler)can't find some unit ,I can search them in some folders and added them into the project by Project->Options->Paths.But to be honest,I don't quite understand 'Other unit files','Include Files','Libraries',to which I should add the file (In C/C++ I know whether a header file ,source file(s) or a lib file is missed.).So sometimes it works,sometimes the compiler still complains after I feed the files to the project. Help would be much appreicated. Regards, Sam ---------------------------------------------------------------------- marcov · 2013-09-03 08:18 Those are unix libs, IOW the header is simply not supported for Windows.  Libcurl is quite unix centric, and people on Windows usually use a socket suite(Indy, Synapse) or something from the wininet api/unit. (which has FTP and http methods that also honor systemwide configured proxies) Moreover, there is no "one" C compiler on Windows, so there could be up to 4 different libcurls in common use (cygwin or mingw could also be static, and MSVC, BCB in DLL form) ---------------------------------------------------------------------- Goodman H__ · 2013-09-03 09:35 Quote from: marcov on September 03, 2013, 10:18:30 amThose are unix libs, IOW the header is simply not supported for Windows.  Libcurl is quite unix centric, and people on Windows usually use a socket suite(Indy, Synapse) or something from the wininet api/unit. (which has FTP and http methods that also honor systemwide configured proxies) Moreover, there is no "one" C compiler on Windows, so there could be up to 4 different libcurls in common use (cygwin or mingw could also be static, and MSVC, BCB in DLL form) Got it.Thanks.May I know what's the best recommendation of a crossplatform library in freepascal/Lazarus then? ---------------------------------------------------------------------- BigChimp · 2013-09-03 09:42 Would be nice to patch it with note in the source that the program is unix only just to make it clear. http://bugs.freepascal.org/view.php?id=24948 ---------------------------------------------------------------------- BigChimp · 2013-09-03 09:44 Quote from: Goodman H__ on September 03, 2013, 11:35:58 amMay I know what's the best recommendation of a crossplatform library in freepascal/Lazarus then? I think that differs for each programmer. I find Synapse quite workable; e.g. http://wiki.lazarus.freepascal.org/synapse#From_an_HTTP_server AFAIR, Synapse also has proxy support, but haven't used it... ---------------------------------------------------------------------- Goodman H__ · 2013-09-03 10:15 Quote from: BigChimp on September 03, 2013, 11:44:13 amQuote from: Goodman H__ on September 03, 2013, 11:35:58 amMay I know what's the best recommendation of a crossplatform library in freepascal/Lazarus then? I think that differs for each programmer. I find Synapse quite workable; e.g. http://wiki.lazarus.freepascal.org/synapse#From_an_HTTP_server AFAIR, Synapse also has proxy support, but haven't used it... Sorry,do you mean Synapse is cross-platform,both for win* and *nix?Thanks. ---------------------------------------------------------------------- BigChimp · 2013-09-03 10:19 Yes, I do mean Synapse is cross-platform. Have run it e.g. on Windows and Linux. ---------------------------------------------------------------------- Leledumbo · 2013-09-03 15:15 Synapse for code oriented (though there's visual synapse, but I don't know its state), lnet for component based or just use fcl-web (not as complete as others AFAIK, but should be enough for most usage and has a better future support since it's officially part of fpc). All of them are cross platform. ---------------------------------------------------------------------- Goodman H__ · 2013-09-14 12:51 Thank you all! ---------------------------------------------------------------------- tianya · 2017-08-11 15:13 Quote from: Leledumbo on September 03, 2013, 05:15:13 pmSynapse for code oriented (though there's visual synapse, but I don't know its state), lnet for component based or just use fcl-web (not as complete as others AFAIK, but should be enough for most usage and has a better future support since it's officially part of fpc). All of them are cross platform. I'm Sorry,In windows 32bit system,In the 'C:\lazarus\fpc\3.0.2\units\i386-win32',I cant find libcurl,how can i build it?