Author Topic: Including header file doesnt work  (Read 1376 times)

Offline vivess

  • Single posting newcomer
  • *
  • Posts: 3
Including header file doesnt work
« on: April 18, 2016, 03:27:47 pm »
Hi,
I need to include this header http://www.stroustrup.com/Programming/std_lib_facilities.h

what I did:
- create std_lib_facilities.h
- create c++ console project in codeblocks
- right click on the project name and click on "Add files.." and select std_lib_facilities.h (which I placed one folder above the project folder) and then I click on Ok on the next window
- I write #include "../std_lib_facilities.h" at the beginning
- click on build

Now I get this warning:
"  This file includes at least one deprecated or antiquated header which \
  may be removed without further notice at a future date. Please use a \
  non-deprecated interface with equivalent functionality instead. For a \
  listing of replacement headers and interfaces, consult the file \
  backward_warning.h. To disable this warning use -Wno-deprecated."

Does anyone know what is broken? (the hello world program is still running though)

thanks.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6675
    • My Best Post
Re: Including header file doesnt work
« Reply #1 on: April 18, 2016, 04:19:14 pm »
Your default compiler standard is newer that the code you wrote.
This is NOT a valid topic for the site. See rules for more details http://forums.codeblocks.org/index.php/topic,9996.0.html

How to add the compiler options in Code::Blocks to disable the warning is a valid topic for this site.

To get how on the full cause and possible solution use a site like http://cboard.cprogramming.com/forum.php
NOTE: You will need to post a full build log to get help from them in most cases. http://wiki.codeblocks.org/index.php/FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org