[SOLVED] Can't get my project running, that was written on a linux plattform lazarus / 34-Windows ---------------------------------------------------------------------- teertinker · 2013-04-10 18:43 Dear users, 1.5 years ago I switched to Ubuntu. Several weeks ago I installed Lazarus and built a project there. Everything is working fine. After almost finishing my project I wanted to test it on other plattform -especially windows. I first tried cross compiling , but I did not make it. Anyway, I thought, its better to compile it on a real windows system. - I installed Lararus on my XP VM (1.0.8 FPC 2.6.2 ->the same as on my ubuntu machine).  -> i use a fresh install except using a new package "richmemo" on both machines - The installation worked well. - But unfortunately opening the project and compiling it does not work! The compiler drops the folling message: PPU Loading C:\lazarus\lcl\units\i386-win32\win32\win32extra.ppu PPU Source: win32extra.pas not found PPU Source: win32defines.inc not found Recompiling Win32Extra, checksum changed for shlobj win32proc.pp(31,12) Fatal: Can not find unit Win32Extra used by win32proc. Check if package LCL is in the dependencies of package LCL. Any suggestions? I would really appreciate it. Felix ---------------------------------------------------------------------- Martin_fr · 2013-04-10 18:59 No idea... Does a new empty project compile on your windows install? Sometimes you get errorrs like this, if you specify pathes (-Fu -FU -Fi ...) yourself, rather than using packages. Also, when you copy the project, the IDE has a clean export function somewhere. Do NOT copy any ppu or .o files from your linux (they are usually in a subfolder of your project) ---------------------------------------------------------------------- BigChimp · 2013-04-11 05:27 Quote from: Martin_fr on April 10, 2013, 08:59:15 pmAlso, when you copy the project, the IDE has a clean export function somewhere. Yep, menu Project/Publish project ---------------------------------------------------------------------- teertinker · 2013-04-11 06:08 Dear Martin and Big Chimp, thanks for your fast response. And indeed, I didn't use the publish project option. When I use this command, no lib folder contains the project folder anymore. Unfortunately , the problem is quite the same when I try to compile the published folder! In opposite, an empty model compiles without any problems. I additionaly checked for the *win32*.ppu files reported in the error messages. they are not in the folder:  C:\lazarus\lcl\units\i386-win32\win32\ but in C:\lazarus\lcl\INTERFACES\i386-win32\win32\ but i dont want to move files there without having any clue what iam doing. thanks felix ---------------------------------------------------------------------- Martin_fr · 2013-04-11 10:31 Quote from: teertinker on April 11, 2013, 08:08:35 amI additionaly checked for the *win32*.ppu files reported in the error messages. they are not in the folder:  C:\lazarus\lcl\units\i386-win32\win32\ but in C:\lazarus\lcl\INTERFACES\i386-win32\win32\ That is definitely wrong. Unless you mean the pas file. The pas file should be there, but the .ppu and .e should be in units I have a fresh install here, and they are in lcl/units. So the question is how/when do they move for you. I would suggest, to start over with a clean install: - uninstall the current / or just delete the lazarus folder   uninstall can be selected during the new install, but make sure you remove any left over files by hand - install and select: "Clean user config"   config is stored in your "Documents and Settings" folder. Check where the files are. - Now add any extra packages you need. This will recompile the IDE. It should not touch the LCL. ----------------------- The problem starts with: Recompiling Win32Extra, checksum changed for shlobj That means your Win32Extra seems to be from a different version, that was compiled with a different fpc (or fpc changed afterwards). (shlobj is from fpc. And it should never change.) This is also the reason for the original win32extra not found. It doesn't match the fpc version. It could also mean you have a unit of this name somewhere, and it conflicts with the one in fpc. ------------------- Strange so, that a new project works.... Please on the message window do a "copy all and hidden messages" and post the result. ---------------------------------------------------------------------- teertinker · 2013-04-11 11:26 Dear Martin, sorry you were right, the win32extra.pas is located in /interfaces/... and not the *ppu i did a fresh install a few minutes ago, and added+installed the package lazrichedit as it is used by my project. The  errors is the same. Here is the new  ouput: and as you mention shlobj there is a shlobj.pp in my linux compiled project folder I attached the "published" linux project as well. may be this is of any help. Einstellungen geändert, sauberes Neucompilieren mit -B Hint: Start of reading config file C:\lazarus\fpc\2.6.2\bin\i386-win32\fpc.cfg Hint: End of reading config file C:\lazarus\fpc\2.6.2\bin\i386-win32\fpc.cfg Free Pascal Compiler version 2.6.2 [2013/03/17] for i386 Copyright (c) 1993-2012 by Florian Klaempfl and others Target OS: Win32 for i386 Compiling project1.lpr Compiling shlobj.pp shlobj.pp(1285,23) Warning: Symbol "VARTYPE" is deprecated PPU Loading C:\lazarus\lcl\units\i386-win32\win32\win32extra.ppu PPU Source: win32extra.pas not found PPU Source: win32defines.inc not found Recompiling Win32Extra, checksum changed for shlobj win32proc.pp(31,12) Fatal: Can not find unit Win32Extra used by win32proc. Check if package LCL is in the dependencies of package LCL. ---------------------------------------------------------------------- teertinker · 2013-04-11 11:30 Great! I just deleted the shlpbj.pp from my project folder and now it works! But why does lazarus 'publish' this file? My program does look a little bit awkward but i guess this is normal or? Felix - thanks a lot! ---------------------------------------------------------------------- Martin_fr · 2013-04-11 11:47 Quote from: teertinker on April 11, 2013, 01:30:35 pmI just deleted the shlpbj.pp from my project folder and now it works! But why does lazarus 'publish' this file? Did you set an include path somewhere? Is it in the list of files belonging to the project? (Maybe you opened it by code navigation, and then accidently added it as project file)? Otherwise good question. QuoteMy program does look a little bit awkward but i guess this is normal or? define: awkward ---------------------------------------------------------------------- teertinker · 2013-04-11 13:09 Hi, as I renember I did not set an include path. And I don't renember it adding to my project. After deleting the file in my projcet folder, it doesn't reappear after new compiling... to no idea why it was there. considering awkward: - the fonts look different since I used the default font "sans" is not part of my XP. - the colour of a panel looks different. I have to use "clBackground" in Linux and "cldefault" in Windows to use the same color as my form. But I added a plattformsecific if condition that works. - the size of stringgrid rows differ slightly, since i have overlayed panels, this looks strange. i will set their size dynamically. .. so only minor changes are needed. VG Felix and thanks very much again ---------------------------------------------------------------------- Martin_fr · 2013-04-11 13:23 Those changes are to be expected. if you use colors like clDefault or clBackground (and you should) then the colers are taken from the systems scheme. Linux and window differ in that. Even Window and Window can differ With fonts it is best to leave the default (no name). But that will also be diff per system. Unless you install the font with your app, that is what will happen. And the height of cells, buttons etc is also system specific. While it may be set  as a property, some system impose limits, such as a minimum. For this anchoring is to be used, so the form can adopt. This also will help if the app runs on a system with different DPI