-1

Here is the top part of my code,

#include <iostream>
#include <istream>
#include <fstream>
#include <vector>
#include <string>
#include <algorithm>
#include <iterator>
#include <exception>
#include <boost/tokenizer.hpp>
#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/json_parser.hpp>
#include <boost/foreach.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/asio.hpp>
#include <boost/bind.hpp>
#include <boost/network/protocol/http/client.hpp> - No such file or directory
#include <boost/network.hpp> - No such file or directory

I coped the all the files in /cpp-netlib-0.10.1/boost/ into the boost folder where the other .hpp files reside that are found fine however it can not find the others. I tried to rebuild the index, I removed the inclusions and re-added it with no success.

Also if I remove the "boost/" portion from the path on the problem lines the header files will be found fine however header files linked from within those then have the same error.

Thanks for any help you guys can provide.

user246181
  • 17
  • 1
  • 8
  • Please provide the complete compiler call, including all -I for the include directories. And poste the exact compiler error messages, too. – usr1234567 Dec 28 '13 at 15:30
  • make all Building file: ../src/Test3.cpp Invoking: GCC C++ Compiler g++ -I/boost/boost_1_55_0/boost -I/netlib/cpp-netlib-0.10.1/boost -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/Test3.d" -MT"src/Test3.d" -o"src/Test3.o" "../src/Test3.cpp" ../src/Test3.cpp:16:50: warning: boost/network/protocol/http/client.hpp: No such file or directory ../src/Test3.cpp:17:29: warning: boost/network.hpp: No such file or directory – user246181 Dec 28 '13 at 15:41
  • 1
    Please try to change `-I/netlib/cpp-netlib-0.10.1/boost` to `-I/netlib/cpp-netlib-0.10.1` (drop the trailing subfoler `boost`). I think it is included by the `boost/` in the include statement. If this does not help check with `ls boost/network.hpp` in every included directory (compiler argument with -I) whether such a file exists. – usr1234567 Dec 28 '13 at 15:46
  • That solved my problem. Thank you so much for your help have a nice new year. – user246181 Dec 28 '13 at 16:07

1 Answers1

1

Please try to change -I/netlib/cpp-netlib-0.10.1/boost to -I/netlib/cpp-netlib-0.10.1 (drop the trailing subfoler boost). I think it is included by the boost/ in the include statement

usr1234567
  • 21,601
  • 16
  • 108
  • 128
  • While that fixed my initial problem now a new problem has come up. boost/boost_1_55_0/boost/system/error_code.hpp:222: undefined reference to `boost::system::generic_category()' /boost/boost_1_55_0/boost/system/error_code.hpp:223: undefined reference to `boost::system::generic_category()' /boost/boost_1_55_0/boost/system/error_code.hpp:224: undefined reference to `boost::system::system_category()' – user246181 Dec 28 '13 at 19:22
  • I figured it out, I added the original path and also the one without the trailing boost. – user246181 Dec 28 '13 at 19:28