Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I am trying to link libpcap to my project, but I achive an error
skipping incompatible /usr/lib/i386-linux-gnu/libpcap.so when searching for -lpcap
I'm using cross compiler arm linux gcc.
I've found some topics with related problems but i haven't found solution for me.
How to link this lib correctly?
You need to provide libpcap.so built for arm..
You can check for architecture by calling:
file libpcap.so
Output:
/usr/lib/x86_64-linux-gnu/libpcap.so.1.5.3: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=916b377cfe593106dc0b054d63bc4ed0af4ad269, stripped
You can crosscompile the pcap lib from here
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
I know these are the include files(in c++) We have to compile them and then have to ship them with the actual binary. But I have a bit strange problem.I used windows.h in a program and I want to ship it but windows.h have other include files and so on.So I would have to ship whole windows sdk in the form of dll's .Is there any other way to do it?
You do not need to ship header files with a binary application.
You do however need to ship any shared libraries (DLL's on Windows) that your program depends on - and this includes the compilers runtime (the standard library etc) - static libraries are made part of the executable and thus do not need to be shipped separately.
If you are using Visual Studio then you need to ship the Visual Studio redistributables along with your program (google the version for your Visual Studio version) - for other compilers there are similar requirements.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
How do I import libraries that I can include with #include <> in C++. Specifically, I am trying to import the SDL library, I am using Atom, and my operating system is ubuntu 16.04.
There is default path where compiler searches libraries.
What are the GCC default include directories?
If you are using gcc/g++:
gcc -xc++ -E -v -
Or you have to specify path to the library:
#include "../folder1/header1.h"
#include "../folder2/header2.h"
As already mentioned, you should have this library on your local system.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
I am used with using OpenCV with python. But does someone have an idea how to add openCV library to a C++ compiler (such DevCpp or CodeBlocks...).
If there is a compiler on which it's easier to install OpenCV library no problem, I have no restriction conserning the compiler.
I followed some tutos on the net but they were not so clear.
Thanks.
C++ has two important phases of compilation. First, each individual .cpp file is needed. You need the library header files (.h) for this. Secondly, the separate parts are linked together, and you need the library files themselves. (.lib/.a depending on platform).
So, you need to provide paths to both. The compiler knows which exact headers are needed from the #include statement, but the libraries to link must be explicitly listed.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
This is a newb question. I'm not sure if "external libraries" is the right terminology, but I see some programs include or use libraries or modules that are not programmer-defined. Do I need to do anything special when compiling - do I need to tell the compiler where to find these external libraries?
For example, on this page http://www.unidata.ucar.edu/software/netcdf/examples/programs/, SimpleXyWr.cpp and simple_xy_wr.f90 both reference the netCDF library/module. How does the compiler know where to find the library/module? Do I need to provide the path myself at some point in the compilation?
Typically for GNU compilers -L options tells where to find library and -l tells what library to link. For example,
f77 -o run main.f -L/usr/local/lib -llapack -lblas
will look for libraries in /usr/local/lib driectory and link with lapack and blas libraries
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
how i can compile boost under linux without write in system folders.
I need to get headers files and shared libraries of boost in one my specific folder.
You don't need to be root to compile Boost on Linux. Moreover, many Boost libraries are header only so no compilation is needed. see also Building and Installing the Library and Easy Build and Install for more details.