Trying to work on another app to compile. I installed all of the dependancies but pkg-config was not finding some of the packages I installed, I took a look in the /system/develop/lib directory and did not see some of the packages. How or what determines what goes into that directory?
Try to reboot
Same here, what architecture are you building for? (32bit or 64bit)?
Not all libraries supply *.pc files in /boot/system/lib/
x86/pkgconfig and when you are building with cmake it will try to find the *.cmake files in /boot/system/lib/
x86 only secondary target on 32bit.
On primary target you can check with
pkg-config lib* --cflags --libs, on secondary target (32bit) this is
pkg-config-x86 lib* --cflags --libs in Terminal.
As HaikuDepot doesn’t show devel packages by default, it’s easy to forget about installing development files of dependencies.
I exported the path in terminal by doing:
After that, the cmake script was able to find the libs that it needed. Still didn’t compile though.
Instead of hacking your way through consider to read the user guide and the faq, it would explain you what are you doing wrong, why, and how are you supposed to use Haiku. Most importantly how you can switch to a modern toolchain.
Hi @extrowerk I’m familiar with how to use Haiku for the most part, but programming and compiling isn’t my area of expertise. Looking to learn more, will look at the FAQ as I have read the User Guide and that was more for day-to-day use.
Research the “setarch” command in the Terminal.
Seems @extrowerk already gave you an example, and as I thought you are probably running 32bit (x86_gcc2), which defaults to gcc2 in primary architecture, in Terminal you can switch to gcc11 with
setarch x86 thus not having to fiddle to change $PATH.