C finding the ins and outs of clang

I found a C program I wrote in Linux to set the background image using Imlib2, and I got to compile and working in FreeBSD. Now I want to try and rewrite to adding a link list and whatever else I might need to improve on this program using clang and not gcc(9). via codeblocks, (or geany if codeblocks gives me too much grief).

When searching the how tos and the include structure is different in FreeBSD then Linux. how to figure it out. I am basically trying to rid myself of pitfalls then calling internal functions in the include dir, thinking maybe trying a link list that c might already have, ( I have not looked into it again to see, I think it has one though). and what other features c now has but using clang instead of gcc I know it is going to be different. so how to figure out the clang way of programming to make the transition easier?

I hope I made that understandable.
 
When searching the how tos and the include structure is different in FreeBSD then Linux.
It's not that different. You only need to watch for the "split" between the base OS and third party applications or libraries (basically everything you install through ports/packages). The base libraries use /usr/include/ and /usr/lib, libraries from ports/packages are installed in /usr/local/include and /usr/local/lib. Most of the time (both GCC and Clang) only include the first by default, so it may not find headers or be able to link libraries. You probably already noticed you had to add -I/usr/local/include -L/usr/local/lib to get it to build/link correctly.

There are a few that might be different, one notable one is LUA for example because you can install different versions side-by-side. The same would also apply to other installations that allow different versions to be installed "side-by-side".
 
yeah mostly at this point I am having a real hard time, this is in C++, finding out how to use the 'filesystem' in clang++ and codeblocks setup ... so basically I am still in the planing pase of what lang to use C or C++ in this little project I'm 'planing' on doing. I've never programed in FBSD so yes its turning into a leaning curve with somethings.

with this boost libs just like now I installed codeblocks that killed my firefox because boost libs outdated in firefox, I deleted firefox then re-install it, which it reverted boost back to a lesser version, but so far code blocks is still working.

this is the little things I don't like seeing when installing on FBSD lib ver conflicts between packages screwing everything up, but that is outside of this post.

being the loading of files out of a dir and storing them for later use while the program is running is the most important part to work out before I get into anything else of this program.
C++ GNU vector<string> using the std::filesystem is the easiest.

and from what I've just been seeing on the net clang is not up to std++17 standards yet?

so yeah, I am still in the what to use planing phase. Just asking around to gather info to help me make up my mind.
thanks
 
# pkg install jucipp

Assuming you have a CMakeLists.txt file in the folder "project" ...

$ cd ~/project
$ juci . &

The menus tell you what key sequence for the keyboard equivalent. When the debugger hits a breakpoint, it does not automatically display the line. You must use Debug -> Go To Stop to see where it landed.
 
Back
Top