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

4
  • Please provide the complete compiler call, including all -I for the include directories. And poste the exact compiler error messages, too. Commented Dec 28, 2013 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 Commented Dec 28, 2013 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. Commented Dec 28, 2013 at 15:46
  • That solved my problem. Thank you so much for your help have a nice new year. Commented Dec 28, 2013 at 16:07

1 Answer 1

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

Sign up to request clarification or add additional context in comments.

2 Comments

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()'
I figured it out, I added the original path and also the one without the trailing boost.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.