c++builder - Casablanca - REST C++ SDK, used in Embarcadero RAD Studio XE5 -
i need http in rad studio xe5 c++. tutorials on rad studio site discuss restclient not included version have. found casablanca project, visual studio, , made small program in vs simple http , handles response in way need.
what need use casablanca within rad studio?
there steps have taken far.
- compiled casablanca in visual studio 2013
 - copied .lib , .dll on folder in rad studio project
 - added folder link path in rad studio project
 - added .lib project
 - added dll imports classes should in .lib .cpp want use function in.
 
class __declspec(dllimport) http_client; class __declspec(dllimport) filestream;  class __declspec(dllimport) producerconsumerstream;  class __declspec(dllimport) rawptrstream;    - there omf error, , used tool came rad studio convert .lib, got past error.
 
i don't know how declare dll prototype's of functions, because returns types namespace in library aren't recognized. http_client unrecognized structure.
i tried without class keyword.
dlls export classes not portable across compilers. not able use visual studio compiled dll in c++builder if exports classes. either flatten dll interface export plain c-style functions instead (and use c++builder's command-line implib tool create import .lib file dll, not use .lib file created visual studio), or else find solution.
for instance, c++builder (and delphi) ships indy 10, has tidhttp component.  can use tidhttp::get() method perform http get request.  if need use rest, might better off upgrading xe5 version has trestclient available (btw, embarcadero's rest classes use indy internally). 
Comments
Post a Comment