This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compiler/CCSTUDIO: Adding Path Environment Variable to G++ compiler

Part Number: CCSTUDIO

Tool/software: TI C/C++ Compiler

Hello,  I'm trying to develop a GTK+ project in CCSv6 for an AM57x EVM (with the linux processor-sdk), and I'm running into some issues with the library dependencies of GTK+3.0.  Essentially, I need to be able to add the libraries to the compiler (arm-linux-gnueabihf), so that it will actually compile if I put in #include<gtk/gtk.h> as I would in gcc.

In CCSv6 I've gone through the Properties -> C/C++ Build -> Cross G++ Linker -> Libraries and added all of the required libraries (from a pkg-config --libs gtk+3.0 call).  I have also added the folder include paths necessary to build a GTK+ application.  I then went to build the application, and the libraries were not included in the console output, which makes me think they were never part of the compilation process.  

I have also tried to add the `pkg-config --libs gtk+-3.0` call to the compiler, which works on my terminal, but not on the compiler call.  It apparently cannot find the gtk+-3.0 package, even if I include the folder that has the gtk+-3.0.pc file.

I'm sure this is a relatively simple issue, really all I want is to be able to use the GTK+ libraries included with the linux processor SDK with the G++ cross-compiler.  

  • Tom Wallis said:
    In CCSv6 I've gone through the Properties -> C/C++ Build -> Cross G++ Linker -> Libraries and added all of the required libraries (from a pkg-config --libs gtk+3.0 call).  I have also added the folder include paths necessary to build a GTK+ application.  

    Please show a screen shot.

    Tom Wallis said:
    I then went to build the application, and the libraries were not included in the console output

    Did you get any diagnostics?  If so, please show them.

    Thanks and regards,

    -George

  • Screenshot 1

    Screenshot 2:

    Console output:

    08:18:41 **** Build of configuration Debug for project EVM_OSD ****
    make all
    Building file: ../GTK_OSD.cpp
    Invoking: Cross G++ Compiler
    arm-linux-gnueabihf-g++ -I/usr/lib/x86_64-linux-gnu/pkgconfig/ -I/usr/include/gtk-3.0/gtk -I/usr/include/gtk-3.0/gdk -I/home/tom/sitara/ti-processor-sdk-linux-am57xx-evm-03.02.00.05/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/include/opencv2 -I/home/tom/sitara/ti-processor-sdk-linux-am57xx-evm-03.02.00.05/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/include/opencv2 -I/home/tom/sitara/ti-processor-sdk-linux-am57xx-evm-03.02.00.05/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/include/cairo -I/home/tom/sitara/ti-processor-sdk-linux-am57xx-evm-03.02.00.05/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/include/gdk-pixbuf-2.0/gdk-pixbuf -I/home/tom/sitara/ti-processor-sdk-linux-am57xx-evm-03.02.00.05/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/include/pango-1.0/pango -I/home/tom/sitara/ti-processor-sdk-linux-am57xx-evm-03.02.00.05/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/include/glib-2.0 -I/home/tom/sitara/ti-processor-sdk-linux-am57xx-evm-03.02.00.05/linux-devkit/sysroots/armv7ahf-neon-linux-gnueabi/usr/lib/glib-2.0/include -O0 -g3 -Wall -c -fmessage-length=0 `pkg-config --libs gtk+-3.0` -MMD -MP -MF"GTK_OSD.d" -MT"GTK_OSD.o" -o "GTK_OSD.o" "../GTK_OSD.cpp"
    Package gtk+-3.0 was not found in the pkg-config search path.
    Perhaps you should add the directory containing `gtk+-3.0.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'gtk+-3.0' found
    In file included from ../GTK_OSD.cpp:3:0:
    /usr/include/gtk-3.0/gtk/gtk.h:30:21: fatal error: gdk/gdk.h: No such file or directory
    compilation terminated.
    make: *** [GTK_OSD.o] Error 1

  • Hello, I was wondering if we could further work into my question, as I put the screenshots up a week ago. Thank you.