oseid
Posts: 1
Joined: Thu Jan 19, 2017 4:19 pm

Issues with VideoCore header files

Thu Jan 19, 2017 4:25 pm

Hello, I'm a relatively new raspberry pi user. I like doing graphics programming, so I was trying out EGL and GLES version 2. I wrote a minimal program, but when I tried to compile it, I keep getting issues with included vcos files. For example, /opt/vc/include/interface/vcos/vcos.h had the line #include "interface/vcos/vcos_init.h". However, vcos_init.h is in the same directory as vcos.h so this include causes a compilation error. I tried editing these files to include the correct file paths, but the same problem is happening with pretty much all the files. Has anyone else had this issue? Am I making some silly mistake?

User avatar
Paeryn
Posts: 2952
Joined: Wed Nov 23, 2011 1:10 am
Location: Sheffield, England

Re: Issues with VideoCore header files

Thu Jan 19, 2017 6:31 pm

oseid wrote:Hello, I'm a relatively new raspberry pi user. I like doing graphics programming, so I was trying out EGL and GLES version 2. I wrote a minimal program, but when I tried to compile it, I keep getting issues with included vcos files. For example, /opt/vc/include/interface/vcos/vcos.h had the line #include "interface/vcos/vcos_init.h". However, vcos_init.h is in the same directory as vcos.h so this include causes a compilation error. I tried editing these files to include the correct file paths, but the same problem is happening with pretty much all the files. Has anyone else had this issue? Am I making some silly mistake?
How does this cause an error? What flags are you passing to the compiler? You should have at least

Code: Select all

-I/opt/vc/include -I/opt/vc/include/interface/vmcs_host/linux -I/opt/vc/include/interface/vcos/pthreads
The first bit of that says that /opt/vc/include is one of the directories to search for header files which will correctly allow #include "interface/vcos/vcos_init.h" since the full path for that header is /opt/vc/include/interface/vcos/vcos_init.h

Don't edit the headers in /opt/vc/include, doing so could prevent them working properly.
She who travels light — forgot something.

Return to “OpenGLES”