|
|
|
|
|
|
1>------ Build started: Project: planet_project, Configuration: Debug Win32 ------ 1>Compiling... 1>mycode.cpp 1>c:\users\banehallow\documents\visual studio 2008\projects\planet_project\planet_project\mycode.cpp(20) : warning C4996: 'scanf': This function or variable may be unsafe. Consider using scanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. 1> c:\program files (x86)\microsoft visual studio 9.0\vc\include\stdio.h(306) : see declaration of 'scanf' 1>text.cpp 1>Generating Code... 1>Linking... 1>text.obj : error LNK2005: "int mkey" (?mkey@@3HA) already defined in mycode.obj 1>text.obj : error LNK2005: "int * G" (?G@@3PAHA) already defined in mycode.obj 1>text.obj : error LNK2005: "int * R" (?R@@3PAHA) already defined in mycode.obj 1>text.obj : error LNK2005: "float Ratio" (?Ratio@@3MA) already defined in mycode.obj 1>text.obj : error LNK2005: "int mstate" (?mstate@@3HA) already defined in mycode.obj 1>text.obj : error LNK2005: "int n" (?n@@3HA) already defined in mycode.obj 1>text.obj : error LNK2005: "int * B" (?B@@3PAHA) already defined in mycode.obj 1>text.obj : error LNK2005: "float camrot_ang" (?camrot_ang@@3MA) already defined in mycode.obj 1>text.obj : error LNK2005: "float camrot_x" (?camrot_x@@3MA) already defined in mycode.obj 1>text.obj : error LNK2005: "float camrot_y" (?camrot_y@@3MA) already defined in mycode.obj 1>text.obj : error LNK2005: "float camrot_z" (?camrot_z@@3MA) already defined in mycode.obj 1>text.obj : error LNK2005: "float sunrev" (?sunrev@@3MA) already defined in mycode.obj 1>text.obj : error LNK2005: "float delsunrev" (?delsunrev@@3MA) already defined in mycode.obj 1>text.obj : error LNK2005: "float delplanetrev" (?delplanetrev@@3MA) already defined in mycode.obj 1>text.obj : error LNK2005: "float delang" (?delang@@3MA) already defined in mycode.obj 1>text.obj : error LNK2005: "float planetrev" (?planetrev@@3MA) already defined in mycode.obj 1>text.obj : error LNK2005: "float planetrot" (?planetrot@@3MA) already defined in mycode.obj 1>text.obj : error LNK2005: "int fullscreen" (?fullscreen@@3HA) already defined in mycode.obj 1>text.obj : error LNK2005: "float zdist" (?zdist@@3MA) already defined in mycode.obj 1>text.obj : error LNK2005: "float * AmbientLight" (?AmbientLight@@3PAMA) already defined in mycode.obj 1>text.obj : error LNK2005: "float * DiffuseLight" (?DiffuseLight@@3PAMA) already defined in mycode.obj 1>text.obj : error LNK2005: "float * SpecularLight" (?SpecularLight@@3PAMA) already defined in mycode.obj 1>text.obj : error LNK2005: "float * SpecRef" (?SpecRef@@3PAMA) already defined in mycode.obj 1>text.obj : error LNK2005: "float * LightPos" (?LightPos@@3PAMA) already defined in mycode.obj 1>text.obj : error LNK2005: "unsigned char Shine" (?Shine@@3EA) already defined in mycode.obj 1>text.obj : error LNK2005: "float * mx" (?mx@@3PAMA) already defined in mycode.obj 1>text.obj : error LNK2005: "float * my" (?my@@3PAMA) already defined in mycode.obj 1>text.obj : error LNK2005: "float zoom" (?zoom@@3MA) already defined in mycode.obj 1>text.obj : error LNK2005: "float orbitDegrees" (?orbitDegrees@@3MA) already defined in mycode.obj 1>text.obj : error LNK2005: "float planetcount" (?planetcount@@3MA) already defined in mycode.obj 1>text.obj : error LNK2005: "int totcol" (?totcol@@3HA) already defined in mycode.obj 1>C:\Users\Banehallow\Documents\Visual Studio 2008\Projects\planet_project\Debug\planet_project.exe : fatal error LNK1169: one or more multiply defined symbols found 1>Build log was saved at "file://c:\Users\Banehallow\Documents\Visual Studio 2008\Projects\planet_project\planet_project\Debug\BuildLog.htm" 1>planet_project - 32 error(s), 1 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== |
the thing is it compiles properly, but this error is genrated. |
error LNK2005: "int totcol" (?totcol@@3HA) already defined in mycode.obj |
extern
in other.h and removed all initializations in that header. now it executes, but this is the error later..'planet_project.exe': Loaded 'C:\Users\Banehallow\Documents\Visual Studio 2008\Projects\planet_project\Debug\planet_project.exe', Symbols loaded. 'planet_project.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll' 'planet_project.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll' 'planet_project.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll' 'planet_project.exe': Loaded 'C:\Windows\SysWOW64\opengl32.dll' 'planet_project.exe': Loaded 'C:\Windows\SysWOW64\msvcrt.dll' 'planet_project.exe': Loaded 'C:\Windows\SysWOW64\advapi32.dll' 'planet_project.exe': Loaded 'C:\Windows\SysWOW64\sechost.dll' 'planet_project.exe': Loaded 'C:\Windows\SysWOW64\rpcrt4.dll' 'planet_project.exe': Loaded 'C:\Windows\SysWOW64\sspicli.dll' 'planet_project.exe': Loaded 'C:\Windows\SysWOW64\cryptbase.dll' 'planet_project.exe': Loaded 'C:\Windows\SysWOW64\gdi32.dll' 'planet_project.exe': Loaded 'C:\Windows\SysWOW64\user32.dll' 'planet_project.exe': Loaded 'C:\Windows\SysWOW64\lpk.dll' 'planet_project.exe': Loaded 'C:\Windows\SysWOW64\usp10.dll' 'planet_project.exe': Loaded 'C:\Windows\SysWOW64\glu32.dll' 'planet_project.exe': Loaded 'C:\Windows\SysWOW64\ddraw.dll' 'planet_project.exe': Loaded 'C:\Windows\SysWOW64\dciman32.dll' 'planet_project.exe': Loaded 'C:\Windows\SysWOW64\setupapi.dll' 'planet_project.exe': Loaded 'C:\Windows\SysWOW64\cfgmgr32.dll' 'planet_project.exe': Loaded 'C:\Windows\SysWOW64\oleaut32.dll' 'planet_project.exe': Loaded 'C:\Windows\SysWOW64\ole32.dll' 'planet_project.exe': Loaded 'C:\Windows\SysWOW64\devobj.dll' 'planet_project.exe': Loaded 'C:\Windows\SysWOW64\dwmapi.dll' 'planet_project.exe': Loaded 'C:\Windows\SysWOW64\glut32.dll', Binary was not built with debug information. 'planet_project.exe': Loaded 'C:\Windows\SysWOW64\winmm.dll' 'planet_project.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc90.debugcrt_1fc8b3b9a1e18e3b_9.0.21022.8_none_96748342450f6aa2\msvcr90d.dll', Symbols loaded. 'planet_project.exe': Loaded 'C:\Windows\SysWOW64\imm32.dll' 'planet_project.exe': Loaded 'C:\Windows\SysWOW64\msctf.dll' 'planet_project.exe': Loaded 'C:\ProgramData\BrowserProtect\2.6.1125.80\{c16c1ccb-7046-4e5c-a2f3-533ad2fec8e8}\BrowserProtect.dll' 'planet_project.exe': Loaded 'C:\Windows\SysWOW64\shell32.dll' 'planet_project.exe': Loaded 'C:\Windows\SysWOW64\shlwapi.dll' 'planet_project.exe': Loaded 'C:\Windows\SysWOW64\version.dll' 'planet_project.exe': Loaded 'C:\Windows\SysWOW64\imagehlp.dll' 'planet_project.exe': Loaded 'C:\Windows\SysWOW64\psapi.dll' First-chance exception at 0x1000a8f5 in planet_project.exe: 0xC0000005: Access violation writing location 0x000000a8. Unhandled exception at 0x76fa15de in planet_project.exe: 0xC0000005: Access violation writing location 0x000000a8. |