1

I am using an API of communicating with remote server and it's only available in C. I cannot rewrite it, because it's a very specific protocol, and it'll take too much effort.

The API providedIt uses standard Winsock2 scheme. So, in order to work with it I added

LIBS += C:\\QtSDK\\mingw\\lib\\libws2_32.a

to my project's .pro file.

However, when the program accesses any WinSock function, even WSAStartup, it crashes immediately with the error message SIGILL -- Illegal Instruction. What am I doing wrong?

MD XF
  • 7,860
  • 7
  • 40
  • 71
Ivan
  • 21
  • 2

1 Answers1

0

Are you compiling this API yourself or do you have it as an object/header pair? If by yourself, is it with QtSDK\MinGW? Do you point it to the winsock headers of MinGW?

A good first test would be to try and compile a simple driver main using this library, with QtSDK\MinGW as standalone, without Qt's qmake. Once you make that work, porting into your Qt project should be easy.

Eli Bendersky
  • 263,248
  • 89
  • 350
  • 412