Results 1 to 3 of 3

Thread: Including my own library with anjuta without hardcoding include path

  1. #1
    Join Date
    May 2007
    Beans
    23

    Including my own library with anjuta without hardcoding include path

    I'm trying to develop an application which uses it's own shared library, after opening the anjuta project in anjuta and comparing it with mine I got it to work however I had to hardcode the includepath, like this:
    Code:
    #include "/home/myname/projectname/lib/lib.h"
    Does anyone know how to make it compile without hardcoding the path?

    Many thanks

  2. #2
    Join Date
    Sep 2009
    Beans
    72

    Re: Including my own library with anjuta without hardcoding include path

    Code:
    #include "headers/header.h"
    In the makefile You can use I (capital i):
    -I/path/to/the/header.h

    + maybe:
    -L/path/to/the/library.so -l(lowercase L)name_of_the_library (without "lib" and ".so", eg. libfltk.so => -lfltk)
    Last edited by januzi; November 2nd, 2009 at 01:34 AM.

  3. #3
    Join Date
    May 2007
    Beans
    23

    Re: Including my own library with anjuta without hardcoding include path

    Thanks it worked, I added this line -I '$(top_builddir)/lib/' with the '', in the entry field for C compiler flags under advanced target proeprties.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •