Can't Link or build or just import source files C++

I'm on Ubuntu using Code::Blocks.

FYI I successfully connected SDL2 (not related, but I have done another link before)


I do have SDL2 compiling on Linux, Windows, AND OS X from the same code base. Trying to get Box2D hooked up now.



So I have tried the following:

- Using CMake to build Box2D (command line)
- searching for a pre-built library online (haven't seen one yet)
- just dumping all the code into my project

I will admit that I don't understand enough about how the whole flow works out.
I get that the header files are essentially an interface to work with libs that are binary machine code.

For some reason the 4 steps of linking has driven me to madness lol.



I have googled the hell out of this issue and I'm just tapped out.
I will try again fresh tomorrow.


But if anyone knows some good tutorials / white papers (in simple terms hopefully) HOW all this truly works together.

I'd much rather understand, truly what linkers, compilers, headers are and how they work together, and how it looks on a flow chart with all of that together.

I HAVE seen some of the flow charts, but I think I just banged my head against the wall too long and I can't see straight until tomorrow. LOL


Well just putting this thought and question out there, hopefully I will have better luck tomorrow.
(my dad was a C++ programmer and I have memories of him going through "linker hell" as he'd call it). Hopefully I can avoid the same fate

Original thread: https://box2d.org/forum/viewtopic.php?t=10127