Sysprogs forums › Forums › VisualGDB › error VGDB1000: undefined reference to `XStoreName’
- This topic has 1 reply, 1 voice, and was last updated 9 years, 11 months ago by Anonymous.
-
AuthorPosts
-
December 25, 2014 at 23:15 #954AnonymousParticipant
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 solutionNow 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’December 26, 2014 at 01:17 #3502AnonymousParticipantOk 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,
-
AuthorPosts
- You must be logged in to reply to this topic.