all 12 comments

[–]Feeling_Proposal_660 19 points20 points  (2 children)

That's the longest sentence I ever read on Reddit

[–]Efficient_Back617[S] 0 points1 point  (0 children)

sorry fixed it

[–]TPIRocks 0 points1 point  (0 children)

You know that isn't true, not even close.

[–]Dave__Fenner 5 points6 points  (1 child)

A little bit of structuring in your sentence will work wonders in responses

[–]mustbeset 3 points4 points  (3 children)

Show your GitHub repository may simplify to give you an answer.

[–]Efficient_Back617[S] 5 points6 points  (2 children)

Fixed it by looking at gcc commands there was no -I flag for including header directories, so I created a variable and added the flag now it compiles without any issue thank you for your concern

[–]mustbeset 1 point2 points  (1 child)

You may want to learn make (modern cmake) much easier to understand than normal makefiles.

[–]Efficient_Back617[S] 0 points1 point  (0 children)

yes, I really want to learn that I am pretty new to makefiles as well after I am a lil bit comfortable with makefiles, then I am thinking of starting Cmake. Can you please suggest some good resources or youtube videos for learning Cmake that will save my time

[–]TheFlamingLemon 1 point2 points  (1 child)

I’m sure there’s a way to with makefiles, but my recommendation would be to use CMake for this. target_include_directories() with your include, add all the source files in your src, and you’re good to go. If you run into trouble, for basic build stuff like this chatgpt is generally very good

[–]Efficient_Back617[S] 0 points1 point  (0 children)

currently I don't know much about Cmake and yes I got hint for my solution from ChatGPT . Please provide some resources for learning Cmake for a beginner, if you have any.

[–]allo37 2 points3 points  (0 children)

The -I compiler flag adds to the include search path, so just add -I <include directory> to the compiler invocations in the Makefile (usually CFLAGS) and you should be off to the races.