IrrBullet on Windows

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
dart_theg
Posts: 53
Joined: Sun Dec 29, 2024 3:13 am

IrrBullet on Windows

Post by dart_theg »

How do I setup IrrBullet for Windows? Every source says it's Linux only but surely that isn't true. https://github.com/danyalziakhan/irrBullet
n00bc0de
Posts: 116
Joined: Tue Oct 04, 2022 1:21 am

Re: IrrBullet on Windows

Post by n00bc0de »

You need to first setup bullet and add it to your project. After that, just add all the *.cpp files to your project and add the include folder to your include path.

NOTE: You may need to remove irrBulletKinematicCharacterController.cpp to get it to build. I had to remove it since it was causing build errors but it could be because of the version of bullet that I am using.
dart_theg
Posts: 53
Joined: Sun Dec 29, 2024 3:13 am

Re: IrrBullet on Windows

Post by dart_theg »

Any tips on getting the examples to build on Windows? Do I need to just make a fresh file etc. and connect it all together myself?
n00bc0de
Posts: 116
Joined: Tue Oct 04, 2022 1:21 am

Re: IrrBullet on Windows

Post by n00bc0de »

The makefiles in the examples have a windows target.

Just run this:

Code: Select all

make all_win32
Alternatively, you can
1. Create a new project in your IDE of choice
2. Setup bullet ( NOTE: its different in every IDE so you should look this up for the IDE you are using )
3. Add all the *.cpp files from IrrBullet to your project
4. Add the include folder from IrrBullet to your include path ( NOTE: same as in step 2, look up how to do this for your IDE )
5. Add the *.cpp files for the example you want to build
6. Build

As I mentioned before, I had to remove the kinematic character controller from my project but I wasn't using it anyway so it wasn't a problem for me. Everything else works just fine.

I am using IrrBullet on Windows, Linux, Web, and Android and it works just fine across every platform. Its basically the same build process on every platform as well. The only part that may be challenging is setting up bullet itself since that is going to be different for every IDE and build environment.
dart_theg
Posts: 53
Joined: Sun Dec 29, 2024 3:13 am

Re: IrrBullet on Windows

Post by dart_theg »

I wonder if I built Bullet wrong or something, I get a TON of linker errors when following your steps.

https://i.imgur.com/8LWy3mr.png
n00bc0de
Posts: 116
Joined: Tue Oct 04, 2022 1:21 am

Re: IrrBullet on Windows

Post by n00bc0de »

I would upload a video of me going through setting up the project but I use codeblocks and it looks like you are using visual studio so it wouldn't help you since they are completely different.

I think the last time I saw an unresolved symbol error the issue was that I was using a 32-bit library with a 64-bit build. I would start there.

The other thing you should check is that you are linking against all the libraries you need to be linking. Bullet has multiple different libraries to link and the names change slightly depending on what version of bullet you are using and how you built it (ie. make, cmake, visual studio project, etc.)
dart_theg
Posts: 53
Joined: Sun Dec 29, 2024 3:13 am

Re: IrrBullet on Windows

Post by dart_theg »

You might be right hm. Also I can use code blocks, I have it installed. A video would be appreciated!
n00bc0de
Posts: 116
Joined: Tue Oct 04, 2022 1:21 am

Re: IrrBullet on Windows

Post by n00bc0de »

I just got a new computer so I am going to have to re-install everything anyway. I will record my steps on getting everything setup.
n00bc0de
Posts: 116
Joined: Tue Oct 04, 2022 1:21 am

Re: IrrBullet on Windows

Post by n00bc0de »

Here is the video of me setting up irrbullet. It has not been edited so its long and it has me basically troubleshooting build issues until it works. I will try to have the files from my project up soon but I did this on a brand new computer and showed myself going from installing codeblocks and downloading bullet to getting the project working so you should be able to get the same results.

https://youtu.be/Y61Oh_w-_fM
dart_theg
Posts: 53
Joined: Sun Dec 29, 2024 3:13 am

Re: IrrBullet on Windows

Post by dart_theg »

Thanks! I’ll take a look at this. Huge help.
dart_theg
Posts: 53
Joined: Sun Dec 29, 2024 3:13 am

Re: IrrBullet on Windows

Post by dart_theg »

Awesome video, though I just get one issue at the very end:
https://i.imgur.com/uOUVs4K.png

I am using the Win64 release of Irrlicht if that is an issue. This happens when I put in the Hello World example.
dart_theg
Posts: 53
Joined: Sun Dec 29, 2024 3:13 am

Re: IrrBullet on Windows

Post by dart_theg »

I think I know why. I am using my VisualStudio-compiled Irrlicht .dll instead of the gcc one. Any way for me to use the VisualStudio one?
n00bc0de
Posts: 116
Joined: Tue Oct 04, 2022 1:21 am

Re: IrrBullet on Windows

Post by n00bc0de »

dart_theg wrote: Tue Aug 19, 2025 3:17 am I think I know why. I am using my VisualStudio-compiled Irrlicht .dll instead of the gcc one. Any way for me to use the VisualStudio one?
As far as I know, each compiler (GCC, Visual C++, Clang, etc.) has there own library formats that are not really compatible with each other for C++ ( C can be compatible though).

I don't use Visual Studio so I can't really help you out with building all of this in Visual Studio. I took the easy route in this video of just building bullet's and Irrbullet's source into the executable to avoid having to build the dlls for each one so you should be able to do the same thing in Visual Studio as well. Then you just need to link the Visual Studio library which is usually a *.lib file.

@CuteAlien may be more help with setting this up in Visual Studio.
CuteAlien
Admin
Posts: 9926
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: IrrBullet on Windows

Post by CuteAlien »

Sorry, not familiar with irrBullet so far. But in general all libraries work with the same 4 steps:
1. You have to include the headers in your sources.
2. You have to set the include path for the compiler to find those headers.
In VS by adding it in: Properties - C/C++ - General - Additional Include Directories
3. You have to add the library to the linker. 2 options to do that:
- You can do that in the project files or in VS by adding it to Properties - Linker - Input - Additional Dependencies.
- You can also do the #pragma comment(lib, "my.lib") thing directly in the source file (Irrlicht examples do that)
Also in VS there are 2 types of lib files. They can be for static linking or for dynamic linking (works slightly different in gcc for dynamic libraries).
So make sure you got the right one. If you don't do that you get linker errors about unresolved externals.
4. You have to set the linker path so the linker finds that library. If it doesn't find it then it complains about that.
In VS you add the linker path in: Properties - Linker - General - Additional Library Directories

If you work with dll's there is 5th step that you need to add the dll in a place where the executable finds it. Otherwise you get an error when starting the binary that it doesn't find the dll.

GCC and VS dll's should usually not be mixed. It's possible in some cases in others it won't work. Just avoid it if you can or unless you know what you do.

If you have additional files besides the libraries like for irrBullet then you have 2 options. Simplest one - add all the .cpp files to your project directly. Or make it into a library and then use the above steps to use that library (a library is basically an archive of .obj files created by compile .cpp files, so that's the same result in the end).

There are some exceptions to the rules above, like header-only libraries which won't need the linking steps. And fun stuff like loading dll's in more complicated ways. But in general that's it. And with gcc it's very similar, thought you probably use another IDE or Makefiles, so you have to find out where to add the include and linker paths and how to add the library to link.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
dart_theg
Posts: 53
Joined: Sun Dec 29, 2024 3:13 am

Re: IrrBullet on Windows

Post by dart_theg »

Ok, all I need to do is compile Bullet properly. I'll let you guys know if I get it all working. Appreciate the help!
Post Reply