Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22006

[C++ Library]: "file or folder does not exist" when compiling

$
0
0

I want to develop a small application which uses some libraries. So I downloaded them and placed the include files in a folder called include.

For my application, I used cpprestsdk, but my question shouldn't be limited only to this library.

This is a rough example of my folder Structure:

myproject    include        cpprest            ...        pplx            ...    test.cpp

And this is my Code:

#include <iostream>#include "include/cpprest/http_client.h"#include "include/cpprest/filestream.h"#include "include/cpprest/json.h"int main() {    // code    std::cout << "Hello World!";    return 0;}

which results in followin error code when compiling (g++ test.cpp -o test) with g++ or gcc (on Ubuntu):

<error needed>

What have I done wrong? when I inspect the file mentioned in the error message, then I notice, that all includes in the library are like so #include "cpprest/asyncrt_utils.h". As you can see, it refers to the file as it were in a subfolder called cpprest, which it is not. It is located with the other file in the same folder. I guess that results in my problem. My question now is: how do I fixe this issue?


Viewing all articles
Browse latest Browse all 22006

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>