Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: BigAngryDog on March 13, 2006, 03:07:47 am

Title: Does not recognize __stdcall?????
Post by: BigAngryDog on March 13, 2006, 03:07:47 am
C::B doesn't recognized __stdcall convention? No?

If so, how do I use it?

For example, the following generates an error when building a DLL:

Code
#define _DLL_CALL __stdcall(dllexport)

void _DLL_CALL get_url();
Title: Re: Does not recognize __stdcall?????
Post by: sethjackson on March 13, 2006, 03:13:58 am
This is a Microsoft specific compiler extension. The problem is not with C::B. It may be a GCC (MinGW) problem.

http://www.google.com/search?hl=en&lr=&q=GCC+__stdcall&btnG=Search
Title: Re: Does not recognize __stdcall?????
Post by: BigAngryDog on March 13, 2006, 03:54:26 am
>The problem is not with C::B. It may be a GCC (MinGW) problem.

Nah! It's a "ME" problem.

OK, I'm an idiot. I should have typed:

#define _DLL_CALL __stdcall __declspec(dllexport)

not

#define _DLL_CALL __stdcall(dllexport)

Thanks for replying! :)
Title: Re: Does not recognize __stdcall?????
Post by: sethjackson on March 13, 2006, 01:04:06 pm
>The problem is not with C::B. It may be a GCC (MinGW) problem.

Nah! It's a "ME" problem.

OK, I'm an idiot. I should have typed:

#define _DLL_CALL __stdcall __declspec(dllexport)

not

#define _DLL_CALL __stdcall(dllexport)

Thanks for replying! :)


Sure. :D