Ask coding questions

← Back to all posts
(C++/g++) Don't Know How To Link Libraries
Highwayman

Ok, so I forked this really cool library from GitHub that helps you make TUIs, right? and I built it just fine, found the libraries just fine, included the headers just fine, even, but when I try to also link in the actual library files (like lib.a or lib.so, ya know?), I find myself getting a big ole screen of gibberish, telling me that it still can't find the library that I'm using.

I've never actually done this before, so some help would be much appreciated! 😅

btw, the libs are ~/asdf/FTXUI/build/ftxui-screen.a, ~/asdf/FTXUI/build/ftxui-component.a, and ~/asdf/FTXUI/build/ftxui-dom.a.

Voters
Highwayman
Comments
hotnewtop
Highwayman

Oh, also, you'll notice that when I pass the libs, I use -l:<NAME> instead of -l<NAME>.

That's because earlier, I was trying to use just the normal -l<NAME>, like -lftxui-dom, but it tried to search for libftxuidom.a instead of just ftxui-dom.a or something like that.