Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

delphi XE2 can't compile any project on my computer because of environment variable (HP Laptops)

I have a HP laptop and I have delphi xe2 installed on the hp laptop, last 5 months ago I have no problem working with the delphi but now I have this error message.

[DCC Error] E1026 File not found: 'FMX.Filter.res'
[DCC Error] E1026 File not found: 'FMX.Platform.Win.res'

I can't compile any projects! When I try to compile a project, I get this error.

And after more, I did a search for that error on google, I found this in embarcadero forum (https://forums.embarcadero.com/thread.jspa?threadID=59949). But in this forum the answers are so different. He said that is look like the HP laptop's error, and he describes how to fix it. This is his way:

Right click on "My Computer" and select Properties. In the Advanced tab, you will find a button for "Environment Variables". Click on it, and in the list that follows, delete the PLATFORM variable from the list of System variables. Close the dialog, restart XE2, you should now be able to recompile without further problems

I also want to do this for my problem but I have no PLATFORM variable in the "Environment Variables"!

How can I get rid of this problem ?

Thanks

like image 428
relativ Avatar asked Dec 09 '11 10:12

relativ


2 Answers

Check your library path for the target platform. It should contain an entry like $(BDSLIB)\$(Platform)\Release.

You can also use an explicit path, e.g. C:\Program Files\Embarcadero\RAD Studio\9.0\lib\win32\release (for the Win32 target).

like image 73
Ondrej Kelle Avatar answered Oct 25 '22 23:10

Ondrej Kelle


Firstly HP issue - Had the same problem and I am doing this from memory so it may not be exactly correct, but you will get the gist...

Check you environment variables (from control panel|System|Advanced). There will be one called Platform, which has the value of 'AnyCpu'. Delete it.

All will now work.

Secondly your 'File not found' issue. Without seeing the code is it difficult to be exactly sure, but around update 2 or so, embarcadero changed the 'FMX.' prefix to 'FMX_', presumably so that iOS programs will compile okay under FPC. Try changing your prefixes to use underscores instead of dots.

like image 28
Peter Avatar answered Oct 26 '22 00:10

Peter