Link error driveing me crazy!

Started by
23 comments, last by peter86 21 years, 11 months ago
Seeing as the whole point of the pragma is to optimize compilation times, I doubt it. Heathen that I am, I'd say it's a silly thing to have removed from gcc.

And as to not using it, I suppose I should have searched before posting originally, but now that I have I'd rather use the solution everyone has suggested for this problem:

    #pragma once#ifndef <i>_FILE_H</i>#define <i>_FILE_H</i>// FILE BODY HERE#endif    


Optimized compilation time and standard operation to boot.

ld

[edited by - liquiddark on April 23, 2002 12:15:53 PM]
No Excuses
Advertisement
quote:Original post by ZealousElixir
Since awhile ago:

http://www.la.utexas.edu/lab/software/devtool/gnu/cpp/cpp_46.html#IDX82

A few lines down from that marker.



No, that was GNU C that deprecated it. Visual C never did. #pragma are considered compiler specifc and not part of the standard, so they can do that.

So, don''t use it with gcc.
liquiddark: you really shouldn''t start identifiers with underscores.

Later,
ZE.

//email me.//zealouselixir software.//msdn.//n00biez.//
miscellaneous links

[if you have a link proposal, email me.]

[twitter]warrenm[/twitter]

quote:
No, that was GNU C that deprecated it. Visual C never did. #pragma are considered compiler specifc and not part of the standard, so they can do that.

So, don''t use it with gcc.


The point is, it''s been deprecated, so if you use it, you''re writing unportable code.

Later,
ZE.



//email me.//zealouselixir software.//msdn.//n00biez.//
miscellaneous links

[if you have a link proposal, email me.]

[twitter]warrenm[/twitter]

AFAIK, #pragma results in unportable code regardless of whether it''s deprecated or not. That''s why MS wrap #pragma once in #if MSC_VER > 1000.
---visit #directxdev on afternet <- not just for directx, despite the name

This topic is closed to new replies.

Advertisement