Click here to Skip to main content
15,881,281 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I got above error, while implementing an Embedded c program, in code composer studio, on windows platform.

This error comes in 'ioctl.h' file at this line :
int __cdecl ioctl (int __fd, int __cmd);

How to fix this error ?
Posted
Updated 19-Nov-14 17:54pm
v2

1 solution

You are probably using gcc which complains about __cdecl which is compiler and processor specific. If your embedded system does not use a x86 CPU you may use an empty global definition to hide it:
C++
#define __cdecl

However, there may be other issues coming up so you should check if you can setup your development environment for your target platform.

With x86 CPUs, gcc uses __attribute__ to specify the C calling convention and you can use:
#define __cdecl __attribute__((__cdecl__))


For further questions you should provide additional information about the used compiler (name and version) and target platform (architecture and OS).
 
Share this answer
 
Comments
RupeshMote 20-Nov-14 6:45am    
@Jochen : I did changes as per your solution and this error get solved.
Thank you so much.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900