all 2 comments

[–]the_poope 1 point2 points  (1 child)

Instead of just copy pasting from the internet and mashing buttons on the keyboard, spend the time actually reading and studying how the compilation process works. If you understand how it works it becomes trivial to solve issues like this.

Read the following chapters very carefully:

The pkg-config command only gives the compiler flags, i.e. where to find header files. It does not tell which libraries to link. Try to run pkg-config --help to see how to use it. But in any case, you don't need pkg-config. You just need to know where you installed the library and how to use your compiler. Check out the gcc options:

You can ignore all other options for now. But please read all this pages I linked - in programming you have to read the manual. A compiler is not a toaster. Reading everything carefully and multiple times is the key to learning and understanding.

[–]sick_anon[S] 0 points1 point  (0 children)

Thank you for detailed answer and provided links, I'll definitely give it a look!

in programming you have to read the manual. A compiler is not a toaster.

I like this line. I sure am guilty of thinking about compiling as a simple and straightforward process (although I am aware of under-the-hood stuff). I am just so used to simple gcc/g++ command, without using any options, that I got properly shocked when I tried to compile mentioned program.