error in header file socket.h
4 views (last 30 days)
Show older comments
Hi, I encouter this error while compilation after adding the header file socket.h to the include repertory of visual studio.10 and I am using matlab 2013. this is the log error file :
perform_front_propagation_anisotropic.cpp
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\sys/socket.h(119) : error C2146: syntax error : missing ';' before identifier 'sa_len'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\sys/socket.h(119) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\sys/socket.h(119) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\sys/socket.h(120) : error C2146: syntax error : missing ';' before identifier 'sa_family'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\sys/socket.h(120) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\sys/socket.h(120) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\sys/socket.h(129) : error C2146: syntax error : missing ';' before identifier 'sp_family'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\sys/socket.h(129) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\sys/socket.h(129) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\sys/socket.h(130) : error C2146: syntax error : missing ';' before identifier 'sp_protocol'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\sys/socket.h(130) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\sys/socket.h(130) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\sys/socket.h(173) : error C2146: syntax error : missing ';' before identifier 'msg_name'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\sys/socket.h(173) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\sys/socket.h(173) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\sys/socket.h(174) : error C2146: syntax error : missing ';' before identifier 'msg_namelen'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\sys/socket.h(174) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\sys/socket.h(174) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\sys/socket.h(176) : error C2146: syntax error : missing ';' before identifier 'msg_iovlen'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\sys/socket.h(176) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\sys/socket.h(176) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\sys/socket.h(177) : error C2146: syntax error : missing ';' before identifier 'msg_control'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\sys/socket.h(177) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\sys/socket.h(177) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\sys/socket.h(178) : error C2146: syntax error : missing ';' before identifier 'msg_controllen'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\sys/socket.h(178) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\sys/socket.h(178) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\sys/socket.h(197) : error C2146: syntax error : missing ';' before identifier 'cmsg_len'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\sys/socket.h(197) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\sys/socket.h(197) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\sys/socket.h(222) : error C2146: syntax error : missing ';' before identifier 'sa_family'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\sys/socket.h(222) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\sys/socket.h(222) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\sys/socket.h(230) : error C2146: syntax error : missing ';' before identifier 'msg_name'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\sys/socket.h(230) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\sys/socket.h(230) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\sys/socket.h(234) : error C2146: syntax error : missing ';' before identifier 'msg_accrights'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\sys/socket.h(234) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\sys/socket.h(234) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\sys/socket.h(240) : fatal error C1083: Cannot open include file: 'sys/cdefs.h': No such file or directory
any help would be appreciated;
2 Comments
Walter Roberson
on 2 May 2016
For a C++ program, shouldn't you #include <socket> rather than #include <socket.h> ?
Answers (0)
See Also
Categories
Find more on MATLAB Compiler in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!