[SOLVED] Trying to compile the Window Framework sample code

Hi,

I’ve been working in Panda3D in python for a week and a bit but need to move to the C++ version but have hit a hurdle straight away.

I set up the project fine in VC2010 and used the Window Framework code from the manual but I get a runtime error in ostream.

After searching the forums someone else with a runtime error trying to run the tutorial project got a reply saying they had to use VC2008 because the DLLs were compiled using 2008, so I downloaded VC2008 and set up a new project but the problem is that I can’t even get it to compile now.

It doesn’t seem to be able to find the precompiled header for the project:

Any idea what I should do to fix this? I can’t find a similar thread but sorry if it has already been posted.

Thanks for your time,

Poncho

I’ve never seen that error before, but it certainly seems like something’s not right with your VS2008 project. It doesn’t seem related to Panda.

Can you create another project to compile something successfully without using Panda? If that doesn’t work, then something’s wrong with your VS2008 altogether. If it does work, then something went wrong when you set up your Panda project; try setting it up again.

David

Thanks for the reply drwr, I only have VC2010 on my home computer (I was on my laptop before), so attempted to build the Window Framework sample code in 2010 again but get a runtime error in ostream.

I’d much rather work with 2010 if I could so I was wondering if this was possible, I’ve got it set to Release and it compiles and loads but then at runtime I get the error in ostream:

And it occurs on line 572:

I have set up my project exactly as it says to in the Manual. Is there anything this could be or do I have to go back to 2008?

Thanks for your time.

You cannot build with 2010, unless you download the source code of Panda and build all of Panda using 2010. You will probably have to compile many of the third-party libraries for 2010 as well. The two compilers do not produce compatible code, so if any part of the system is compiled with 2008, it all has to be compiled with 2008.

Ah okay I see what you mean, thanks for the response.

It was just the info in the “setting up for MVC2008” that talks about MVC2010 that threw me a little.

I’ll try sorting out that 2008 issue.

Okay found the 2008 problem.

So if anyone else has the same error, create your project as a Console Application BUT ALSO check the “empty project” checkbox, otherwise the compiler doesn’t like you later on when you delete some of the precompiled header stuff for just raw Panda like I did.

If you make an empty project in the first place, it’s all happy.