Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2014-03

How is work search path in CrossPlatform

6 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

FreeMan

Hello,
I'm using fpc & lazarus last svn on kubuntu 13.10 x64 I have a converted package from "antique hellenic city name". its use "fpcsrc/2.7.1/packages/x11/src/x.pp" everything is okay on my system, but when I try crosscompile to win32 or win64 "Fatal: Can not find unit x used by "

/opt/freepascal/2.7.1/lib/fpc/2.7.1/units/
x86_64-linux/x11 --> My system and this folder is there but, i386-win32/x11 and x86_64-win64/x11 has not

x.pp has just type and const definition
what is wrong ? has anyone have any idea?

Thank you

Reply by email

Michael Van Canneyt
to FreeMan
FreeMan wrote 13 lines
Hello, I'm using fpc & lazarus last svn on kubuntu 13.10 x64 I have a converted package from "antique hellenic city name". its use "fpcsrc/2.7.1/packages/x11/src/x.pp" everything is okay on my system, but when I try crosscompile to win32 or win64 "Fatal: Can not find unit x used by " /opt/freepascal/2.7.1/lib/fpc/2.7.1/units/ x86_64-linux/x11 --> My system and this folder is there but, i386-win32/x11 and x86_64-win64/x11 has not x.pp has just type and const definition what is wrong ? has anyone have any idea?

X are the X-server headers.
They cannot work on windows, they are by definition not cross-platform.

The only solution is not to use this unit.

Michael.

Reply by email

FreeMan
to Michael Van Canneyt
You right Michael,
I was wrote "x.pp has just type and const definition"  I understood x.pp
and x11 folder about X-server. Maybe my example not clear. Its just type
definition no any function or etc
const
    X_PROTOCOL = 11;
    X_PROTOCOL_REVISION = 0;
type
    PXID = ^TXID;
    TXID = culong;

My subject is "How is work search path in CrossPlatform" I mean my os is linux, so everything is on work clearly, my project too. I can change target os JUST from project options, package options has not target os. If I just open lpk and I can not build lpk to cross platform, this is hard to modification. I have to riddle.

"The only solution is not to use this unit. "
yes, I need test via compile lpk. but how to other platform easly?

regards

26-03-2014 12:49 tarihinde, Michael Van Canneyt yazd?:

Show quoted text 9 lines
x.pp has just type and const definition > what is wrong ? has anyone have any idea? X are the X-server headers. They cannot work on windows, they are by definition not cross-platform. The only solution is not to use this unit. Michael.

Reply by email

Mattias Gaertner
to FreeMan
Show quoted text 10 lines
You right Michael, I was wrote "x.pp has just type and const definition" I understood x.pp and x11 folder about X-server. Maybe my example not clear. Its just type definition no any function or etc const X_PROTOCOL = 11; X_PROTOCOL_REVISION = 0; type PXID = ^TXID; TXID = culong;

These types and consts have no meaning on Windows.

Show quoted text 5 lines
My subject is "How is work search path in CrossPlatform" I mean my os is linux, so everything is on work clearly, my project too. I can change target os JUST from project options, package options has not target os. If I just open lpk and I can not build lpk to cross platform, this is hard to modification. I have to riddle.

That's the easy part. The package uses the target of the project. Set the project to win32 and the needed Lazarus packages will automatically be compiled for win32 too.

"The only solution is not to use this unit. " yes, I need test via compile lpk. but how to other platform easly?
For example:
uses
  {$IFDEF Linux}
  x
  {$ELSE}
  Windows
  {$ENDIF}
  ;

Mattias

Reply by email

FreeMan
to Mattias Gaertner
That's the easy part. The package uses the target of the project. Set the project to win32 and the needed Lazarus packages will automatically be compiled for win32 too.

I have no different way, I asked, can add, if just lpk is opened, and lpk's compiler options enabled select target os & cpu and etc. And we can click just compile and selected os and cpu been compiled. Not all project and all other packages have to compile. I have ssd so I have to thing write count on disk :)
I can not answer mu self, for hiding target os and cpu options on package's options. Install menu can be disable if IDE's and target os is diffrent. this is my idea.
I can estimate answer :) create new empty project and one form, add to my package to dependency select wich os you want :)

Show quoted text 6 lines
{$IFDEF Linux} x {$ELSE} Windows {$ENDIF} ;

where I can find this equivalent list? I mean X-server in linux equal Windows unit in windows, xxx in mac os etc ? because I didn't test in mac os but its in my near future plan, I will need it. activex as well

Thank you.

Reply by email

Sven Barth
to FreeMan
"FreeMan" wrote 9 lines
> {$IFDEF Linux} > x > {$ELSE} > Windows > {$ENDIF} > ; where I can find this equivalent list? I mean X-server in linux equal

Windows unit in windows, xxx in mac os etc ? because I didn't test in mac os but its in my near future plan, I will need it.

There a no exact equivalents. You need to learn how to do things on a certain platform (for example by reading C based examples) and then look in which units the corresponding functions reside.

activex as well

There is no cross platform equivalent to ActiveX. It works only on Windows.

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20140326/7315291d/attachment.html>

Reply by email