# Panda Warnings

I am just getting started with panda, just going through the manual (panda3d.org/manual/index.php/Starting_Panda3D)
I followed all instructions as listed and it compiles and links fine (except the errors) but when i debug it, it crashes. these are the warnings.

1>c:\panda3d-1.6.2\python\include\pyconfig.h(51) : warning C4005: ‘HAVE_IO_H’ : macro redefinition
1> c:\panda3d-1.6.2\include\dtool_config.h(56) : see previous definition of ‘HAVE_IO_H’
1>c:\panda3d-1.6.2\include\socket_address.h(182) : warning C4996: ‘sprintf’: This function or variable may be unsafe. Consider using sprintf_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(366) : see declaration of ‘sprintf’
1>c:\panda3d-1.6.2\include\time_clock.h(195) : warning C4996: ‘gmtime’: This function or variable may be unsafe. Consider using gmtime_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\time.inl(101) : see declaration of ‘gmtime’
1>c:\panda3d-1.6.2\include\time_clock.h(198) : warning C4996: ‘gmtime’: This function or variable may be unsafe. Consider using gmtime_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\time.inl(101) : see declaration of ‘gmtime’
1>c:\panda3d-1.6.2\include\time_clock.h(212) : warning C4996: ‘localtime’: This function or variable may be unsafe. Consider using localtime_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\time.inl(114) : see declaration of ‘localtime’
1>c:\panda3d-1.6.2\include\time_clock.h(218) : warning C4996: ‘localtime’: This function or variable may be unsafe. Consider using localtime_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\time.inl(114) : see declaration of ‘localtime’
1>c:\panda3d-1.6.2\include\time_clock.h(250) : warning C4996: ‘sprintf’: This function or variable may be unsafe. Consider using sprintf_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(366) : see declaration of ‘sprintf’
1>c:\panda3d-1.6.2\include\time_clock.h(264) : warning C4996: ‘localtime’: This function or variable may be unsafe. Consider using localtime_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\time.inl(114) : see declaration of ‘localtime’
1>c:\panda3d-1.6.2\include\time_clock.h(298) : warning C4996: ‘sprintf’: This function or variable may be unsafe. Consider using sprintf_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(366) : see declaration of ‘sprintf’
1>c:\panda3d-1.6.2\include\time_clock.h(311) : warning C4996: ‘gmtime’: This function or variable may be unsafe. Consider using gmtime_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\time.inl(101) : see declaration of ‘gmtime’
1>c:\panda3d-1.6.2\include\time_span.h(372) : warning C4996: ‘sprintf’: This function or variable may be unsafe. Consider using sprintf_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(366) : see declaration of ‘sprintf’
1>c:\panda3d-1.6.2\include\time_span.h(375) : warning C4996: ‘sprintf’: This function or variable may be unsafe. Consider using sprintf_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(366) : see declaration of ‘sprintf’
1>c:\panda3d-1.6.2\include\time_span.h(378) : warning C4996: ‘sprintf’: This function or variable may be unsafe. Consider using sprintf_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(366) : see declaration of ‘sprintf’
1>c:\panda3d-1.6.2\include\time_span.h(381) : warning C4996: ‘sprintf’: This function or variable may be unsafe. Consider using sprintf_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(366) : see declaration of ‘sprintf’
1>c:\panda3d-1.6.2\include\time_span.h(384) : warning C4996: ‘sprintf’: This function or variable may be unsafe. Consider using sprintf_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(366) : see declaration of ‘sprintf’
1>c:\panda3d-1.6.2\include\time_general.h(161) : warning C4996: ‘sscanf’: This function or variable may be unsafe. Consider using sscanf_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(324) : see declaration of ‘sscanf’

The HAVE_IO_H error is harmless, as far as I know. I get it with my build and have no issues.

The other warnings, I do not get. They’re a part of MSVC 2003 SP1 and above. They’re just complaints about using the non-safe versions of stdlib functions, and shouldn’t effect the running of Panda at all. I don’t get them on my end, though.

If you’re using makepanda and want to debug, then you’re a bit out of luck if you’re using the current version downloaded from the website. It’s broken and won’t generate a proper debug build when passed the --optimize option. It’s been fixed, but it’s only in the latest CVS HEAD.

Here is a thread about building a debug Panda3d along with a debug Python.

ok i seem to of isolated the problem. when i tried (framework.set_window_title(“Hello World!”)
it crashed because of a bad pointer to “Hello World!” i belive. if i opt out that part it works just fine. after looking through the threads it doesn’t look like a common problem, ill see about fixing it, does anybody have any suggestions?

That sounds like you’re mixing Release and Debug builds. A crash on string operations is a common symptom of this kind of mistake.

If you are compiling an application to link against the Panda build provided here, you must compile your application in Release mode, not in Debug mode. This is because this Panda build is generated in Release mode, and the two modes aren’t compatible with each other.

David

I feel so lost now, because i did exactly just that. then i applied those .lib files to all builds and of course it did not work (just seeing the differences) and then i removed the .lib files from the debug and now it works perfectly o.O what exactly am i missing here… yes the problem is fixed but i still love to learn. oh and btw, thx you very much

Sorry, I don’t really understand your question. What exactly happened, and what are you trying to understand?

David

i act as i think, its a horrid habit, as i was writing a explination and going through my steps i just realized the build was set to debug sigh o.O is there a list of common problems? not specific to any section on the forums?

It would be a very long list. The “debug” vs. “release” confusion is mentioned on the C++ building page, but maybe it should be emphasized more strongly.

David