Author Topic: how do I add new downlaoded header files to codeblocks?  (Read 3697 times)

Offline speedreadersteve

  • Multiple posting newcomer
  • *
  • Posts: 17
how do I add new downlaoded header files to codeblocks?
« on: November 17, 2020, 07:41:41 am »
I want to add std_lib_facilities.h to codeblocks, but I don't know where to put it.  Even if I think I placed it in the right folder, it still returns a 'fatal error' because it can't locate the header file, when I include it in my program.

I also want seed_randint() to be a function in my program, but it doesn't show up in scope, so I need to download a header file for that too.

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
Re: how do I add new downlaoded header files to codeblocks?
« Reply #1 on: December 19, 2020, 12:28:29 am »
I want to add std_lib_facilities.h to codeblocks, but I don't know where to put it.  Even if I think I placed it in the right folder, it still returns a 'fatal error' because it can't locate the header file, when I include it in my program.

I also want seed_randint() to be a function in my program, but it doesn't show up in scope, so I need to download a header file for that too.

You can put header files where you like. You need only tell your CodeBlocks project where they are via MainMenu/Project/Build options/ Seach directorys [tab]. Enter the full directory name of the directory containing the headers into the large text box.
The compiler will find them by looking within the named directory.

Be aware that you have to be using a project. Not just a single file of code.
« Last Edit: December 19, 2020, 12:30:08 am by Pecan »