Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Nessphoro
Member
Posts: 308 Joined: Sat Apr 30, 2011 12:50 am
Post
by Nessphoro » Fri Jul 01, 2011 1:20 am
Hey again,
This time around I was thinking to change a calling convention for some of my function to stdcall in this manner
But G++ started to complain and said: "expected initializer before somefunction"
Any help?
xenos
Member
Posts: 1121 Joined: Thu Aug 11, 2005 11:00 pm
Libera.chat IRC: xenos1984
Location: Tartu, Estonia
Contact:
Post
by xenos » Fri Jul 01, 2011 2:44 am
I guess it should look like this:
Code: Select all
void somefunction() __attribute__((stdcall));
See the
GCC Manual .
Solar
Member
Posts: 7615 Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:
Post
by Solar » Fri Jul 01, 2011 4:53 am
Code: Select all
void __stdcall foo(); // MSVC
void foo() __attribute__((stdcall)); // GCC
Needless to say that, as compiler-specific extensions, both notations are non-standard and non-portable.
Every good solution is obvious once you've found it.
qw
Member
Posts: 792 Joined: Mon Jan 26, 2009 2:48 am
Post
by qw » Fri Jul 01, 2011 7:20 am
Code: Select all
#define __stdcall __attribute__((stdcall))