error VGDB1000: undefined reference to `XStoreName’

Sysprogs forums Forums VisualGDB error VGDB1000: undefined reference to `XStoreName’

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #954
    Anonymous
    Participant

    Good afternoon,

    I am having a ton of errors performing a cross compilation of a project that normally compiles using make on the Raspberry pi system.

    I am attempting porting it into VisualGDB to perform my programming in visual studio.

    This project is using X11 headers and OpenGL ES2 headers.

    The steps I already performed are:

    sudo apt-get install libx11-dev
    Copy everything from OpenGl Include directories /opt/vc/include, /opt/vc/include/interface/vcos/pthreads , and /opt/vc/include/interface/vmcs_host/linux to C:SysGCCraspberryarm-linux-gnueabihfsysrootusrinclude
    In Visual Studio Under Tools->Linux Source Cache Manager add /opt/vc/include <- for some reason I cannot add the other two directories, because they are subdirectories of the first one.
    right click on solution – > Rescan solution

    Now in visual Studio I do not see any underlined errors, I can right click on XStoreName (x_display, win, title) and go to definition, which will take me to Xlib.h

    However, when I try to compile, I get the following errors:

    I need to know what I am missing in my include process, are these library errors? Do I need to link specific libraries?

    Thanks,

    error VGDB1000: undefined reference to `XStoreName’
    error VGDB1000: undefined reference to `XSetWMHints’
    error VGDB1000: undefined reference to `XSendEvent’
    error VGDB1000: undefined reference to `XPending’
    error VGDB1000: undefined reference to `XOpenDisplay’
    error VGDB1000: undefined reference to `XNextEvent’
    error VGDB1000: undefined reference to `XMapWindow’
    error VGDB1000: undefined reference to `XLookupString’
    error VGDB1000: undefined reference to `XInternAtom’
    error VGDB1000: undefined reference to `XCreateWindow’
    error VGDB1000: undefined reference to `XChangeWindowAttributes’
    error VGDB1000: undefined reference to `glViewport’
    error VGDB1000: undefined reference to `glVertexAttribPointer’
    error VGDB1000: undefined reference to `glUseProgram’
    error VGDB1000: undefined reference to `glShaderSource’
    error VGDB1000: undefined reference to `glLinkProgram’
    error VGDB1000: undefined reference to `glGetShaderiv’
    error VGDB1000: undefined reference to `glGetShaderiv’
    error VGDB1000: undefined reference to `glGetShaderInfoLog’
    error VGDB1000: undefined reference to `glGetProgramiv’
    error VGDB1000: undefined reference to `glGetProgramiv’
    error VGDB1000: undefined reference to `glGetProgramInfoLog’
    error VGDB1000: undefined reference to `glEnableVertexAttribArray’
    error VGDB1000: undefined reference to `glDrawArrays’
    error VGDB1000: undefined reference to `glDeleteShader’
    error VGDB1000: undefined reference to `glDeleteProgram’
    error VGDB1000: undefined reference to `glCreateShader’
    error VGDB1000: undefined reference to `glCreateProgram’
    error VGDB1000: undefined reference to `glCompileShader’
    error VGDB1000: undefined reference to `glClearColor’
    error VGDB1000: undefined reference to `glClear’
    error VGDB1000: undefined reference to `glBindAttribLocation’
    error VGDB1000: undefined reference to `glAttachShader’
    error VGDB1000: undefined reference to `glAttachShader’
    error VGDB1000: undefined reference to `eglSwapBuffers’
    error VGDB1000: undefined reference to `eglMakeCurrent’
    error VGDB1000: undefined reference to `eglInitialize’
    error VGDB1000: undefined reference to `eglGetDisplay’
    error VGDB1000: undefined reference to `eglGetConfigs’
    error VGDB1000: undefined reference to `eglCreateWindowSurface’
    error VGDB1000: undefined reference to `eglCreateContext’
    error VGDB1000: undefined reference to `eglChooseConfig’

    #3502
    Anonymous
    Participant

    Ok I found that this was a linker error.

    I needed to copy everything from /opt/vc/lib and libx11.so from /usr/lib/arm-linux-gnueabihf to C:SysGCClib

    Then in VisualGDB Project Properties,

    I needed to include include library names GLESv2 EGL m bcm_host X11 vcos vchiq_arm

    And Add C:SysGCClib to Library Include folders.

    Add -DRPI_NO_X to CFLAGS

    This allowed my application to compile and run,

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.