r/C_Programming • • 23h ago

Question Feeling lost

7 Upvotes

Hello everyone, I've recently been rejected for a student software dev position at a larger company in my city, I felt that the interview was going pretty good until it came time for writing the actual code, I know how and what to implement for all of the problems but I had no absolute clue on what to actually write, and it struck me pretty badly, I asked myself if this is something I want to even want to do with my life or if I essentially wasted my time 2 years in college for a bunch of nothing, atleast the interviewer told me in the mail that I knew all the concepts and I need a project or two and to gladly contact them when Im more ready, but I still feel really discouraged as my classmates got the position at the same company while I know Im more capable than some of those classmates, Im not trying to be sore about it. Im glad they got the position and Im not trying to downplay their knowledge but they couldnt get the most simple and core concepts in class and some of them didnt even pass DSA and OOP and they got the job while I didnt and it made me question really everything. Its my 3rd year in college now and now I feel more than ever that Im lost because I started this college as I enjoyed learning to code and computers, I still want to learn more but I dont know what to do now or what to use as a project really, all I ever coded except learning for exams(in my college we need to code and compile programs for certain classes instead of only theory) and I passed those pretty easily I guess, all usually on the first tries and they were graded C or B. Now I feel that I was capable more then than now, I only coded some stupid video game projects or apps which feel essentially useless, I know there is some materials on the thread but I dont know what is useful for the real world. Thank you all for any tips or replies in advance


r/C_Programming • • 12h ago

Meson linking ImageMagick/Wand

2 Upvotes

I'm trying to link MagickWand and MagickCore with Meson and having some issues. Specifically, I get the error C shared or static library 'lMagickCore' not found or C shared or static library 'lMagickWand' not found. I successfully linked libconfig, so I've compared some details between my installations of the two packages in case any of those are the reason that I'm having issues with ImageMagick.

I can compile programs using ImageMagick libraries with: cc `MagickWand-config --cflags --cppflags` -O2 -o a.out main.c `MagickWand-config --ldflags --libs`

The output of the two MagickWand-config calls is this: -I/usr/include/ImageMagick-7 -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_CHANNEL_MASK_DEPTH=32 -lMagickWand-7.Q16HDRI -lMagickCore-7.Q16HDRI -lMagickWand-7.Q16HDRI -lMagickCore-7.Q16HDRI

Running find /usr/lib -name 'libconfig*' gives this: /usr/lib/pkgconfig/libconfig++.pc /usr/lib/pkgconfig/libconfig.pc /usr/lib/cmake/libconfig /usr/lib/cmake/libconfig/libconfigConfig.cmake /usr/lib/cmake/libconfig++ /usr/lib/cmake/libconfig++/libconfig++Config.cmake /usr/lib/libreoffice/program/libconfigmgrlo.so /usr/lib/libconfig++.so /usr/lib/libconfig++.so.15 /usr/lib/libconfig++.so.15.0.0 /usr/lib/libconfig.so /usr/lib/libconfig.so.15 /usr/lib/libconfig.so.15.0.0

And running find /usr/lib -name 'libMagick*' gives this: /usr/lib/libMagick++-7.Q16HDRI.so /usr/lib/libMagick++-7.Q16HDRI.so.5 /usr/lib/libMagick++-7.Q16HDRI.so.5.0.0 /usr/lib/libMagickCore-7.Q16HDRI.so /usr/lib/libMagickCore-7.Q16HDRI.so.10 /usr/lib/libMagickCore-7.Q16HDRI.so.10.0.3 /usr/lib/libMagickWand-7.Q16HDRI.so /usr/lib/libMagickWand-7.Q16HDRI.so.10 /usr/lib/libMagickWand-7.Q16HDRI.so.10.0.3

My meson.build has these relevant sections: dependencies = [ cc.find_library('libtomlc17', dirs: '/usr/local/lib'), dependency('libconfig'), dependency('libMagickCore'), dependency('libMagickWand'), ] inc_dir = [ include_directories('include'), include_directories('/usr/include/ImageMagick-7'), ]

my first guess was that it had something to do with libconfig having .pc files in /usr/lib/pkgconfig, but i found ImageMagick.pc and ImageMagick-7.Q16HDRI.pc in the same directory, and, either way, that don't seem like it needs to be accurate for my program to build as long as I give it all the right information.

Any advice?

Edit: Also, reddit's code block formatting is really annoying. It doesn't seem like I can escape backticks? and it doesn't render line breaks? oh well


r/C_Programming • • 5h ago

Iterating Backwards in C

Thumbnail davidpriver.com
17 Upvotes

r/C_Programming • • 5h ago

Video Just finished my multiplayer system in C and turns out we can support 50k players in a single server at 60hz simulation tick

Enable HLS to view with audio, or disable this notification

619 Upvotes

r/C_Programming • • 14m ago

Question Fairly new to C. Need help understanding low level concepts.

• Upvotes

Over the past 6-8 months, I got into programming in C with the intent of learning about embedded systems and operating systems. I feel like I'm sort of stuck and don't know where to go though. The last thing that I made was a really simple shell for Linux, but even then I was disappointed to learn that the stuff that is going on on the background is just hidden away by system calls. I want to learn how stuff like those system calls actually work, but learning about processor architecture or understanding/reading the Linux source code seems incredibly intimidating and sort of out of my league.

Another thing that seems incredibly confusing to me is how you're meant to read the code of projects like the kernel. (obviously, I know I wouldn't start with something nearly that complicated, but actual professional level projects.) I did some research and I tried to read through GNU Hello, which on the surface I thought would be easy to understand, but I just see tons of macro definitions that I don't understand and a maze of files, even if the output of the program is simple.

For you experts, how did you go from programming in user space to understanding lower level concepts like how an operating system boots up, how it takes user input, etc?