-
October 10th, 2009, 11:34 PM
#1
Precompiled header include order
I've just started properly using precompiled headers in my game engine:
Code:
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
#pragma once
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
// TODO: reference additional headers your program requires here
#include <iostream>
#include <algorithm>
#include <map>
#include <string>
#include <vector>
I'm getting a lot of errors similar to:
Code:
cannot convert parameter 1 from 'const time_t *' to 'const __time32_t *'
from time.inl.
From reading around, this seems to be because another file is defining some time-related thing, and that to solve it I should rearrange my include order. However, I've tried switching the order of includes around but the error remains.
Anyone know how to fix this?
Cheers.
-
October 13th, 2009, 05:54 PM
#2
Re: Precompiled header include order
Just bumping this up to the top.
-
October 13th, 2009, 06:06 PM
#3
Re: Precompiled header include order
Which header is time_t defined? Also, do you still have some header include definitions in your cpp files are have these all been moved into stdafx.h?
-
October 14th, 2009, 01:54 AM
#4
Re: Precompiled header include order
You shown a bunch of directives for including STL headers. The order of STL header inclusion is not important. But you probably have to include time.h if you want to use time_t.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|