Hello people,
I have some problem with Debugging in MS Visual C++.
I want to generate a TCP/IP-Socket. The compiling-process is fine but
when I debugg the project there's occuring some errors like: 'error
LNK2001: Nichtaufgelöste s externes Symbol "unsigned int __stdcall
socket(int,int, int)" (?socket@@$$FYG IHHH@Z)"'
"Nichtaufgelöst es externes Symbol" means "unresolved external symbol"
Here is a smaller C++-file which creates the same error.
#define AF_INET 2 /* internetwork: TCP, etc. */
#define SOCK_STREAM 1 /* stream socket */
void main(){
unsigned int __stdcall socket(int af, int type, int protocol);
unsigned int iClient;
iClient = socket(AF_INET, SOCK_STREAM, 0);
}
I think there's some problem with the symbol "__stdcall" , that Visual
C++ has a problem with C++- and C-code.
I have also tried
'"extern "C" { unsigned int __stdcall socket(int af, int type, int
protocol);
}'
but the same message occured.
Who can help?
Falk Fassmann
I have some problem with Debugging in MS Visual C++.
I want to generate a TCP/IP-Socket. The compiling-process is fine but
when I debugg the project there's occuring some errors like: 'error
LNK2001: Nichtaufgelöste s externes Symbol "unsigned int __stdcall
socket(int,int, int)" (?socket@@$$FYG IHHH@Z)"'
"Nichtaufgelöst es externes Symbol" means "unresolved external symbol"
Here is a smaller C++-file which creates the same error.
#define AF_INET 2 /* internetwork: TCP, etc. */
#define SOCK_STREAM 1 /* stream socket */
void main(){
unsigned int __stdcall socket(int af, int type, int protocol);
unsigned int iClient;
iClient = socket(AF_INET, SOCK_STREAM, 0);
}
I think there's some problem with the symbol "__stdcall" , that Visual
C++ has a problem with C++- and C-code.
I have also tried
'"extern "C" { unsigned int __stdcall socket(int af, int type, int
protocol);
}'
but the same message occured.
Who can help?
Falk Fassmann
Comment