I have a cross compiler and I know how to cross compile a file. But I am doing all just for glib compilation that I do not know how to do. Anyone to guide me. or generally just inform me how can I compile a complete library using gcc
-
You need to be more specific. You should be compiling with a cross-compiled version of 'glib' - and then you need to ensure that any paths will be relative to a cross-compiled 'glib' installation. This question needs more information.Brett Hale– Brett Hale2014-02-21 12:57:42 +00:00Commented Feb 21, 2014 at 12:57
-
just inform me how can I compile a complete library using gcc if I am given source files.Hafiz Muhammad Shafiq– Hafiz Muhammad Shafiq2014-02-21 13:17:24 +00:00Commented Feb 21, 2014 at 13:17
-
I think that there should be some changing in Makefile of glib then this thing may be possible but I am not certain about thisHafiz Muhammad Shafiq– Hafiz Muhammad Shafiq2014-02-21 13:24:03 +00:00Commented Feb 21, 2014 at 13:24
Add a comment
|
1 Answer
If the source code of library has a configure script try :
./configure --host=TARGET_PLATFORM
you must have TARGET_PLATFORM gcc installed .
e.g. : target=arm-linux-androideabi , so you should have arm-linux-androideabi-gcc and arm-linux-androideabi-ar & ... in your $PATH
If the source code does not provide 'configure' then export CROSS_COMPILE=TARGET_PLATFORM.
1 Comment
alireza_fn
suppose ABC is path to your cross-compiler(if it's not installed into OS) , use
export PATH=${PATH}:${ABC}/bin