0

Using gcc version 4.1.2, targeting Linux, could not figure out how to specify stdcall.

Found lots of seemingly related answers that all say to use the following:

typedef void (__stdcall *int)(int);

This is not working though.

πάντα ῥεῖ
  • 1
  • 13
  • 116
  • 190
KaPtain
  • 21
  • 1
  • 2
  • The question, https://stackoverflow.com/questions/3054257/is-there-stdcall-in-linux, does not give the needed answer whatsoever, while https://stackoverflow.com/questions/13095869/is-there-any-equivalent-for-stdcall-in-gcc for whatever reason was painfully difficult to find while google searching and did not have a fully fleshed out answer. – KaPtain Jul 19 '18 at 17:22
  • The second (I changed the order) listed answer might be useful for anyone researching similar questions in future. – πάντα ῥεῖ Jul 19 '18 at 17:27

1 Answers1

2

After much searching, I finally found the right answer incidentally to this stack overflow question: Is there any equivalent for stdcall in GCC?

The bottom line is to do the following (using #define to accomplish this is optional of course)

#define STDCALL __attribute__((stdcall))
typedef void (STDCALL *int)(int);
KaPtain
  • 21
  • 1
  • 2