Hola, tengo solo dos días que estoy aprendiendo Object Pascal con Lazarus, en la maquina del trabajo tengo Windows y en un rato estube practicando algo y hasta ahi todo bien, pero luego me traigo lo que practique a mi maquina con Debian y ahora me salen como errores unas lineas que en Windows todo me funciono bien.
este es el codigo:
Código:
procedure TfrmPrincipal.ListBox1Click(Sender: TObject);
var
id_list:integer;
begin
if(index_list=Integer(ListBox1.ItemIndex)) then
begin
end
else
begin
id_list:=Integer(ListBox1.Items.Objects[ListBox1.ItemIndex]);
ShowMessage('Texto List: '+ListBox1.Items.ValueFromIndex[ListBox1.ItemIndex]+' , Id: '+IntToStr(id_list));
index_list:=Integer(ListBox1.ItemIndex);
end;
end;
Lo que hace este codigo es que al seleccionar un item me muestra un mensaje con el texto del item y su id.
La linea del "error" es esta:
Código:
id_list:=Integer(ListBox1.Items.Objects[ListBox1.ItemIndex]);
con este mensaje:
Note: DWARF debug information cannot be used with smart linking on this target, switching to static linking
frm01_principal.pas(94,15) Error: Illegal type conversion: "TObject" to "LongInt"
No se bien que será porque como repito solo llevo dos dias en esto, en Win funciona bien, en Debian no se que pasa.
Cualquier ayuda es bienvenida.