Lazarus

Programming => Packages and Libraries => Topic started by: cappe on May 11, 2018, 11:23:29 am

Title: [SOLVED] Problem compiling SMBIOS
Post by: cappe on May 11, 2018, 11:23:29 am
When I compile smbios with linux it gives me these errors. How can I solve?

DWORD = FixedUInt;        //Error: Identifier not found "FixedUint"

SMBIOS_INTERMEDIATE_ANCHOR_STRING_VALUE = [$5F, $44, $4D, $49, $5F];   // Range check error in set constructor o duplicate set element
Title: Re: Problem compiling SMBIOS
Post by: balazsszekely on May 11, 2018, 11:27:05 am
Quote
Error: Identifier not found "FixedUint"
FixedUInt = UInt32
Title: Re: [SOLVED] Problem compiling SMBIOS
Post by: valdir.marcos on July 18, 2018, 07:53:11 am
When I compile smbios with linux it gives me these errors. How can I solve?
SMBIOS_INTERMEDIATE_ANCHOR_STRING_VALUE = [$5F, $44, $4D, $49, $5F];   // Range check error in set constructor o duplicate set element
Just ignore that line.
The SMBIOS_INTERMEDIATE_ANCHOR_STRING_VALUE const is not used anywhere.
Code: Pascal  [Select][+][-]
  1. // SMBIOS_INTERMEDIATE_ANCHOR_STRING_VALUE = [$5F, $44, $4D, $49, $5F];
Title: Re: [SOLVED] Problem compiling SMBIOS
Post by: valdir.marcos on July 18, 2018, 09:00:04 am
Testing https://github.com/RRUZ/tsmbios/tree/master/Samples%20Lazarus, the most commons errors are:

1. Missing uSMBIOS.pas in the project or in the correct directory.

2. Missing uSMBIOS unit in Uses clause:
Code: Pascal  [Select][+][-]
  1. uses
  2.   uSMBIOS;

3. Range check error in set constructor or duplicate set element on line (uSMBIOS.pas):
Code: Pascal  [Select][+][-]
  1. SMBIOS_INTERMEDIATE_ANCHOR_STRING_VALUE = [$5F, $44, $4D, $49, $5F];

Just ignore that line.
The SMBIOS_INTERMEDIATE_ANCHOR_STRING_VALUE const is not used anywhere.
Code: Text  [Select][+][-]
  1. // SMBIOS_INTERMEDIATE_ANCHOR_STRING_VALUE = [$5F, $44, $4D, $49, $5F];


4. A wrong property in code lead to errors (MemoryDeviceInfo.dpr):
- Error: (5038) identifier idents no member "MemoryDeviceInformation"
- Error: (5067) Cannot find an enumerator for the type "<erroneous type>"

To solve, just change MemoryDeviceInformation to MemoryDeviceInfo:
Code: Pascal  [Select][+][-]
  1. for LMemoryDevice in SMBios.MemoryDeviceInformation do
Code: Pascal  [Select][+][-]
  1. for LMemoryDevice in SMBios.MemoryDeviceInfo do
TinyPortal © 2005-2018