简体   繁体   中英

C++ G711 encoder decoder error

I have the following code in C++ ( Visual Studio 2013 ) to declare a function prototype in a header file:

extern "C" __cdecl
short int
G_Init(
 void *Ptr,
 char Encoding);

and the compiler returns the following error:

error C2062: type 'short' unexpected

What I'm doing wrong ?

MSDN says : "Place the __cdecl modifier before a variable or a function name ."

That is, extern "C" short int __cdecl G_Init , not extern "C" __cdecl short int G_Init .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM