Tutorial crashed on Linux

Apr 30, 2014 at 9:59 AM
Edited Apr 30, 2014 at 10:40 AM

I have installed the casablanca on my Linux Ubuntu x64: no errors; and run all the tests: all passed. I have done it like you say on the linux install support page, but I have installed the latest libraries.

I copied the tutorial that you have posted on your site, and when I run it it says:
*** Crashed with return code: 0 ***
If I run it in debug, I see that it crashes on the line
return client.request(methods::GET, builder.to_string());
if I do:
    http_request request;



    try {
    } catch(std::exception e) {
      std::cout << e.what() << std::endl;
it crashes at client.request(request); from try block and it still says
*** Crashed with return code: 0 ***
so there is no error / exception

I suppose more possible problems:
  • The libraries shall be exactly the ones that you specify?
  • Could it be the methods::GET the problem? I do not think so, but it says that it cannot find the declaration of it. Not as a warning, or error, but it is underlined with yellow and it shows this message when I put the mouse over it.
  • Could it be a bug?
  • Could it be something on my machine?
Best regards,
Apr 30, 2014 at 4:55 PM
Edited Apr 30, 2014 at 4:56 PM
Ok, I think it was something about the Ubuntu or / and the build, because I have seen that there were two gcc: 4.8 and 4.9, and after I have removed the 4.8 and tried to rebuild the library, it was crashing.
But it was crashing because of some treating warnings like errors.
I have just modified the CMakeList to add the -Wno-sign-compare flag and it had compiled. And the problem with the client.request() function is no more present.

Just be careful about gcc-4.9, Ubuntu 14 and that flag.
Apr 30, 2014 at 5:37 PM
Hi Stefan,

Glad to hear you figured it out. Officially we do our testing using gcc 4.8 and Ubuntu 12.04. When you mention 'crashing' I assume you actually mean the compiler failed during compilation because of errors :). In general in the C++ Rest SDK we try to treat warnings as errors so that we can keep the code warning clean.

Let us know if you have any other questions.