0

I can't seem be able to fix this error:

1>main.obj : error LNK2019: unresolved external symbol "public: __cdecl btDefaultCollisionConfiguration::btDefaultCollisionConfiguration(struct btDefaultCollisionConstructionInfo const &)" (??0btDefaultCollisionConfiguration@@QEAA@AEBUbtDefaultCollisionConstructionInfo@@@Z) referenced in function main

I'm currently using Visual Studio 2017 (community edition) on Windows 10, Bullet Physics version 2.82-R2704. (I know this is an old version of bullet physics but I kept getting a fatal error on the newer version)

I know this is the older version, I've checked the additional independencies, and have included them in the additional include directory.

#include "Render.h"

#include <GL/glew.h>
#include <GL/freeglut.h>
#include <iostream>
#include <ctime>
#include "GLFW/wglext.h"
#include <btBulletDynamicsCommon.h>

/...Other unrelated code.../

int main(int argc, char** argv)
{
    // Initialize GLUT and 
    glutInit(&argc, argv);
    /* Enable a single OpenGL light. /
    glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH);        // Use single color buffer and no depth buffer.
    glutInitWindowSize(1920, 1080);         // Size of display area, in pixels.
    glutInitWindowPosition(0, 0);     // Location of window in screen coordinates.
    glutCreateWindow("HolOs"); // Parameter is window title.
    //glutSetCursor(GLUT_CURSOR_NONE);
    glutFullScreen();
    init();



    //Bullet Physics causing the error!!
    btDefaultCollisionConfiguration collisionConfiguration = new btDefaultCollisionConfiguration();
    //This line ^




    //Setting up swap intervals
    PFNWGLSWAPINTERVALEXTPROC       wglSwapIntervalEXT = NULL;
    PFNWGLGETSWAPINTERVALEXTPROC    wglGetSwapIntervalEXT = NULL;

    if (WGLExtensionSupported("WGL_EXT_swap_control"))
    {
        // Extension is supported, init pointers.
        wglSwapIntervalEXT = (PFNWGLSWAPINTERVALEXTPROC)wglGetProcAddress("wglSwapIntervalEXT");

        // this is another function from WGL_EXT_swap_control extension
        wglGetSwapIntervalEXT = (PFNWGLGETSWAPINTERVALEXTPROC)wglGetProcAddress("wglGetSwapIntervalEXT");
    }

    wglSwapIntervalEXT(1);


    glutReshapeFunc(reshape);
    glutDisplayFunc(display);            // Called when the window needs to be redrawn.
    glutIdleFunc(idleFunc);
    glutPassiveMotionFunc(mouseMovement); //check for mouse movement
    glutKeyboardFunc(keyPressed); // Tell GLUT to use the method "keyPressed" for key presses
    glutSpecialFunc(specialKeyPressed);
    glutMainLoop(); // Run the event loop!  This function does not return.
                    // Program ends when user closes the window.
    return 0;
}

that is the code line 27 is the problem

If anybody has any idea how to fix this it would be greatly appreciated

SeanBean
  • 1
  • 1
  • *included them in the additional include directory* But have you added the library folder and the libraries? – user4581301 Mar 23 '20 at 20:32
  • How are you linking the bullet physics libraries? – drescherjm Mar 23 '20 at 20:32
  • 1
    Could you please replace the error message image with plain text? It makes the searching easier for future askers and makes this important information to those who cannot see images and links for one reason or another (and there are a lot of reasons). – user4581301 Mar 23 '20 at 20:34
  • The obvious explanation is that you haven't linked with the appropriate libraries. This has nothing to do with incude directories which affect compilation only. – john Mar 23 '20 at 20:40
  • @drescherjm yeah sorry that was an error when I was copying the code into stack overflow. The original version didn't have that error – SeanBean Mar 23 '20 at 22:27

0 Answers0