0

This question relates to a previous answered question. I use an open source project OSRM and I want to use it as a lib. So i wrote this small piece of code to test the lib that comes along when you build the osrm project:

#include "boost/filesystem/path.hpp"
#include "ServerPaths.h"
#include "ProgramOptions.h"
#include <InternalDataFacade.h>
#include <viaroute.hpp>

int main()
{
        return 0;
}

and used this command to compile it:

gcc -std=c++11 -Wall test.cpp -o test -L ./libs -lOSRM -I /home/jorne/Downloads/osrm-backend/Include/osrm/ -I /home/jorne/Downloads/osrm-backend/Util/ -I /home/jorne/Downloads/osrm-backend/Include/ -I /home/jorne/Downloads/osrm-backend/Server/DataStructures/ -I /home/jorne/Downloads/osrm-backend/third_party/ -I /home/jorne/Downloads/osrm-backend/plugins/

gcc returned an error message that I posted on paste bin. I now that this probably is an easy/dumb question but I have no experience in c++.

Community
  • 1
  • 1
jorne
  • 894
  • 2
  • 11
  • 23
  • I think this may have been over hastily closed for the wrong reason - your problem is simply that you invoked the compiler as gcc rather than g++. Change `gcc ...` to `g++ ...` and it should compile. – Paul R Mar 16 '15 at 12:58
  • tried to change gcc to g++, without success. I'll try my luck on the other page. anyway thanks for pointing this out as well – jorne Mar 16 '15 at 13:04

0 Answers0