What is the purpose of #pragma aux and how should I use it?

ぃ、小莉子 提交于 2019-12-20 07:58:10

问题


I'm attempting to delayload a library and use GetProcAddress to get a function from the library to use repeatedly. The project I'm working on has examples of how this being done in other cases, and in the header file that describes typedefs of the function, there is a #pragma aux line. What does this do? Is this always necessary?

EDIT: I'm using the vc11 compiler


回答1:


These are auxiliary pragmas and it is specific feature for Watcom compiler. From below detailed explanation:

http://users.pja.edu.pl/~jms/qnx/help/watcom/compiler-tools/pragma32.html#AuxiliaryPragmas

Auxiliary pragmas are used to describe attributes that affect code generation. Initially, the compiler defines a default set of attributes.

so to convert it to Visual Studio, you would have to find equivalent pragmas/compiler features in VS.




回答2:


#pragma implementations are specific for your actual toolchain.

Looking up #pragma aux indicates that seems to be a specific Watcom C/C++ Compiler specific problem.



来源:https://stackoverflow.com/questions/31684937/what-is-the-purpose-of-pragma-aux-and-how-should-i-use-it

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!