0

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

3
  • 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. Commented Feb 21, 2014 at 12:57
  • just inform me how can I compile a complete library using gcc if I am given source files. Commented 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 this Commented Feb 21, 2014 at 13:24

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

1 Comment

suppose ABC is path to your cross-compiler(if it's not installed into OS) , use export PATH=${PATH}:${ABC}/bin

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.