casteng / i-pascal

A free Object Pascal language plugin for IntelliJ IDEA
111 stars 34 forks source link

SDK setup not working on Linux #26

Closed aksdb closed 4 years ago

aksdb commented 6 years ago

A newly added SDK does neither find the compiler nor the classpath: ipascal_emptycompiler

So I manually set the compiler and class path: ipascal_compilerset

Yet all relevant units (Classes, SysUtils, etc.) are still not found ("undeclared identifier").

How is the SDK supposed to be setup?

megahertz commented 6 years ago

@aksdb try this conifg screenshot_20180502_194503

aksdb commented 6 years ago

Looks better, although I had to invalidate the IntelliJ cache :-/ For whatever reason, "FreeAndNil" is not found. "Format" for example works, however. So something still doesn't quite add up.

Oh and I guess I have to add a lot more packages. (by trial and error I presume?)

megahertz commented 6 years ago

@aksdb https://bitbucket.org/argb32/i-pascal/issues/37/freeandnil-undeclared-identifier

aksdb commented 6 years ago

Ok then that's dealt with. Anyway: is the classpath currently supposed to be populated manually? Could it maybe inferred from the fpc.cfg or the output from fpc -va <somedummyprogram>?

megahertz commented 6 years ago

In my case, this configuration was populated automatically, when I added a new SDK.

casteng commented 6 years ago

Base set of RTL units should be populated automatically. How did you installed FPC? Is it a package which came from OS distro? It's a little weird that units were placed in /opt/fpc/3.1.1/lib/fpc/3.1.1/units. Was it by default? It's ok that compiler command field is empty. A default SDK binary will be used in that case.

aksdb commented 6 years ago

@casteng I usually install FPC via the packages provided on the FPC website, and specify /opt/fpc/<version> as install base directory. That way I can have multiple FPC versions side by side and easily switch by just modifying $PATH. (Also it is distribution agnostic so I can replicate that setup on all machines. Sometimes I am even forced to install in my home directory which will lead to a similar setup ... like for example $HOME/fpc/<version>.)