why I cannot run this programe?

When I run the programe following errors were displayed and i can not find any error.



Error 3 error LNK1120: 1 unresolved externals c:\users\pvs\documents\visual studio 2010\Projects\testee\Debug\testee.exe 1 1 testee


Error 2 error LNK2019: unresolved external symbol "int __cdecl vsphere(int)" (?vsphere@@YAHH@Z) referenced in function _main c:\Users\pvs\documents\visual studio 2010\Projects\testee\testee\testee.obj testee


Warning 1 warning LNK4067: ambiguous entry point; selected 'mainCRTStartup' c:\Users\pvs\documents\visual studio 2010\Projects\testee\testee\LINK testee


Last edited on
Find the occurrences of "vsphere" from your file.


[EDIT] The OP has removed his code. He had a typo: the implementation of function wrote csphere instead of vsphere.
Last edited on
I'm fairly sure this type of error occurs when you haven't properly linked a library. You need to modify your liker settings; In visual studio this can be done in project properties, under linker. In general you have "Additional library directories" where you need to include all of the libraries, you also need to state which .lib files you will be using under the input tab, inside of the "Additional dependencies" section. You can alternatively include the code:
 
#pragma comment(lib, "LibraryFile.lib") 

This only applies if you are using static libraries.
Topic archived. No new replies allowed.