i recretaed the project and set all code generation properties to multithreaded debug dll.
Now it runs properly.