[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Ltib] Problem including external libraries
From: |
Stuart Hughes |
Subject: |
Re: [Ltib] Problem including external libraries |
Date: |
Thu, 15 Dec 2011 13:30:26 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.23) Gecko/20110922 Lightning/1.0b2 Thunderbird/3.1.15 |
Hi Ricardo,
Take a look at the example helloworld package, which has c/cpp examples.
You can try this with:
./ltib -p helloworld -m prep # unpack for inspection in rpm/BUILD/
./ltib -p helloworld # build it
Look in dist/lfs-5.1/helloworld/helloworld.spec for the build instructions.
The problem you have is that you don't need to use CROSS in ltib as
within the build environment gcc etc is already spoofed to the cross
compiler.
Regards, Stuart
On 15/12/11 12:00, Ricardo Ungerer wrote:
Hello list,
I'm trying to build a very very simple c program:
========= main.cpp
#include<stdio.h>
#include<boost/filesystem.hpp>
int main( int argc, char* argv[] )
{
printf("Hello world \n" );
return 0;
}
=========
with this makefile:
========== Makefile
CROSS=arm-none-linux-gnueabi-
all: link_test
link_test: main.cpp
$(CROSS)g++ -lboost_filesystem -o link_test main.cpp
===========
the error reported i got is:
$ make ARCH=arm CROSS_COMPILER=arm-none-linux-gnueabi- KERNELDIR=../linux
main.cpp:6:32: error: boost/filesystem.hpp: No such file or directory
My objetive is to successfully include and link the link_test with
boost_filesystem. I included the boost package with "ltib
--configure"->package list->boost.
What i'm not catching here?
And how would i do the same with cmake?