Recent

Author Topic: Cross compile  (Read 7523 times)

Microges2000

  • New Member
  • *
  • Posts: 24
Cross compile
« on: March 22, 2012, 08:09:15 am »
Dear,

I do not know if you know Codetrypoon... however.
I tried the cross compile from Windows 32 bit to Linux and work well but I have a little problem.
If I set how operating sistem Linux and I try to compile a empy library the linker give the following error

Options changed, recompiling clean with -B
C:\codetyphon\fpc\bin\i386-win32\arm-linux-ld.exe: warning: link.res contains output sections; did you forget -T?
C:\codetyphon\fpc\bin\i386-win32\arm-linux-ld.exe: cannot find /lib/ld-linux.so.3
test1.lpr(16,32) Error: Error while linking
test1.lpr(16,32) Fatal: There were 1 errors compiling module, stopping

but if I simple trasform the word Library in Program all work well.

Someone have idea?

Thanks,
David

Andru

  • Full Member
  • ***
  • Posts: 112
    • Homepage
Re: Cross compile
« Reply #1 on: March 22, 2012, 08:30:21 am »
You need to specify a path to libdl.so from Android NDK via Custom Options of project. Something like this:
Code: [Select]
-FL${LazarusDir}..\android-ndk-r7\platforms\android-3\arch-arm\usr\lib\libdl.so[code]

Microges2000

  • New Member
  • *
  • Posts: 24
Re: Cross compile
« Reply #2 on: March 22, 2012, 08:47:19 am »
You need to specify a path to libdl.so from Android NDK via Custom Options of project. Something like this:
Code: [Select]
-FL${LazarusDir}..\android-ndk-r7\platforms\android-3\arch-arm\usr\lib\libdl.so[code]

Very very Thanks

Microges2000

  • New Member
  • *
  • Posts: 24
Re: Cross compile
« Reply #3 on: March 22, 2012, 09:58:03 am »
Another little thing

If i try to perform ant command I have the follow error

BUILD FAILED
C:\codetyphon\lazarus\examples\androidlcl\android\build.xml:83: Cannot find C:\Programmi\Android\android-sdk-windows\tools\ant\build.xml imported from C:\codetyphon\lazarus\examples\androidlcl\android\build.xml

the problem is that into android-sdk-windows\tools\ant the file build.xml dont exist.
I tried to copy the file from android-sdk-linux but do not work

Some idea?

LA.Center

  • Full Member
  • ***
  • Posts: 244
    • LA.Center
Re: Cross compile
« Reply #4 on: March 31, 2012, 08:33:37 pm »
the ant needs a build.xml and some property files, I sugest that you copy those file from an existing android project.

I have attached them (remove .txt from all attached files) -> IMPORTANT: you have to adjust the path in local.properties file pointing to your android SDK.

I have a question though, how did you get the cross-compiler to work on win32, I tried it a couple of times and it failed.

Which version of CodeTyphon are you using?

Leledumbo

  • Hero Member
  • *****
  • Posts: 8111
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Cross compile
« Reply #5 on: April 01, 2012, 05:42:42 am »
Quote
I have a question though, how did you get the cross-compiler to work on win32, I tried it a couple of times and it failed.
I don't use the codetyphon version, but the cross compiler indeed works in win32. How? The same way it works on lin32.