Not able to include library and header from other project

Hi,

I am trying to write a C++ library so I created a C/C++ Project in Legato Application Framework. I am able to build this library. I have created a header file in this library named “interface.h” and I have named my library “libEcuM.a” .

Now, I want to use this library in another C/C++ application which is creating an executable.

I have added the libEcuM.a library to requires section in Component.cdef file of my executable application.

requires:
{
device:
{
[rw] /dev/ttyHSL1 /dev/
}

lib:
{
    libEcuM.a
}

}

When I include “interface.h” header in my Application and try to build it, I get following error:

/home/warlord/legato/workspace/HelloWorld/HelloWorldComponent/HelloWorldComponent.c:7:23: fatal error: interface.h: No such file or directory
#include “interface.h”
^
compilation terminated.

Please help me resolve this issue.

Thanks,
Yogesh

Hello Yogesh,

Here is an extract of a *.cdef file of a Legato Component, where calls to libcurl are done:

cflags: {
	"-I/path/to/a/folder/on/the/built/machine/containing/curl/header/files/"
...
}
ldflags: {
	"-lcurl"
...
}

Regards,
flu.