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.

  1. compiled casablanca in visual studio 2013
  2. copied .lib , .dll on folder in rad studio project
  3. added folder link path in rad studio project
  4. added .lib project
  5. 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;  

  1. 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

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -