PDA

View Full Version : visual c++2008 rejecting standard windows fucntions in imported project


darrenls59
06-04-09, 11:11 AM
hello. I imported a project which i wrote in visual c++ 2007. It worked fine in 2007 but when i imported into 2008 and it wouldn't compile. the errors were based on unresolved eternal links for functions like MessageBox, GetWindowHandle etc. the include file is there so i can only assume that for some reason 2008 hasn't imported the appropriate libraries. Can anyone tell me how to resolve this?

Zhivago
06-04-09, 08:04 PM
hello. I imported a project which i wrote in visual c++ 2007. It worked fine in 2007 but when i imported into 2008 and it wouldn't compile. the errors were based on unresolved eternal links for functions like MessageBox, GetWindowHandle etc. the include file is there so i can only assume that for some reason 2008 hasn't imported the appropriate libraries. Can anyone tell me how to resolve this?

For the MessageBox function, you will need to include User32.lib into your project.
Read here for more info: http://msdn.microsoft.com/en-us/library/ms645505(VS.85).aspx

darrenls59
06-05-09, 03:58 PM
For the MessageBox function, you will need to include User32.lib into your project.
Read here for more info: http://msdn.microsoft.com/en-us/library/ms645505(VS.85).aspx

Thank you but i don't know how to do that in this version. In older versions you could do that in references in the project properties but in this version it only seems to allow dlls and it rejects .lib

Zhivago
06-09-09, 07:44 PM
Go to Project->Settings->Configuration Properties->Linker->Input->Additional Dependencies

darrenls59
06-10-09, 11:58 PM
Go to Project->Settings->Configuration Properties->Linker->Input->Additional Dependencies

Thank you.