set_window_title error

Hello all, I found Panda last night and since I’ve had absolutely no luck with Direct3D I thought I’d try it out. I’m currently going through the tutorials and I’ve encountered a problem (in ‘Hello World’ of all things).

I can get the program to compile and run successfully, however when the window loads up I get some nonsense for the window title instead of what I put in the set_window_title function.

Now, the truly odd thing is that this only happens in the release build of the executable. I tried running a debug build to see if I could pinpoint the actual problem (I was missing python26_d.lib so I just copied python26.lib and renamed it. I know; naughty, naughty me.) but the window title worked perfectly.

I’ve been running google searches of this for the better part of the day and although I have found other people with the same issues, the topics are all 1 month+ old and there’s no solution to be found so instead of necroposting I thought I’d re-open this issue.

Operating System: Microsoft Windows Vista x64
Panda Version: 1.7.0
IDE/Compiler: MSVC++ 2010 Express

Thanks in advance to anyone who can offer some sort of guidance with this. My code is as follows:

#include <pandaFramework.h>
#include <pandaSystem.h>

#pragma comment(lib,"libp3framework.lib")
#pragma comment(lib,"libpanda.lib")
#pragma comment(lib,"libpandafx.lib")
#pragma comment(lib,"libpandaexpress.lib")
#pragma comment(lib,"libp3dtool.lib")
#pragma comment(lib,"libp3dtoolconfig.lib")
#pragma comment(lib,"libp3pystub.lib")
#pragma comment(lib,"libp3direct.lib")

PandaFramework framework;

int main(int argc, char** argv)
{
    framework.open_framework(argc, argv);
    framework.set_window_title("My Panda3D Window");
    WindowFramework *window = framework.open_window();

    //Code goes here

    framework.main_loop();
    framework.close_framework();

    return 0;
}

Hey, welcome to the forums!

I think the problem is that you’re using MSVC++ 2010, and not 2008. The downloadable SDK build of Panda3D was compiled against 2008, and we’ve received numerous reports of crashes or undefined behaviour when trying to use 2010.

Thanks for the speedy reply

Do you think that recompiling from source in 2010 would fix the issue? I’d really rather not downgrade back to 2008 now that I’ve got 2010 working with all my other projects…

It would, but you may need to make alterations to the build system and recompile several thirdparty packages from scratch.

Ah, sounds like a pain. I’ll just try installing 2008 instead. Thanks for the help.