#1 2014-12-01 12:54:37

aruncs08
Member
Registered: 2014-10-13
Posts: 27

File not found:'Contnrs.dcu' while trying to run through iOS simulator

Hi,

I am working with the iOS application. I am using latest mORMotNightlyBuild version.

On the client side when I am trying to compile through an activated iOS Simulator, I got an error- File not found:'Contnrs.dcu'.

And also, do we have any example for iOS application using mORMot client and server?

Could anyone help me regarding this issue?

Thanks in advance.

Offline

#2 2014-12-01 14:10:06

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,206
Website

Re: File not found:'Contnrs.dcu' while trying to run through iOS simulator

Use syncrossplatform units for the client.

Offline

#3 2014-12-01 14:18:06

aruncs08
Member
Registered: 2014-10-13
Posts: 27

Re: File not found:'Contnrs.dcu' while trying to run through iOS simulator

Hi AB!

I have already used these 2 units under my Uses section: SynCrossPlatformREST, SynCrossPlatformSpecific

FYI: These are my units in the Uses section of Client side other than standard Firemonkey units:

SynCommons,
mORMot,
SynCrossPlatformREST, SynCrossPlatformSpecific,
mORMotHttpClient, // HTTP client to a mORMot RESTful server
RESTModel; // data model unit, shared between server and client

Last edited by aruncs08 (2014-12-01 14:21:31)

Offline

#4 2014-12-01 18:31:38

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,206
Website

Re: File not found:'Contnrs.dcu' while trying to run through iOS simulator

Do not use mORMotHttpClient but only SynCrossPlatformREST.

Offline

#5 2014-12-02 09:06:21

aruncs08
Member
Registered: 2014-10-13
Posts: 27

Re: File not found:'Contnrs.dcu' while trying to run through iOS simulator

Thanks, but another Error popped up: File not found: 'Windows.dcu'

This error is shown under 'SynCrossPlatformSpecific' class.

Now I have removed mORMotHttpClient and using only SynCrossPlatformREST.

Any suggestions?

Last edited by aruncs08 (2014-12-02 09:42:42)

Offline

#6 2014-12-03 07:32:32

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,206
Website

Re: File not found:'Contnrs.dcu' while trying to run through iOS simulator

Are you sure your SynCrossplatform.inc file is up-to-date?
The following lines:

    {$if CompilerVersion >= 23.0}
      {$define ISDELPHIXE2} // e.g. for Vcl.Graphics
      {$ifndef MSWINDOWS}
      {$define USETMONITOR}
      {$endif}
    {$ifend}

are needed to define USETMONITOR, which would use TMonitor instead of the fastest Windows API when run in cross-platform mode.

Offline

#7 2014-12-03 09:38:06

Wim314
Member
Registered: 2014-12-03
Posts: 13

Re: File not found:'Contnrs.dcu' while trying to run through iOS simulator

Had the same error.
Does it pass above part of the .inc? Isn't it catched by the NEXTGEN section for iOS...

Offline

#8 2014-12-03 09:54:18

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,206
Website

Re: File not found:'Contnrs.dcu' while trying to run through iOS simulator

Indeed.
This was a regression.

Should be fixed by http://synopse.info/fossil/info/b9a67c7917
Thanks Wim for the report!

Offline

#9 2014-12-03 11:48:11

aruncs08
Member
Registered: 2014-10-13
Posts: 27

Re: File not found:'Contnrs.dcu' while trying to run through iOS simulator

I have updated the fix now. But again, it's shows an Error: [DCC Fatal Error] SynCommons.pas(675): F1026 File not found: 'Contnrs.dcu'

Still, it hasn't solved. Any other suggestions please.

Btw, Thanks AB and Wim314 .

Offline

#10 2014-12-03 12:18:20

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,206
Website

Re: File not found:'Contnrs.dcu' while trying to run through iOS simulator

@aruncs08
I guess your project is mixing units.
If you use SynCrossPlatform* units, you should NOT link SynCommons.pas to your application.
All the needed types (e.g. RawUTF8 or TModTime) are defined in SynCrossPlatformREST, not in SynCommons, when using cross-platform clients.

Offline

#11 2014-12-04 09:44:20

aruncs08
Member
Registered: 2014-10-13
Posts: 27

Re: File not found:'Contnrs.dcu' while trying to run through iOS simulator

@AB: Yes, I understood and fixed in the Client side and Model class. But how can I use only SynCrossPlatform* units in the mORMot Server side program?

It says Error on these lines when trying to compile mORmot Server. If I try to remove any of the Uses classes in the code below, then the error increases.

FYI, I am using MSSQL as a backend database.

Uses
SynLog,  mORMot,  mORMotSQLite3,  SynSQLite3Static,  mORMotDB,  mORMotHttpServer,  SynDB,  SynDBODBC,  mORMotWrappers,  SynOleDB,  SynCrossPlatformREST,  RESTModel;

VirtualTableExternalRegister(aModel, TWareHouses, aProps); // my aModel class uses only SynCrossPlatform* units
 try
  aRestServer := TSQLRestServerDB.Create(aModel,':memory:',false); 

  aRestServer.AcquireExecutionMode[execORMGet] := amBackgroundORMSharedThread;
  aRestServer.AcquireExecutionMode[execORMWrite] := amBackgroundORMSharedThread; 
  aRestServer.CreateMissingTables;
  AddToServerWrapperMethod(aRestServer, ['..\..\..\CrossPlatform\templates','..\..\..\..\CrossPlatform\templates']);
 
   aHttpServer := TSQLHttpServer.Create(SERVER_PORT,[aRestServer],'+',useHttpApiRegisteringURI);

    try
     aHttpServer.AccessControlAllowOrigin := '*';

     writeln('Background server is running.'#10);
     write('Press [Enter] to close the server.');
     readln;
    finally
      aHttpServer.Free;
    end;
  finally
   aRestServer.Free;
  end;

I know that I am not using appropriate methods or classes in this mORMot server side, but I don't know what are they?

Kindly help me to fix this. Any available example for the Server side program for iOS/mobile applications?

Thanks in advance.

Last edited by aruncs08 (2014-12-04 09:45:12)

Offline

#12 2014-12-04 17:59:23

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,206
Website

Re: File not found:'Contnrs.dcu' while trying to run through iOS simulator

Just use any mORMot server...
wink

You have examples in folder "27 - CrossPlatform Clients".
For instance Project27ServerTest.dpr or Project14ServerHttpWrapper.dpr or even RegressionTestsServer.dpr

Offline

Board footer

Powered by FluxBB