Have you read the replies thus far?
Code:
printf(dwPID);
->
Code:
printf("%lu", (unsigned long)dwPID);
void main() is not standard, you should be using int main(). See the FAQ.

What are your linker options? Do you have one library repeated twice?