Welcome, Guest
Username: Password: Remember me
CodeTyphon Cross-Build Development, discussions and problems
  • Page:
  • 1

TOPIC:

From Linux to Windows (32) 8 years 10 months ago #8960

  • arie vanleyen
  • arie vanleyen's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 6
  • Thank you received: 0
I have problems cross compiling from Linux (Ubuntu 15.1) to Windows (32).

I have setup everything in CodeTyphon and am able to make a simple 'Hello World' program with some buttons that is compiling fine in Linux and also cross compiling fine to Win32. The resulting Win32 runs OK on Wine and on Windows XP.

However, I have another project that is in a further state of development with more controls that fails to cross compile to win32.
The errors that I get are:
Compile Project, OS: win32, Target: windows.exe: Exit code 256, Errors: 50
windows.lpr(20,1) Error: Undefined symbol: RTTI_$WINDOWS_$$_TPOINT
windows.lpr(20,1) Error: Undefined symbol: RTTI_$WINDOWS_$$_TMESSAGE
windows.lpr(20,1) Error: Undefined symbol: RTTI_$WINDOWS_$$_WIN32_FIND_DATAW
windows.lpr(20,1) Error: Undefined symbol: RTTI_$WINDOWS_$$_FILETIME
windows.lpr(20,1) Error: Undefined symbol: RTTI_$WINDOWS_$$_TRECT
windows.lpr(20,1) Error: Undefined symbol: RTTI_$WINDOWS_$$_LOGFONTA
windows.lpr(20,1) Error: Undefined symbol: RTTI_$WINDOWS_$$_LOGFONTW
windows.lpr(20,1) Error: Undefined symbol: RTTI_$WINDOWS_$$_PRECT
windows.lpr(20,1) Error: Undefined symbol: RTTI_$WINDOWS_$$_TSMALLPOINT
windows.lpr(20,1) Error: Undefined symbol: WINDOWS$_$TPOINT_$__$$_not_equal$TPOINT$TPOINT$$BOOLEAN
windows.lpr(20,1) Error: Undefined symbol: RTTI_$WINDOWS_$$_LPITEMIDLIST
windows.lpr(20,1) Error: Undefined symbol: RTTI_$WINDOWS_$$_COORD
windows.lpr(20,1) Error: Undefined symbol: RTTI_$WINDOWS_$$_PCLSID
windows.lpr(20,1) Error: Undefined symbol: RTTI_$WINDOWS_$$_LPCITEMIDLIST
windows.lpr(20,1) Error: Undefined symbol: RTTI_$WINDOWS_$$_BFFCALLBACK
windows.lpr(20,1) Error: Undefined symbol: RTTI_$WINDOWS_$$_TSIZE
windows.lpr(20,1) Error: Undefined symbol: RTTI_$WINDOWS_$$_NETRESOURCE
windows.lpr(20,1) Error: Undefined symbol: RTTI_$WINDOWS_$$_POINTL
windows.lpr(20,1) Error: Undefined symbol: RTTI_$WINDOWS_$$_STRRET
windows.lpr(20,1) Error: Undefined symbol: RTTI_$WINDOWS_$$_LPFNADDPROPSHEETPAGE
windows.lpr(20,1) Error: Undefined symbol: RTTI_$WINDOWS_$$_PUSHORT
windows.lpr(20,1) Error: Undefined symbol: RTTI_$WINDOWS_$$_PGUID
windows.lpr(20,1) Error: Undefined symbol: RTTI_$WINDOWS_$$_PSHORT
windows.lpr(20,1) Error: Undefined symbol: RTTI_$WINDOWS_$$_PLONG
windows.lpr(20,1) Error: Undefined symbol: RTTI_$WINDOWS_$$_LOGPALETTE
windows.lpr(20,1) Error: Undefined symbol: RTTI_$WINDOWS_$$_PINTEGER
windows.lpr(20,1) Error: Undefined symbol: RTTI_$WINDOWS_$$_LARGE_INTEGER
windows.lpr(20,1) Error: Undefined symbol: RTTI_$WINDOWS_$$_PULONG
windows.lpr(20,1) Error: Undefined symbol: RTTI_$WINDOWS_$$_TAGCLIPDATA
windows.lpr(20,1) Error: Undefined symbol: RTTI_$WINDOWS_$$_PUCHAR
windows.lpr(20,1) Error: Undefined symbol: RTTI_$WINDOWS_$$_ULARGE_INTEGER
windows.lpr(20,1) Error: Undefined symbol: RTTI_$WINDOWS_$$_TAGBSTRBLOB
windows.lpr(20,1) Error: Undefined symbol: RTTI_$WINDOWS_$$_BLOB
windows.lpr(20,1) Error: Undefined symbol: RTTI_$WINDOWS_$$_PUINT
windows.lpr(20,1) Error: Undefined symbol: RTTI_$WINDOWS_$$_LPSECURITY_ATTRIBUTES
windows.lpr(20,1) Error: Undefined symbol: RTTI_$WINDOWS_$$_LPPROCESS_INFORMATION
windows.lpr(20,1) Error: Undefined symbol: RTTI_$WINDOWS_$$_NMHDR
windows.lpr(20,1) Error: Undefined symbol: RTTI_$WINDOWS_$$_PWINDOWPOS
windows.lpr(20,1) Error: Undefined symbol: RTTI_$WINDOWS_$$_TREEITEM
windows.lpr(20,1) Error: Undefined symbol: RTTI_$WINDOWS_$$_SYSTEMTIME
windows.lpr(20,1) Error: Undefined symbol: WINDOWS_$$_CREATEWINDOW$crcAD81B991
windows.lpr(20,1) Error: Undefined symbol: RTTI_$WINDOWS_$$_MSG
windows.lpr(20,1) Error: Undefined symbol: WINDOWS_$$_COPYMEMORY$POINTER$POINTER$LONGWORD
windows.lpr(20,1) Error: Undefined symbol: WINDOWS_$$_CREATEWINDOWW$crc27E9E94E
windows.lpr(20,1) Error: Undefined symbol: WINDOWS_$$_ZEROMEMORY$POINTER$LONGWORD
windows.lpr(20,1) Error: Undefined symbol: RTTI_$WINDOWS_$$_WNDPROC
windows.lpr(20,1) Error: Undefined symbol: INIT_$WINDOWS_$$_TRECT
windows.lpr(20,1) Error: Undefined symbol: WINDOWS_$$_HEADER_GETITEMCOUNT$LONGWORD$$LONGINT
windows.lpr(20,1) Error: Undefined symbol: WINDOWS_$$_LISTVIEW_DELETECOLUMN$LONGWORD$LONGINT$$LONGINT
windows.lpr(20,1) Error: Undefined symbol: WINDOWS_$$_LISTVIEW_GETCOLUMN$LONGWORD$LONGINT$LV_COLUMN$$LONGINT

I have tried several things to solve these issues but without success.

I have also tried to make a very simple program with only the components on it that I use in this program and this compiles fine for bot Linux and Win32 so I guess it is not a problem that is related to a package that can't be used for Win32.

Can anyone give me a hint on where to look for to solve this issue?

Please Log in or Create an account to join the conversation.

Last edit: by arie vanleyen.

From Linux to Windows (32) 8 years 10 months ago #8961

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4535
  • Thank you received: 1114
Sir
can you give us more info
-CodeTyphon version ?
-What components did you use ?
anything that can help us
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

From Linux to Windows (32) 8 years 10 months ago #8962

  • arie vanleyen
  • arie vanleyen's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 6
  • Thank you received: 0
First of all, thanks for your quick reply :-)

I use the latest build 5.6 on Ubuntu 15.10

The components that I use are:
TForm
TButton (standard)
TLabel (standard)
TMemo (standard)
TPagecontrol (common controls)
TDateEdit (misc)
TStatusBar (common controls)
IniPropStorage (misc)
TcySkinArea (cindy base)
TplColorPanel (extra controls 1)

Please Log in or Create an account to join the conversation.

From Linux to Windows (32) 8 years 10 months ago #8963

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4535
  • Thank you received: 1114
All components are OK for Cross-Build
-Did you use anything else ?
Linux libraries etc
-Did you select Win32 as platform ?
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

From Linux to Windows (32) 8 years 10 months ago #8964

  • arie vanleyen
  • arie vanleyen's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 6
  • Thank you received: 0
I also thought it would be no problem, Especially because I have tested the components with a fresh project in which I placed one of each component on a form and cross compiled it to Win32 without any problems

No, I didn't used anything else and selected Win32 as the platform.
I just followed the instructions on: www.pilotlogic.com/sitejoom/index.php/wiki?id=496

The name of the project is Windows (how original :-)
the contents of windows.lpi is:
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="9"/>
<General>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
<Title Value="windows"/>
<ResourceType Value="res"/>
<UseXPManifest Value="True"/>
<Icon Value="0"/>
</General>
<i18n>
<EnableI18N LFM="False"/>
</i18n>
<VersionInfo>
<StringTable ProductVersion=""/>
</VersionInfo>
<MacroValues Count="2">
<Macro1 Name="LCLWidgetType" Value="win32"/>
<Macro2 Name="LCLWidgetType" Value="win32"/>
</MacroValues>
<BuildModes Count="1">
<Item1 Name="Default" Default="True"/>
<SharedMatrixOptions Count="2">
<Item1 ID="337804945045" Modes="Default" Type="IDEMacro" MacroName="LCLWidgetType" Value="win32"/>
<Item2 ID="791582428076" Modes="Default" Type="IDEMacro" MacroName="LCLWidgetType" Value="win32"/>
</SharedMatrixOptions>
</BuildModes>
<PublishOptions>
<Version Value="2"/>
</PublishOptions>
<RunParams>
<local>
<FormatVersion Value="1"/>
</local>
</RunParams>
<RequiredPackages Count="11">
<Item1>
<PackageName Value="pl_solutions"/>
</Item1>
<Item2>
<PackageName Value="pl_rx"/>
</Item2>
<Item3>
<PackageName Value="pl_KControls"/>
</Item3>
<Item4>
<PackageName Value="pl_jvcl"/>
</Item4>
<Item5>
<PackageName Value="pl_fzcontrols"/>
</Item5>
<Item6>
<PackageName Value="pl_exdesign"/>
</Item6>
<Item7>
<PackageName Value="pl_excontrols"/>
</Item7>
<Item8>
<PackageName Value="pl_eccontrols"/>
</Item8>
<Item9>
<PackageName Value="pl_cindy"/>
</Item9>
<Item10>
<PackageName Value="pl_bgracontrols"/>
</Item10>
<Item11>
<PackageName Value="LCL"/>
</Item11>
</RequiredPackages>
<Units Count="2">
<Unit0>
<Filename Value="windows.lpr"/>
<IsPartOfProject Value="True"/>
</Unit0>
<Unit1>
<Filename Value="unit1.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="Supply"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="Unit1"/>
</Unit1>
</Units>
</ProjectOptions>
<CompilerOptions>
<Version Value="11"/>
<Target>
<Filename Value="windows"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<CodeGeneration>
<TargetCPU Value="i386"/>
<TargetOS Value="win32"/>
</CodeGeneration>
<Linking>
<Options>
<Win32>
<GraphicApplication Value="True"/>
</Win32>
</Options>
</Linking>
</CompilerOptions>
<Debugging>
<Exceptions Count="3">
<Item1>
<Name Value="EAbort"/>
</Item1>
<Item2>
<Name Value="ECodetoolError"/>
</Item2>
<Item3>
<Name Value="EFOpenError"/>
</Item3>
</Exceptions>
</Debugging>
</CONFIG>


The contents of windows.lpr is
program windows;

{$mode objfpc}{$H+}

uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Interfaces, // this includes the LCL widgetset
Forms, Unit1, pl_bgracontrols, pl_excontrols, pl_exdesign, pl_kcontrols, pl_rx
{ you can add units after this };

{$R *.res}

begin
RequireDerivedFormResource:=True;
Application.Initialize;
Application.CreateForm(TSupply, Supply);
Application.Run;
end.

Please Log in or Create an account to join the conversation.

From Linux to Windows (32) 8 years 10 months ago #8966

  • arie vanleyen
  • arie vanleyen's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 6
  • Thank you received: 0
I have dig a bit further and discovered that there are missing files.

When I open the project options and click the test button it complains about missing files, the files are:

HINT: using config file /usr/local/codetyphon/fpc/fpc32/bin/i386-linux/fpc.cfg
ERROR: compiled FPC unit not found: system.ppu
ERROR: compiled FPC unit not found: objpas.ppu
ERROR: compiled FPC unit not found: sysutils.ppu
ERROR: compiled FPC unit not found: classes.ppu
ERROR: compiled FPC unit not found: avl_tree.ppu
ERROR: compiled FPC unit not found: zstream.ppu

Please Log in or Create an account to join the conversation.

Last edit: by arie vanleyen. Reason: screenshot not relevant

From Linux to Windows (32) 8 years 10 months ago #8967

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4535
  • Thank you received: 1114
1)-Rename project file to aaawin.lpi (not windows.lpi)
and test
2)-try
program xxxwindows;

{$mode objfpc}{$H+}

uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Interfaces, // this includes the LCL widgetset
Forms, Unit1 {,pl_bgracontrols, pl_excontrols, pl_exdesign, pl_kcontrols, pl_rx <<====}
{ you can add units after this };

{$R *.res}

begin
RequireDerivedFormResource:=True;
Application.Initialize;
Application.CreateForm(TSupply, Supply);
Application.Run;
end.
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

Last edit: by Sternas Stefanos.

From Linux to Windows (32) 8 years 10 months ago #8968

  • arie vanleyen
  • arie vanleyen's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 6
  • Thank you received: 0
You are the BEST!!!

I have renamed it and it runs without problems :-)

However, I don't understand why the name is causing this issue - can you tell me why?

ps. I have in the mean time also upgraded the system to 5.7 - it runs without problems

Please Log in or Create an account to join the conversation.

Last edit: by arie vanleyen.

From Linux to Windows (32) 8 years 10 months ago #8969

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4535
  • Thank you received: 1114
Thanks Sir
programming world is unpredictable
have fun...
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

  • Page:
  • 1