Sign in Join

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

Mailing lists / lazarus / 2012-04

IDE macro $MakeExe when cross-compiling

3 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

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

cobines

Hello.

I'm trying to invoke svn2revisioninc before compiling, so I entered this command in project options:

$(LazarusDir)$MakeDir(tools)$MakeExe(svn2revisioninc) .. myrevision.inc

It works OK if host OS is the same as target, but when cross-compiling from Linux to Windows I get:

$ lazbuild --os=win32 project1.lpi
primary config path: /home/devel/.lazarus
[TExternalToolList.Run]
CmdLine="/home/devel/lazarus/tools/svn2revisioninc.exe .. myrevision.inc" WorkDir="/tmp/"
TExternalToolList.Run Failed to run tool file
"/home/devel/lazarus/tools/svn2revisioninc.exe" does not exist Stack trace:
$082E1EFC line 232 of lazfileutils.pas
$0817B333 line 346 of exttooldialog.pas
$0804F258 line 1386 of lazbuild.lpr
$0816982C line 4076 of compileroptions.pp
$0804AF67 line 770 of lazbuild.lpr
$08048E10 line 317 of lazbuild.lpr
$0804D7F8 line 1162 of lazbuild.lpr
$0804F2B1 line 1407 of lazbuild.lpr
$B75A8E46
...

Nevermind the crash but the macros are not consistent: $MakeDir macro produced / path delimiter not \.
$MakeExe produced .exe and not empty string.

Is this a bug or should I not use these macros when cross-compiling? Is there a different way I can achieve this?

cobines

Reply by email

Mattias Gaertner
to cobines
Show quoted text 35 lines
Hello. I'm trying to invoke svn2revisioninc before compiling, so I entered this command in project options: $(LazarusDir)$MakeDir(tools)$MakeExe(svn2revisioninc) .. myrevision.inc It works OK if host OS is the same as target, but when cross-compiling from Linux to Windows I get: $ lazbuild --os=win32 project1.lpi primary config path: /home/devel/.lazarus [TExternalToolList.Run] CmdLine="/home/devel/lazarus/tools/svn2revisioninc.exe .. myrevision.inc" WorkDir="/tmp/" TExternalToolList.Run Failed to run tool file "/home/devel/lazarus/tools/svn2revisioninc.exe" does not exist Stack trace: $082E1EFC line 232 of lazfileutils.pas $0817B333 line 346 of exttooldialog.pas $0804F258 line 1386 of lazbuild.lpr $0816982C line 4076 of compileroptions.pp $0804AF67 line 770 of lazbuild.lpr $08048E10 line 317 of lazbuild.lpr $0804D7F8 line 1162 of lazbuild.lpr $0804F2B1 line 1407 of lazbuild.lpr $B75A8E46 ... Nevermind the crash but the macros are not consistent: $MakeDir macro produced / path delimiter not \. $MakeExe produced .exe and not empty string. Is this a bug or should I not use these macros when cross-compiling? Is there a different way I can achieve this?

I extended the macro:
To get the file name of the host OS use $MakeExe(ide,filename). To get the file name of a specific OS use $MakeExe(os,filename).

Mattias

Reply by email

cobines
to Mattias Gaertner

2012/4/12 Mattias Gaertner :

I extended the macro: To get the file name of the host OS use $MakeExe(ide,filename). To get the file name of a specific OS use $MakeExe(os,filename).

Thanks, Mattias! It works well.

cobines

Reply by email