* * *

Author Topic: Problem moving from Linux to Windows  (Read 2184 times)

mike parr

  • New member
  • *
  • Posts: 12
Problem moving from Linux to Windows
« on: August 17, 2010, 10:36:08 pm »
Hi  -   I have a Laz project which compiles and runs fine on Ubuntu (Laz version 9.29) but when compiling on Windows 7(Laz 9.28) I get:


Compiling resource C:\linuxStuff\lazcode\tygogogui\unit1.lfm
cpp.exe: stdout: Invalid argument
c:\lazarus\fpc\2.2.4\bin\i386-win32\windres.exe: can't open file `TTMainForm': No such file or directory
unit1.pas(800,1) Error: Error while linking

...where unit1 is a source file containing the definition of a class named TTMainForm.

I am just opening the files from Linux, not importing/converting.

Any ideas?

Thanks
Mike


felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 2893
Re: Problem moving from Linux to Windows
« Reply #1 on: September 05, 2010, 07:56:22 pm »
Use the same version of Lazarus in both of them.

IPguy

  • Full Member
  • ***
  • Posts: 243
Re: Problem moving from Linux to Windows
« Reply #2 on: September 05, 2010, 09:52:15 pm »
re: stay with the same version
I agree with that advice.  I work with a 0.9.29 version and I have been unable to compile my app using the 0.9.28 release.  It appears that an app developed in 0.9.29 may not be (generally? always?) backwards compilable in 0.9.28.

Leledumbo

  • Hero Member
  • *****
  • Posts: 2715
Re: Problem moving from Linux to Windows
« Reply #3 on: September 06, 2010, 08:08:11 am »
From my experience, there's a little backward compatibility problem between 0.9.28 and 0.9.29 regarding resources. 0.9.28 was shipped with FPC 2.2.4 when FPC doesn't have native resources yet, so it put this in the .lpr:
Code: [Select]
{$IFDEF WINDOWS}{$R projectname.rc}{$ENDIF}
However, since FPC 2.4.0 came out, Lazarus started to use native FPC resources, so the line now becomes:
Code: [Select]
{$R *.res}
0.9.28 project which gets opened in 0.9.29 will have {$R *.res} automatically added since the IDE thinks that the line is missing.

A solution would be to use conditional switch for LCL version (I forgot the define, please compile using -vc and find it out yourself).
« Last Edit: September 17, 2010, 01:03:01 pm by Leledumbo »

mike parr

  • New member
  • *
  • Posts: 12
Re: Problem moving from Linux to Windows
« Reply #4 on: September 17, 2010, 09:39:20 am »
Thanks to all responders - I will investigate.  (been away - could not use www)
Mike

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads