<div dir="ltr"><span style="font-family:arial,sans-serif;font-size:13px">Dear all,</span><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">Hi,</div>

<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">I have a project which I have used the winsock2 in it and windows.h should not be includede before the winsock2.h. Also, I have used the QT in my project. Everything was completely compiled and run but I wanted to auto generate the moc files, so I have added "set(CMAKE_AUTOMOC ON)" but now it says that winsock functions and struct are redefined. I am really stucked in this problem and I don't know how to get rid of it. Please help!</div>

<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">Regards</div><div style="font-family:arial,sans-serif;font-size:13px">Morteza</div></div>