1
Vote

Linking error while compiling first cpprest code on Ubuntu14

description

Where does library gets installed of CPPREST SDK in linux/ubuntu?
So that I could link it.

I could successfully created object files but couldn't link my those with restcpp libs.

Below is my first program:

//#include <cpprest/http_listener.h>
//#include <cpprest/json.h>
//#include <cpprest/uri.h>
//#include <cpprest/ws_client.h>

include <cpprest/http_client.h>

include "cpprest/filestream.h"

//#include <cpprest/containerstream.h>
//#include <cpprest/interopstream.h>
//#include <cpprest/rawptrstream.h>
//#include <cpprest/producerconsumerstream.h>

int main()
{
return 0;
}

Below is the Makefile
CC=g++-4.8 -std=c++11
CFLAGS=-I./casablanca/Release/include

OBJ = hello.o

this is Kinda looping, just create respective objects

%.o: %.cpp $(DEPS)
%.o: %.cpp
    $(CC) -c  $< $(CFLAGS)
hello: $(OBJ)
    $(CC) -o $@ $^ -L.//casablanca/Release/include  -lcasablanca

i
I know, I am not able to link it since I am providing wrong path to link with lcasablanca shared objects.

CAN SOME-ONE QUICKLY HELP ME AND Sort this out.

BELOW LINK i FOLLOWED TO SETUP cpprest sdk.
https://casablanca.codeplex.com/wikipage?title=Setup%20and%20Build%20on%20Linux&referringTitle=Documentation

Error I got while compiling is as below, BASICALLY HAVE TO FIND HOW TO LINK
G++ -o hello hello.cpp -I./casablanca/Release/include
/tmp/ccHlUjQA.o: In function pplx::details::_TaskCollectionImpl::_RunTask(void (*)(void*), void*, pplx::details::_TaskInliningMode)':
hello.cpp:(.text._ZN4pplx7details19_TaskCollectionImpl8_RunTaskEPFvPvES2_NS0_17_TaskInliningModeE[_ZN4pplx7details19_TaskCollectionImpl8_RunTaskEPFvPvES2_NS0_17_TaskInliningModeE]+0x21): undefined reference to
pplx::get_ambient_scheduler()

comments