VisualGDB and glib-2.0

Sysprogs forums Forums VisualGDB VisualGDB and glib-2.0

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

    Hi,

    i’m evaluating VisualGDB and trying to cross-compile my existing project (single c-file, compiled on raspberry pi with gcc, no makefile) in Visual Studio 2008 and VisualGDB.

    On the raspberry Pi I used the following command, to compile my source:
    gcc -o my_app `pkg-config –cflags glib-2.0` my_app.c `pkg-config –libs glib-2.0`

    My first VisualGDB test project (hello world) works great, but if i try to compile my_app.c I get an error:
    fatal error: glib.h: No such file or directory

    On the Raspberry I installed the glib-2.0 via apt-get. How can I install it on my windows machine for cross compiling and how can I tell VisualGDB to link it?

    Thank you!

    #3357
    ket
    Participant

    Hi,

    Please refer to the wiringPi tutorial for an example on how to use libraries with cross-toolchains:
    http://visualgdb.com/tutorials/raspberry/wiringPi/

    In short you need to resynchronize the sysroot of the toolchain and add the library name to the list of libraries in the makefile.

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