Results 1 to 2 of 2

Thread: .BAT in "Execute after" pitfall

  1. #1

    Exclamation .BAT in "Execute after" pitfall

    I was using .bat / .sh files instead of makefiles since forever.

    It turns out, lots of my problems were because Lazarus... !surprise! ..has a built-in interpreter for batch files.
    So, as the script complexity grew... Mysteriously, it began glitching when called from Lazarus via F9, but working perfectly when called from cmd.exe

    It turns out that Lazarus pre-calculates environmental variable values and substitutes all %MYVAR% with direct values. So, if you, say, set an envvar from inside an if () block it fails silently and without warning!

    Cost me tons of headache and pointless debugging due to executables being compiled with wrong keys.

    And all that time I was thinking FPC 3.x was glitchy fecal matter! Which is untrue, as it turns out!

  2. #2
    I use GCC make and it works like a charm. Even on Windows seems to work quite well. I know make has a lot of options and stuff, but you can still take a big advantage with basic functionality.
    No signature provided yet.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Comodo SSL