hp wrote:
Hello kingkoozime,
so
#ifdef _WIN32
#pragma once
#endif
is only valid on vindows i assume. but i dont know how to replace it
so linux compiler will understand it.
and is there easy way to compile it without changing this?
pragma once is in every .h file :/
You want to have a .h file wrapper instead of the #pragma once. For
example if you have this in the SomeThing.h file...
#ifdef _WIN32
#pragma once
#endif
code
code
code
more code
code
code
...you would replace it with...
#ifndef SOMETHING_H
#define SOMETHING_H
code
code
code
more code
code
code
#endif // SOMETHING_H
...which will create a 'C' style wrapper for the .h file. Even if this
.h file gets included multiple times in a .cpp file, the stuff inside
the #ifndef and #endif will only get executed ONCE.
Yes, you have to change this in EACH .h file. :(
--
Jeffrey "botman" Broome
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders