Have you read the replies thus far?
->Code:printf(dwPID);
void main() is not standard, you should be using int main(). See the FAQ.Code:printf("%lu", (unsigned long)dwPID);
What are your linker options? Do you have one library repeated twice?