Sysprogs forums › Forums › VisualGDB › Visual GDB Crosscompile Lib for Raspi, Header not found in /opt folder
- This topic has 6 replies, 2 voices, and was last updated 8 years, 2 months ago by Jodo.
-
AuthorPosts
-
September 14, 2016 at 14:50 #9057JodoParticipant
To include the pylon5 Library to my project I have done theses steps:
- build library on Raspberry Pi, the build files are located in /opt/pylon5, I did test a sample on the linux system, it compiles and runs just fine
- in VS synchronize the /opt folder
- I am using CMake, therefore under CMake project settings:
- add =/opt/pylon5/libs to Library directories & add =/opt/pylon5/include to Include directories (both folders exist!)
- add the needed library names to Library names
- Build!
When I want to Include e.g. #include <pylon/PylonIncludes.h> and compile, I get an error that the header file is not found. Wired thing is, the intellisense suggests the files exists and I can go there by right click -> open file.
Also: If I take out the pylon5 from the opt folder and put it into a path somewhere else relative to my app project folder and use e.g. ../../dependencies/pylon5/include & ../../dependencies/pylon5/libs than It compiles without error. But of course when it runs on the Linux System It doesnt work cause it cant finde the libs there. When I manually add /opt/pylon5 to the LD_LIBRARY_PATH on the Linux system, I can run the application with >> ./testapplication without error in the console. But that is not a workflow I want to follow from now on …
So long story short, basically I would like to know, why the =/opt/include directory is not found when I compile the application?
Regards, Johannes
September 15, 2016 at 01:46 #9061supportKeymasterHi,
Most likely there is a typo somewhere in the settings. Please try adding the -v option to CFLAGS/CXXFLAGS to force gcc to output the include search directories it uses. Then simply compare the listed directories with the command line shown in the build log. This should explain why the file is not found.
September 15, 2016 at 07:51 #9067JodoParticipantOkay, the adding -v to CFLAGS & CXXFLAGS helped clear things up. Visual GDB makes this
=/opt/libName/include
to this:
C:/root-directory-of-application/=/opt/libName/include
where as it should use this directory:
C:/SysGCC/raspberry/arm-linux-gnueabihf/sysroot/opt/libName/include.I had to manually put this in, because when I use the Configuration UI, use the Edit Directory button and move to the the inlude folder inside the SysGCC directory it automaticly puts =/opt/libName/include into the Include directories field. Maybe something worth looking into.
September 15, 2016 at 18:59 #9068supportKeymasterHi,
Oops, his looks like a bug. Does the C:/root-directory-of-application/=/opt/libName/include path appear on the command line, or does it only appear in the verbose GCC output? Perhaps some other setting or a small typo somewhere is interfering with it? Could you share the entire build log showing the command lines and the diagnostic output from gcc?
September 16, 2016 at 08:48 #9071JodoParticipantNot sure what you mean by command line. The include path only appears when the -v flag is set. I uploaded the Visual Studio Output (with verbose flags being set) and some images about my CMake Project settings to dropbox:
https://www.dropbox.com/sh/ieux9ef65gzjgep/AAAxKm4hMLBJ7Wowe1XtwVJDa?dl=0
September 16, 2016 at 18:43 #9077supportKeymasterHi,
Thanks very much for sharing this, it is indeed a VisualGDB bug. We have fixed it in this build: http://sysprogs.com/files/tmp/VisualGDB-5.2.8.1132.msi
Please open your VisualGDB Project Properties and change the Include Directories field arbitrarily (e.g. add and remove a space), then press OK. VisualGDB will then update the CMakeLists.txt correctly.
September 21, 2016 at 09:11 #9103JodoParticipantJust for info: I can confirm that it is working with this version. Thanks
-
AuthorPosts
- You must be logged in to reply to this topic.