🔒 Locked
pragma?
Advertisement
Original Post
"pragma" is a compiler directive used by the preprocessor. It''s a macro definition like, say, #define.
If you want to know what a specific one does you have to look it up.
-fel
If you want to know what a specific one does you have to look it up.
-fel
A bit more info: the C/C++ standards define #pragma as completely implementation specific. That is to say, each compiler developer is free to do whatever they want with #pragma; it''s used for "extensions" to the language that are not in the standard, stuff like structure padding, optimization hints, etc. So you''ll need to check the documentation for your individual compiler for more info.
How appropriate. You fight like a cow.
How appropriate. You fight like a cow.
The reason I ask is because the vector/matrix class they have implemented uses SIMD assembly instructions and if your compiler does not support them, then regular old c++ instructions are used to compute a vector times a scalar, etc. Does it really matter these days, or can you just code using c++, or would assembly really make a significant boost in a part of your code that is probably going to be called alot?
[edited by - kelaklub on July 23, 2003 3:52:05 PM]
[edited by - kelaklub on July 23, 2003 3:52:05 PM]
Hmm that made me wonder. Does the library linking (#pragma comment(lib,"")) work on most compilers? My game engine, which will later be open-source, uses that compiler directive. Is that safe?
---
Brent Gunning | My Site
---
Brent Gunning | My Site
Dev-C++ ignores "#pragma comment (lib, ...)", so be careful.
Okay I understand. So I''ll include the pragma directive, but I will make sure that non-VC++ users must link the libraries in manually. Are there any MINGW or BORLAND compiler directives to do the same? just so it makes engine usage easiest.
---
Brent Gunning | My Site
---
Brent Gunning | My Site
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement