ceclipselibrary-path

Eclipse: Add external lib for c project Not working


I have done the following:

  1. Create new c project (Makefile Project with Existing Code)
  2. Added a build variable that my Makefile complained about
  3. Now my source .c file complains about #include files because it does not know where the lib folder is,I tried adding lib folder to library path (DID NOT WORK).

How can I link my project to an external lib folder so that my .c source file can read the .h files needed for the #include?

I added the library path to Paths and Symbols->Includes BUT when I go back to the project it only shows the root folder and nothing inside it. Do I also have to add each individual .so lib file?


Solution

  • ok so I figured it out:

    (1) At the start I had a source.c and a MAKEFILE (2) Create new c project (Makefile Project with Existing Code) (3) MAKEFILE complained about a variable so I added it to environment variable (4) #include files complained so I added external library like so (a) I located my library path and found that there is a folder before /lib called include (b) The include folder had a list of header files (c) So I added the path to the include folder NOT the lib folder under paths and symbols include

    WORKED LIKE A CHARM!