Quantcast

Re: How to link libs?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to link libs?

Craig Hughes
On May 14, 2007, at 10:58 AM, Jeff Sadowski wrote:

> how do I link libs in buildroot?
>
> I got popt built using the following
>
>
> CC=/root/gumstix-verdex-buildroot-1370/build_arm_nofpu/staging_dir/
> bin/arm-linux-gcc
> ./configure --host=arm
> --prefix=/root/gumstix-verdex-buildroot-1370/build_arm_nofpu/root/
> make&&make install
>
> It seems to have built just fine and installed
>
> but when I try and compile another program that needed it I get the  
> following
>
> make
> /root/gumstix-verdex-buildroot-1370/build_arm_nofpu/staging_dir/bin/
> arm-linux-gcc
> -DLINUX -shared iguanaIR.o support.o dataPackets.o pipes.o base.o
> -lpopt -lrt -o libiguanaIR.so
> /root/gumstix-verdex-buildroot-1370/build_arm_nofpu/staging_dir/bin-
> ccache/../lib/gcc/arm-linux-uclibcgnueabi/4.1.1/../../../../arm-
> linux-uclibcgnueabi/bin/ld:
> cannot find -lpopt
> collect2: ld returned 1 exit status
>
> If I look it is there
>
> find /root/gumstix-verdex-buildroot-1370/build_arm_nofpu/root/ -
> name "*libpopt*"
> /root/gumstix-verdex-buildroot-1370/build_arm_nofpu/root/lib/libpopt.a
> /root/gumstix-verdex-buildroot-1370/build_arm_nofpu/root/lib/
> libpopt.la

If it's a .a (ie static library) then you probably want it in  
build_arm_nofpu/staging_dir/lib not in root/lib since it doesn't want  
to be on the gumstix once installed, it just want to be linkable  
against on the host while building.  Once you've got it in  
staging_dir, if -lpopt isn't working, just add a -L/path/to/
staging_dir/lib before the -lpopt and it should find it.

C


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to link libs?

Dave Hylands
Hi Jeff,

On 5/14/07, Jeff Sadowski <[hidden email]> wrote:
> how do I link libs in buildroot?

The same way you'd do it with any other software package.

-lpopt just tells the compiler that there is a library called
libpopt.a out there somewhere that you'd like to use.

-Ldirectory tells the compiler where to look when looking for libraries.

If you run the compiler (arm-linux-uclibcgnueabi-gcc with the option
-print-search-dirs, then it will print a complete list of all of the
"builtin" locations that it will search for programs and libraries
(the output is rather large).

If you want things to work without specifying the library, then the
"standard" place to put it is in build_arm_nofpu/staging_dir/lib

--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to link libs?

Jeff Sadowski
thanks Craig thanks Dave you guys are awesome.

On 5/14/07, Dave Hylands <[hidden email]> wrote:

> Hi Jeff,
>
> On 5/14/07, Jeff Sadowski <[hidden email]> wrote:
> > how do I link libs in buildroot?
>
> The same way you'd do it with any other software package.
>
> -lpopt just tells the compiler that there is a library called
> libpopt.a out there somewhere that you'd like to use.
>
> -Ldirectory tells the compiler where to look when looking for libraries.
>
> If you run the compiler (arm-linux-uclibcgnueabi-gcc with the option
> -print-search-dirs, then it will print a complete list of all of the
> "builtin" locations that it will search for programs and libraries
> (the output is rather large).
>
> If you want things to work without specifying the library, then the
> "standard" place to put it is in build_arm_nofpu/staging_dir/lib
>
> --
> Dave Hylands
> Vancouver, BC, Canada
> http://www.DaveHylands.com/
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> gumstix-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gumstix-users
>

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to link libs?

Jeff Sadowski
sweet that worked changing the place I installed popt

export CC=/root/gumstix-verdex-buildroot-1370/build_arm_nofpu/staging_dir/bin/arm-linux-gcc
cd <popt directory>
./configure --host=arm \
--prefix=/root/gumstix-verdex-buildroot-1370/build_arm_nofpu/staging_dir/
make clean; make;make install

On 5/14/07, Jeff Sadowski <[hidden email]> wrote:

> thanks Craig thanks Dave you guys are awesome.
>
> On 5/14/07, Dave Hylands <[hidden email]> wrote:
> > Hi Jeff,
> >
> > On 5/14/07, Jeff Sadowski <[hidden email]> wrote:
> > > how do I link libs in buildroot?
> >
> > The same way you'd do it with any other software package.
> >
> > -lpopt just tells the compiler that there is a library called
> > libpopt.a out there somewhere that you'd like to use.
> >
> > -Ldirectory tells the compiler where to look when looking for libraries.
> >
> > If you run the compiler (arm-linux-uclibcgnueabi-gcc with the option
> > -print-search-dirs, then it will print a complete list of all of the
> > "builtin" locations that it will search for programs and libraries
> > (the output is rather large).
> >
> > If you want things to work without specifying the library, then the
> > "standard" place to put it is in build_arm_nofpu/staging_dir/lib
> >
> > --
> > Dave Hylands
> > Vancouver, BC, Canada
> > http://www.DaveHylands.com/
> >
> > -------------------------------------------------------------------------
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2 express and take
> > control of your XML. No limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
> > _______________________________________________
> > gumstix-users mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/gumstix-users
> >
>

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Loading...