Using Panda3D with codeblocks and mingw compiler

Admins forgive…

Using C ++ and Panda3D - Example WIN 7, 64bit.

To minimize errors.

Step 1.

Removes all versions Microsoft .NET Framework
Removes Visual C++ 2010 Redistributable

Step 2.

Install Microsoft.NET Framework 4
Install SDKs v7.1

Step 3.

Panda3d compile from source.

Checking without an IDE

Step 1. Create file Game.cpp

insert:

#include "C:\built_x64\include\pandaFramework.h" 
#include "C:\built_x64\include\pandaSystem.h" 
int main(int argc, char *argv[]) { 
//open a new window framework 
PandaFramework framework; 
framework.open_framework(argc, argv); 
//set the window title to My Panda3D Window 
framework.set_window_title("My Panda3D Window"); 
//open the window 
WindowFramework *window = framework.open_window(); 
//here is room for your own code 
//do the main loop, equal to run() in python 
framework.main_loop(); 
//close the window framework 
framework.close_framework(); 
return (0); 
}

Step 2. Create file run.bat

insert:

call “C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd” /x64 /Release
cl /EHca Game.cpp C:\built_x64\lib\libp3framework.lib C:\built_x64\lib\libpanda.lib C:\built_x64\lib\libpandaexpress.lib C:\built_x64\lib\libp3dtool.lib C:\built_x64\lib\libp3dtoolconfig.lib C:\built_x64\lib\libp3pystub.lib C:\built_x64\lib\libp3direct.lib
pause

Run, upon successful compilation. Go to the IDE.

Use IDE – CodeBlocks

Without words:

Hi Serega,

Thanks for the extensive reply, but I have a big problem.
It seems you cannot uninstall .net in windows 10.

I have looked through the remove apps in control panel and it isn’t there.
Apparently in windows 10 they made .net 4.6 part of the operating system, and it cannot be removed.

Which means I can’t install the older .net v4 and I can’t install the sdk 7.

I couldn’t try this out straight away however because my render took 20 hours.

I will do a bit more reading up. I may find an answer.

Hi, Maybe you should go back.

Then adjust the screenshots CodeBlocks.

I found this information useful for you.

Hi Serega,

Спасибо

Will look into this in a couple of days. Trying to fit this in between other projects at the moment.
I wonder if I am the only one going through all these loops to get it working heh heh.

PS. Downloaded the panda3dmaster and the thirdparty thingy, and haven’t got a clue what to do with them LOL.I suppose I have to run some command line thing, but not sure how to do it yet.

kind regards
Asimov

In the folder, create a Panda, bat file.

Insert,

thirdparty\win-python3.5-x64\python.exe makepanda/makepanda.py --everything --msvc-version=14 --windows-sdk=10

run

The compiler installed?

Hi Serega,

Right I copied thirdparty folder into panda3d-master folder and I ran the batch file with your line in it. It took ages but finally it finished and it created a new folder in panda3d-master called built_x64. In the built_64 seems to be the same files I have installed on my computer, but it is obviously freshly compiled.

Now originally I used the Panda3D-SDK-1.9.2-x64.exe and installed it.
Do I just copy the built_x64 files over my current installation, or do I have to uninstall v1.9.2 first?

There is no installer in the built_x64, just the files mind.

So I was wonderng what the correct thing to do is?

Panda3D-SDK-1.9.2-x64

Initially, assembly on site is compiled with VS 10

Your new assembly must conform
VC 15

What would you makepanda terminal from the beginning?

There version compiler.

I am not forcing you but I recommend learning Python. It is a simple language for anyone to grip.

It is very bad that Panda3D does not support MinGW. In addition Panda3D can be installed for release only from pre-build SDK. If you want to have an ability to debug you should to build Panda3D from source. I do not use MSVC because it requires a lot of space on my laptop. If you want to use Panda3D from Qt Creator you can follow my step-by-step insctuction: [Tutorial] How to Set Up Panda3D in Qt Creator IDE on Windows 10 Please, make ability to use MinGW and make pre-build version for debugging and releasing.

It is in fact possible to compile Panda3D using MinGW, and it has been done before. I recommend using the CMake support that currently exists on the master branch. If you run into problems, let us know.

1 Like

It is cool! I will try. Thank you!