Recent

Author Topic: New OpenGL Android Example  (Read 97290 times)

Jonathan

  • New Member
  • *
  • Posts: 40
Re: New OpenGL Android Example
« Reply #15 on: November 17, 2011, 07:25:31 am »
Hi  felipemdc,At the Step 4,build the project using Lazarus,An error happens,thank you!

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: New OpenGL Android Example
« Reply #16 on: November 17, 2011, 07:30:26 am »
Did you really do everything described in step 4?

Please post a screenshot of your project options->paths
« Last Edit: November 17, 2011, 07:33:14 am by felipemdc »

Jonathan

  • New Member
  • *
  • Posts: 40
Re: New OpenGL Android Example
« Reply #17 on: November 17, 2011, 08:04:25 am »
Do I have to download the lastest  lazarus SVN???  I use the crosscompiler as I did in the "  First steps of LCL-Android are ready"
« Last Edit: November 17, 2011, 08:06:30 am by Jonathan »

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: New OpenGL Android Example
« Reply #18 on: November 17, 2011, 08:06:56 am »
Your "Messages" screenshot is cutted, please paste here the full messages.

Also a screenshot of Project Options -> Code Generation would be good.

Rustam Asmandiarov

  • New Member
  • *
  • Posts: 46
Re: New OpenGL Android Example
« Reply #19 on: November 17, 2011, 08:15:03 am »
felipemdc what you think about my previous post?

Jonathan

  • New Member
  • *
  • Posts: 40
Re: New OpenGL Android Example
« Reply #20 on: November 17, 2011, 08:18:07 am »
Do I have to download the lastest  lazarus SVN???  I use the crosscompiler,lazarus,fpc as I did in the "  First steps of LCL-Android are ready" the same!

AS pictures show:       

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: New OpenGL Android Example
« Reply #21 on: November 17, 2011, 08:24:30 am »
Just GLScene 1.2 uses the C # naming style modules, such as GLScene.Base.OpenGL.Tokens.pas it's only available in 2.7.1, if you add in 2.5.1 the same opportunity that would be great!

The work for doing this is huge, one would have to branch out a FPC 2.5.1 from aprox. 19th January and then merge things which added this feature hoping that there will be no incompatibilities and test everything. No chance I'm doing this huge work.

Your best change is to either:

1> Wait until 2.7 is fixed for Android
or
2> to modify GLScene so that it doesn't use the points in filenames. Why did they do that anyway? That breaks compatibility with released FPC versions.

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: New OpenGL Android Example
« Reply #22 on: November 17, 2011, 08:27:24 am »
Do I have to download the lastest  lazarus SVN???

I don't know, I tested this with Lazarus SVN, I simply don't know if something will fail in Lazarus 0.9.30

Quote
AS pictures show:       

Ah, not this Messages, but the same one which you already posted a screenshot for in your first message when you wrote this:

> Hi  felipemdc,At the Step 4,build the project using Lazarus,An error happens,thank you!

There are 2 linker errors, the first is a Warning. I cannot read the warning till the end of the line in your screenshot.

Rustam Asmandiarov

  • New Member
  • *
  • Posts: 46
Re: New OpenGL Android Example
« Reply #23 on: November 17, 2011, 08:28:48 am »
Just GLScene 1.2 uses the C # naming style modules, such as GLScene.Base.OpenGL.Tokens.pas it's only available in 2.7.1, if you add in 2.5.1 the same opportunity that would be great!

The work for doing this is huge, one would have to branch out a FPC 2.5.1 from aprox. 19th January and then merge things which added this feature hoping that there will be no incompatibilities and test everything. No chance I'm doing this huge work.

Your best change is to either:

1> Wait until 2.7 is fixed for Android
or
2> to modify GLScene so that it doesn't use the points in filenames. Why did they do that anyway? That breaks compatibility with released FPC versions.

Thank you, I consulted with the developers how best to do it!
Prompt please link to the repository Compiler 2.5.1

Спасибо, я посовещаюсь с разработчиками как лучше сделать!
Подскажите пожалуйста ссылку на репозиторий компилятора 2.5.1
« Last Edit: November 17, 2011, 08:32:23 am by Rustam Asmandiarov »

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: New OpenGL Android Example
« Reply #24 on: November 17, 2011, 08:38:44 am »
Prompt please link to the repository Compiler 2.5.1

2.5.1 from 19th January is the Free Pascal Trunk from 19th January:

http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/

Here you can check which revisions match it. For example this one matches it:

http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=rev&revision=16750

You can download this with these commands:

svn checkout http://svn.freepascal.org/svn/fpc/trunk fpctrunk
cd fpctrunk
svn up -r 16750

In the beginning of February a Android break was introduced, so I would only use revision from January as a starting point.

After you download the sources from January to need to modify them in your local copy or copy them to a new repository of your own to work on them, which you can open for example in sourceforge.

Jonathan

  • New Member
  • *
  • Posts: 40
Re: New OpenGL Android Example
« Reply #25 on: November 17, 2011, 08:39:11 am »
ah ah  ah!  sorry! These 2 errors as the follows:
Code: [Select]
ndkopengltest.pas(37,11) Note: Local variable "dummy" not used
ndkopengltest.pas(204,19) Hint: Local variable "engine" does not seem to be initialized
ndkopengltest.pas(194,11) Hint: Local proc "android_main" is not used
/home/hotcyy/lazarus/fpc/binutils/ld: warning: /home/hotcyy/lazarus-ccr/bindings/android-ndk/examples/opengltest/android/libs/armeabi/link.res contains output sections; did you forget -T?
/home/hotcyy/lazarus/fpc/binutils/ld: cannot find -lGLESv1_CM
ndkopengltest.pas(36,1) Error: Error while linking
ndkopengltest.pas(36,1) Fatal: There were 1 errors compiling module, stopping

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: New OpenGL Android Example
« Reply #26 on: November 17, 2011, 08:43:39 am »
Does your -Fl directory really exist? Could you show what is inside it?

Jonathan

  • New Member
  • *
  • Posts: 40
Re: New OpenGL Android Example
« Reply #27 on: November 17, 2011, 09:17:47 am »
I download the lastest svn and try again,but meet the same errors!   The  lib includes "libGLESv1_CM.so".....
« Last Edit: November 17, 2011, 09:30:45 am by Jonathan »

Rustam Asmandiarov

  • New Member
  • *
  • Posts: 46
Re: New OpenGL Android Example
« Reply #28 on: November 17, 2011, 10:18:42 am »
And what about dynlibs whether it will work in android with openGL? At the moment he calls the error:

/usr/local/bin/arm-linux-ld: warning: link.res contains output sections; did you forget -T?
/usr/local/bin/arm-linux-ld: skipping incompatible /usr/lib/crti.o when searching for /usr/lib/crti.o
/usr/local/bin/arm-linux-ld: cannot find /usr/lib/crti.o

Even with the compiler 2.5.1
I understand that the need for dynlibs it's silly, but it is needed for a project in which the module header record is 6000 lines of code and redo it all for android is even more foolish.

А что насчет dynlibs будет ли он работать в android с openGL? на данный момент он вызывает ошибки:
--------
Даже с компилятором 2.5.1
Я понимаю что надобность в dynlibs это глупо, но он нужен для проекта в котором модуль с заголовочными записями занимает 6 тысяч строчек кода и переделывать все это для андроида еще глупее.
« Last Edit: November 17, 2011, 10:43:37 am by Rustam Asmandiarov »

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: New OpenGL Android Example
« Reply #29 on: November 17, 2011, 10:52:35 am »
I download the lastest svn and try again,but meet the same errors!   The  lib includes "libGLESv1_CM.so".....

Strange, here it works in my Mageia 1 Linux. Which Linux are you using? Are you using my pre-compiled compiler?

If you right click the messages window and select "Copy all shown and hidden messages to clipboard" does it show more messages?

Another idea is to try to build in the command line to see if more messages appear. You can see which options Lazarus is using to call fpc by going to Project Options->Show Options

then copy that and try a command line build and see if more messages appear from the linker.

One idea also might be trying to remove the last "/lib" from the -Fl no idea if it will work, however

 

TinyPortal © 2005-2018