There is a program consisting of one .cpp file. It uses the libcurl library. It is necessary to compile this case for embedded Linux on the Cortex A7 processor (arm 32-bit).

As I understand it, you need to configure and then build the library for the desired architecture, and then build the program itself using a cross-platform compiler.

The problem is that I can't imagine how to tell the compiler that #include understands that the library is somewhere near here.

  • Build in a Buildroot environment — much easier and clearer. - 0andriy

1 answer 1

how to specify it so that #include understands that the library is somewhere near here

Actually we are talking about the library header file (* .h)

flag -I. (inclusions are searched in the same folder with the file being compiled)

so that the linker knows where the compiled library is

flag -L. (in the same folder)

so that when loading the library was searched in the same folder with the executable file

flags -Wl, -R, \ $$ ORIGIN

Surely, this is not enough to solve your specific problem, but these are three standard methods to build and run something in one folder. Maybe something to help.