Errors compiling C++ code with VS 2015

I followed tutorial, panda3d.org/manual/index.ph … tudio_2008, to make my VS project.
(release mode, Add directories and libraries)

When I compiled with following tutorial, panda3d.org/manual/index.ph … sy_Scenery, I got 2 errors, " ‘NodePath **__p__environmen(void)’: overloaded function differs only by return type from ‘char ***__p__environ(void)’ " and " ‘__p__environ’: ‘NodePath **(void)’ differs in levels of indirection from ‘char ***(void)’ ".

Error occurs on declare of environ variable, but I don’t know why.

How can I solve this problem?

Hmm, I’ve not tried using VS 2015 before, but I’m curious - were you able to recompile all of Panda3D for VS 2015 successfully first? Note that the downloadable Panda builds are compiled with VS 2010 and you cannot use them with VS 2015 - you would have to recompile Panda and its thirdparty packages from source.

Thanks for replying.

I downloaded source and third-party codes of version 1.8.1; and tried to compile it by makepanda\makepanda.sln but failed.

Of course I used release Configuration to build project but I got message, “Unable to start program 'PANDAPATH\built\makepanda.exe”.

Also I followed tutorial:
panda3d.org/manual/index.ph … on_Windows
but I failed on step 4 with error “Could not find Visual Studio install directory”

How can I make projects on Visual Studio 2015. :cry:

That page is obsolete. I’ve removed it from the manual.

I tried Visual Studio 2015 the other day, and there is apparently an option to target the Win71 SDK with it. Assuming that you ticked the options to include the compatibility packages when installing Visual Studio 2015, you should be able to go to your project settings and look for the “Platform Toolset” option; set it to “Windows7.1SDK”.

I haven’t tried it, but in theory, this will allow you to use the standard Panda build without having to recompile Panda and all of the thirdparty packages.

Of course, don’t forget to change the settings to match the Panda configuration, such as disabling the Unicode character set, using Release instead of Debug, and removing NDEBUG from the preprocessor definitions.

I’ll work on a tutorial for using Panda with Visual Studio 2015.

I’ve created a tutorial for compiling a C++ program with VS 2015 with the 1.9+ SDK from the download page.

panda3d.org/manual/index.ph … nguage=cxx

I’m so very sorry to necro this thread with my first post on this forum.

I tried compiling the C++ tutorials in the Manual with VS2015, including setting it up using the link provided previously. But it doesn’t work… At least on Windows 10 x64, with the Windows 7.1 SDK (including latest patch) and the Panda3D SDK 1.9.1 x64.

Error in the log:

Building with the VS2015 Toolset:
I was able to compile and run all tutorials in the manual up until Using Intervals to move the Panda.
With the default VS2015 Platform Toolset, targeting 8.1 (which supposedly, according to MS, also targets 7.1).

To be specific: this particular Tutorial will build, but crash on launch with the settings mentioned previously.

Will it help to re-compile the Panda3D source (and 3rd party libraries) in VS2015 with the VS2015 Toolset?
i.e. Am I wasting my time on trying to compile with VS2015 and the Windows 7.1 SDK on Windows 10?

Known Issues with Windows 10 and the 7.1 SDK:
I know there are a lot of people having issues with the Windows 7.1 SDK on Windows 10, but none of the so-called solutions have worked in getting this baby to compile.

PS: The Manual doesn’t mention Unicode character settings at all.

To build Panda3D with VS2015, you would have to compile the thirdparty packages with VS2015 yourself first.
If you are using a Panda3D build compiled with VS2010 (which for example the sdk and buildbot builds use), then you will also have to use VS2010 to compile your program, since visual studio versions are not compatible.
If you use a different version, It might build, but it will certainly crash.

Strange. Is that the only error in the log? I’m not sure what required file it thinks is missing. As tobspr said, you really can’t use any platform setting other than the Windows 7.1 SDK.

As for the unicode setting, it needs to be disabled.

Thanks for the quick replies!
Yes, it is the only error.
Either the Windows 7.1 SDK is incompatible with Windows 10, with VS2015 or my SDK is borked.
I guess I’ll find out soon enough, as I’m installing VS2010 Express and it’s Service Pack as we speak.

If the error persists, might I ask either one of you to help me find what’s wrong with my 7.1 SDK?
That is, if either one of you has Windows 10 installed.
I know of some things to compare between us. e.g. some registry entries, SDK directories and SDK batch files.

Edit:
VS2010 Express SP1 seems to be able to build it fine using the settings from the Manual.
Thanks for the support!

Another question about the Character Set:
It works when I set it to Not Set, is this what you meant?
There is another option for multi-byte?

Hmm, Windows SDK and compiler set are notoriously finicky to install properly. Installing them in the wrong order can have different results, and there are a bunch of hotfixes and service packs as well. Perhaps you are lacking either the Visual C++ SP1 or the “Compiler Update” hotfix that needs to be run after installing the MSVC 2010 SP1.

“Not Set” is probably fine. Especially if it works. :slight_smile:

Thanks for the clarification on the Character Set. :smiley:

I had the Compiler Update hotfix before I installed MSVC 2010 SP1, because I read of the issues people had.
Then after installing MSVC 2010 SP1 I installed the hotfix again.

Well, everything seems to work, although not in MSVC 2015… Which is a shame.

I did notice however, that I couldn’t compile the SDK installer with the provided Solution file (MSVC 2008?).
It converts to MSVC 2010 without issues. But when building, makepanda.bat is unable to find the thirdparty folder. As if the environment variable the batch file’s looking for isn’t set…

But the makepanda.bat works fine as-is, so I suppose it’s not much of a problem.

PS: Which province do you reside in rdb?

Hmm, yeah, the .sln is very outdated and has not been used for a while. I’m not surprised it doesn’t work any more. I’ll remove it from future versions. In the future we will move to a different build system, CMake, which should make building Panda for a different version of MSVC a lot easier.

Ik woon in ZH.

Cool to hear! Can’t wait for CMake!

Ik ook. :wink: