RTC Forums
November 24, 2024, 05:11:21 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: RTC Components not available in multi-divice application  (Read 9367 times)
Rob van Tour
RTC License+
****
Posts: 8


« on: January 23, 2015, 10:48:50 AM »

Hi Danijel,

I installed v6.15 (2013.Q2) on my XE7 machine.
I can use the RTC components in the VCL enviroment, but they are unavailable in Multi-device applications.
Probably forgot something.

Can you help?

Best regards,

Rob van Tour
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #1 on: January 23, 2015, 11:18:01 AM »

Delphi XE7 was far from being released in 2013 Q2 Smiley

Please, download and install the latest version (at least v6.48 from Q4 2014).

Best Regards,
Danijel Tkalcec
Logged
Rob van Tour
RTC License+
****
Posts: 8


« Reply #2 on: January 23, 2015, 11:35:55 AM »

Thank you verry much
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #3 on: January 23, 2015, 12:00:56 PM »

You're welcome.

By the way (now that we've opened the subject) ...

I recommend everyone to keep their local RTC SDK copy up-to-date with the latest quarterly RTC SDK releases (2014 Q4 is the current one), because there is always a possibility that bugs or problems from earlier versions have already been fixed. This is why, if anyone who is not currently using the latest version reports a problem, the first thing I ask is to update your local copy to the latest RTC SDK release. Keeping your local copy up-to-date doesn't guarantee being bug- and problem-free, but it does minimize the possibility of encountering old bugs or problems which have already been fixed.

Also, developers who keep their local copy up-to-date help me (and everyone else using the components) to keep the latest version clean from regression bugs (breaking things that have previously been working) by reporting issues with the latest version. Sometimes it's not one particular thing that causes problems, but the use of one component or function in combination with another. Even though I do try to test everyting before releasing an update, I can not test all possible situations and combinations in which you could be using the components.

Thank you Smiley

Best Regards,
Danijel Tkalcec
Logged
Rob van Tour
RTC License+
****
Posts: 8


« Reply #4 on: January 23, 2015, 12:49:34 PM »

Danijel

It worked perfectly.
But..somehow I got a new error.

Some undeclared identifiers
     timeval;
     gettimeofday

Does this have anything to do with the installation?
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #5 on: January 23, 2015, 01:03:10 PM »

1. Before installing the components, did you use "Build" on the package file to make sure all the units are recompiled for the Win32 platform (which is the platform used by the Delphi IDE)?

2. After creating your mobile Project and activating the mobile platform you are targetting, did you use "Build" on the Project to make sure that all the units are recompiled for that specific platfom (I guess you are targetting iOS or Android)?

Best Regards,
Danijel Tkalcec
Logged
Rob van Tour
RTC License+
****
Posts: 8


« Reply #6 on: January 23, 2015, 01:15:21 PM »

Yes I Build it before installing and get this error building my project.
Strange
I am trying to make a simple app for my nexus 7.
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #7 on: January 23, 2015, 01:28:00 PM »

Is it possible that you have multiple RTC SDK versions on your local drive and that your Delphi Library path is now pointing to the wrong one?

Best Regards,
Danijel Tkalcec
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #8 on: January 23, 2015, 01:39:19 PM »

Let's try to get to the bottom of this problem.

Please, add this unit to the "uses" clause:

Posix.SysTime

Then, copy/paste this piece of code (including the $IFNDEF section at the end) to the implenentation section of your unit:

function GetTickTime:Cardinal;
    var
      tv: timeval;
    begin
    gettimeofday(tv, nil);
    Result := int64(tv.tv_sec) * 1000 + tv.tv_usec div 1000;
    end;
{$IFNDEF POSIX}
Not Posix???
{$ENDIF}

... and let me know if it compiles for Android. If not, let me know where you get the error.

Best Regards,
Danijel Tkalcec
Logged
Rob van Tour
RTC License+
****
Posts: 8


« Reply #9 on: January 23, 2015, 02:02:57 PM »

Thank you Danijel

I tried it, but I get a new error.

In unit rtcThrPool(971)

destructor TRtcWorkerThread.Destroy;
  begin
  try
    ClosingThread(self);

Error: Constant object cannot be passed as a var parameter.
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #10 on: January 23, 2015, 02:17:09 PM »

How is the "ClosingThread" procedure declared in your local RTC SDK copy in the unit where you get that error? I have the feeling that your Delphi compiler is mixing old RTC SDK Lib files, because that error message makes absolutely no sense when looking at the current declaration of the ClosingThread procedure in the latest release.

Best Regards,
Danijel Tkalcec
Logged
Rob van Tour
RTC License+
****
Posts: 8


« Reply #11 on: January 23, 2015, 02:20:59 PM »

Its declared like this

procedure ClosingThread(var Thr:TRtcWorkerThread);

I removed the old installation but not the files.
Ill check the type-library
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #12 on: January 23, 2015, 02:24:48 PM »

Yep, this is definitely a line from some very old RTC SDK version.
The current version has this declaration:

procedure ClosingThread(const Thr:TRtcWorkerThread);

Best Regards,
Danijel Tkalcec
Logged
Rob van Tour
RTC License+
****
Posts: 8


« Reply #13 on: January 23, 2015, 02:27:27 PM »

Yes you're right.
Deleted it from win32 but forgot to do that for Android to.....

Thank you!
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #14 on: January 23, 2015, 02:33:23 PM »

Maybe I should have mentioned that newer Delphi versions (XE and beyond) have a separate Library Path setting for each supported target platform, so you need to add/update paths to the RTC SDK "Lib" folder for each platform separately (Win32, Win64, MacOSX, iOS and Android) for the compiler to find the RTC files.

Best Regards,
Danijel Tkalcec
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.029 seconds with 16 queries.