Question

I have already read Tiny C Compiler (TCC) and winsock?, but I still can't compile sockets with TCC, because when I try

 tiny_impdef winsock.dll -o winsock.def

tiny_impdef responds:

Not a PE file: C:\WINDOWS\system32\winsock.dll

So how can I do to compile properly a program that use sockets? Any help will be appreciated

Was it helpful?

Solution

I'm guessing that you have a 64 bit machine and TCC is 32 bit. In that situation C:\WINDOWS\system32\winsock.dll is the 64 bit version of winsock. Try it this way:

tiny_impdef C:\WINDOWS\SysWOW64\winsock.dll -o winsock.def

to pick up winsock from the 32 bit system directory.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top