Recent

Author Topic: IDE won't compile anymore on new laptop with W10  (Read 627 times)

RuudB

  • New Member
  • *
  • Posts: 28
IDE won't compile anymore on new laptop with W10
« on: June 15, 2020, 08:24:03 am »
I have an old laptop with W7-32 and everything runs fine. Every project has its own directory so when I want to work on a project I start up a BAT file that let me make a choice, will jump to that directory and will start up the IDE using the command D:\programs\fpc304\bin\i386-win32\fp.exe

Two years ago I needed to program something at my work, copied FPC, some directories and the BAT-file to an USB stick, copied the whole on this on my W10 laptop, changed some drive letters in the BAT file and things ran fine.

A month ago I had to buy a new laptop and it had W10 installed. In this case I had the advantage that I could mimic the directory structure of the old laptop. Again I copied everything, started the BAT file, chose a project and was welcomed by the IDE showing the file I was working on on my old laptop. But when I pressed F9 to assemble the file, I got an error message: Compile failed / Total errors: 2. And most weird: In some cases I don't get a window explaining what I was doing wrong. In the other case I got the error that it couldn't find the CRT unit. I tried some previous versions of FPC and the same error happened. Even after removing all FP.xxx files which forces FPC to start from fresh, same problem. Even when I erased all versions and installed 3.04 with the latest download, same problem.

But the I decided to start FP.EXE in a DOS window from its home directory, moved tot the directory with the project and.... things work fine. New FP.xxx files were created and so I thought to use my BAT file again: old compile problem again. Starting the BAT file in a DOS window didn't help either, just starting FP.EXE in its own directory works fine.
But having that many projects, changing the directory by hand all the time is time consuming. If it was a W10 quirk I maybe could accept it, but it works fine on another machine!

What am I doing wrong? Missing PATH or SET variable? Any help would be very welcome. Many thanks in advance!

Kind regards, Ruud Baltissen

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8715
  • FPC developer.
Re: IDE won't compile anymore on new laptop with W10
« Reply #1 on: June 15, 2020, 08:54:40 am »
Missing CRT unit is usually wrong unit path.  The RTL is then guessed, and is ok, and units like contnrs and crt are often the first thing that fails.

And yes, by default the <rootdir>\bin\i386-win32 is added to the path.
« Last Edit: June 15, 2020, 08:57:38 am by marcov »

RuudB

  • New Member
  • *
  • Posts: 28
Re: IDE won't compile anymore on new laptop with W10
« Reply #2 on: June 15, 2020, 07:30:54 pm »
I wanted to add the path but it was already there. Most probably added when I installed 3.04.

I wrote the famous little "Hello, world!" program and that compiled fine. But after adding "uses CRT;" I got two errors but not a window explaining which two.

Weird, weird weird.

Any further input is still welcome!

Kind regards, Ruud Baltissen

RuudB

  • New Member
  • *
  • Posts: 28
Re: IDE won't compile anymore on new laptop with W10
« Reply #3 on: June 22, 2020, 12:36:13 pm »
An update:

It became even worse. Compiling things after starting FP.EXE from its home directory stopped working as well. I decide to use my old workhorse again, 2.2.2, but at one point it started to freeze after typing one character. Then I changed something to its settings and I got the error that FP.INI could not be written.

At that point I decided to erase all FP.INIs, FP.CFGs and FP.DSKs. And I mean ALL, every single one on my laptop. From that moment things worked fine

Case closed :)

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8715
  • FPC developer.
Re: IDE won't compile anymore on new laptop with W10
« Reply #4 on: June 22, 2020, 01:04:02 pm »
Note that 3.2.0 has been released, and it has an archive with multiple different FP.exe builds that can solve some odd ball cases:

See https://wiki.freepascal.org/FPC_New_Features_3.2.0#A_new_archive_was_added_that_contains_alternative_builds_of_the_textmode_IDE.

It might also be that you are suffering from some smartscreen gotcha.

 

TinyPortal © 2005-2018