Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Precompiled Header Syntax, is this a valid pch ?  (Read 1633 times)

0 Members and 1 Guest are viewing this topic.

S_BISHOP

  • Newbie
  • *
  • Posts: 15
    • View Profile
    • Email
Precompiled Header Syntax, is this a valid pch ?
« on: January 21, 2019, 09:28:10 am »
I recently discovered the concept of using a precompiled header within a large project, to speed up compile time for those system headers that do not change.

I am now attempting to add to my own project, my question, is this the correct syntax ? or is there something more i have to add, for it to be marked and recognized as a pch.h ?

In code blocks clicking on the this header file and then clicking properties ive checked the file to be Compiled but purposely did not check the file to be linked, is it a pch now ? , is it meant to compile faster as i have it above,  i honestly have no idea.

thanks


#ifndef PCH_H_INCLUDED
#define PCH_H_INCLUDED

#include <iostream>
#include <fstream>
#include <sstream>
#include <strstream>
#include <chrono>
#include <random>
#include <ctime>
#include <memory>
#include <iterator>
#include <cstdlib>
#include <typeinfo>
#include <SFML/System.hpp>
#include <SFML/Graphics.hpp>
#include <SFML/Audio.hpp>

#endif // PCH_H_INCLUDED

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Precompiled Header Syntax, is this a valid pch ?
« Reply #1 on: January 21, 2019, 09:44:54 am »
This has really nothing to do with SFML. There are other places that would be more relevant for this kind of question (stackoverflow, etc.), here we try to focus on SFML itself ;)
Laurent Gomila - SFML developer