Bookstore

Recent

Author Topic: Unable to compile demo project  (Read 1779 times)

Alexandr F

  • New Member
  • *
  • Posts: 26
Unable to compile demo project
« on: February 15, 2019, 09:45:04 am »
Mac os Mojave
Lazarus 2.0

I am trying to compile demo project Miniide, but i have next error (see attached picture).
How I can solve this error?

dbannon

  • Hero Member
  • *****
  • Posts: 967
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Unable to compile demo project
« Reply #1 on: February 15, 2019, 11:28:44 am »
My guess is that particular example has not been tested in a unix env.

Note we have a \i386 as part of the file name it wants to create.

Try and find where it comes from and replace the '\' with PathDeliminator

Davo
Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng

Alexandr F

  • New Member
  • *
  • Posts: 26
Re: Unable to compile demo project
« Reply #2 on: February 15, 2019, 05:12:35 pm »
Thank you, Davo.

Output path in project options included left slash '\'. I changed it to right slash '/'.

lucamar

  • Hero Member
  • *****
  • Posts: 2561
Re: Unable to compile demo project
« Reply #3 on: February 15, 2019, 10:03:01 pm »
Output path in project options included left slash '\'. I changed it to right slash '/'.

Rather than replacing an OS-depending incorrect path delimiter with an equally incorrect delimiter for other OS you should simply either:
  • build the file-name by using: 'ADirectory' + PathDelimiter + 'AnotherDir' + [...etc...]
  • use the name as-is but passing it first through SysUtils.SetDirSeparators() or LazFileUtils.ForcePathDelims() or alike.
That way you'll have a correct filename no matter for which OS you compile the demo.
« Last Edit: February 15, 2019, 10:05:14 pm by lucamar »
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus 2.0.6/FPC 3.0.4 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.