F2063 Could not compile usde unit ‘uniGUITypes‘问题解决

     一、问题出现:

     Delphi XE10,uniGUI1551环境下,编译项目完成后,升级uniGUI1555,编译不能通过,出错信息:F2063 Could not compile used unit 'uniGUiServer.pas'

    (1)找原因,通过设置Delphi的Toole-Library,设置好目录。但是,始终不能纠错。

分析:

    1、原生Demo可以使用(因为无dproj文件)

     2、通过新建工程,都可以 UniGUI使用正常

    3、重新安装控件,退回低版本出是如此

    上述情况下,分析问题可能出在工程文件中了。无意中,新建议的项目中的dproj文件,复制进原工程项目中,出错就消除。

    二、分析

     在工程项目文件中有个,dproj文件。

      Delphi帮助:Delphi项目文件由IDE创建。包含项目选项的当前设置,如编译器和链接器设置、目录、条件指令和命令行参数。使用项目>选项设置这些选项。当使用命令行编译器从命令行编译项目时,不使用此文件。

     dprjo文件是一个XML 文件,记录了整个工程的各单元项目参数和文件搜索参数,以及工程运行的环境(控件的相关参数)。

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <ProjectGuid>{83E41B5D-C35E-4E30-9B7B-DCF313DC125A}</ProjectGuid>
    <ProjectVersion>19.0</ProjectVersion>
    <FrameworkType>VCL</FrameworkType>
    <Base>True</Base>
    <Config Condition="'$(Config)'==''">Debug</Config>
    <Platform Condition="'$(Platform)'==''">Win32</Platform>
    <TargetedPlatforms>1</TargetedPlatforms>
    <AppType>Application</AppType>
    <MainSource>Project1.dpr</MainSource>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
    <Base>true</Base>
  </PropertyGroup>
  <PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Base)'=='true') or '$(Base_Win32)'!=''">
    <Base_Win32>true</Base_Win32>
    <CfgParent>Base</CfgParent>
    <Base>true</Base>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_1)'!=''">
    <Cfg_1>true</Cfg_1>
    <CfgParent>Base</CfgParent>
    <Base>true</Base>
  </PropertyGroup>
  <PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win32)'!=''">
    <Cfg_1_Win32>true</Cfg_1_Win32>
    <CfgParent>Cfg_1</CfgParent>
    <Cfg_1>true</Cfg_1>
    <Base>true</Base>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_2)'!=''">
    <Cfg_2>true</Cfg_2>
    <CfgParent>Base</CfgParent>
    <Base>true</Base>
  </PropertyGroup>
  <PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win32)'!=''">
    <Cfg_2_Win32>true</Cfg_2_Win32>
    <CfgParent>Cfg_2</CfgParent>
    <Cfg_2>true</Cfg_2>
    <Base>true</Base>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Base)'!=''">
    <DCC_DcuOutput>.\$(Platform)\$(Config)</DCC_DcuOutput>
    <DCC_ExeOutput>.\$(Platform)\$(Config)</DCC_ExeOutput>
    <DCC_E>false</DCC_E>
    <DCC_N>false</DCC_N>
    <DCC_S>false</DCC_S>
    <DCC_F>false</DCC_F>
    <DCC_K>false</DCC_K>
    <DCC_Namespace>System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;$(DCC_Namespace)</DCC_Namespace>
    <Icon_MainIcon>$(BDS)\bin\delphi_PROJECTICON.ico</Icon_MainIcon>
    <UWP_DelphiLogo44>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png</UWP_DelphiLogo44>
    <UWP_DelphiLogo150>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png</UWP_DelphiLogo150>
    <SanitizedProjectName>Project1</SanitizedProjectName>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Base_Win32)'!=''">
    <DCC_UsePackage>DBXSqliteDriver;RESTComponents;DataSnapServerMidas;DBXDb2Driver;DBXInterBaseDriver;FlexCel_Pdf;vclactnband;FMX_FlexCel_Core;vclFireDAC;fsDB27;bindcompvclsmp;emsclientfiredac;DataSnapFireDAC;tethering;svnui;FireDACADSDriver;frx27;DBXMSSQLDriver;fsTee27;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;unidac270;vcltouch;vcldb;bindcompfmx;svn;SKIA_FlexCel_Core;DBXOracleDriver;FlexCel_Report;frxIBX27;inetdb;crcontrols270;uSynEdit_R2023;RaizeComponentsVcl;fs27;FmxTeeUI;emsedge;RaizeComponentsVclDb;FireDACIBDriver;fmx;fmxdae;VCL_FlexCel_Components;vcledge;vclib;uniGUI27Chart;uniGUI27m;FireDACDBXDriver;dbexpress;IndyCore;vclx;frxTee27;dsnap;DataSnapCommon;emsclient;FireDACCommon;RESTBackendComponents;DataSnapConnectors;VCLRESTComponents;soapserver;EhLibADODataDrivers270;dacfmx270;vclie;bindengine;DBXMySQLDriver;CloudService;FireDACOracleDriver;FireDACMySQLDriver;DBXFirebirdDriver;FireDACCommonODBC;FireDACCommonDriver;DataSnapClient;inet;bindcompdbx;IndyIPCommon;frxDB27;vcl;DBXSybaseASEDriver;IndyIPServer;EhLib270;dacvcl270;IndySystem;vquery270;FireDACDb2Driver;dac270;aceDX10Sydney_R;dsnapcon;EhLibIBXDataDrivers270;FireDACMSAccDriver;FireDACInfxDriver;fmxFireDAC;vclimg;frxIntIOIndy27;TeeDB;FireDAC;FlexCel_XlsAdapter;fsIBX27;unidacfmx270;emshosting;frxIntIO27;AlphaDBDX10Sydney;uniGUI27VCL;acntDX10Sydney_R;FireDACSqliteDriver;FireDACPgDriver;ibmonitor;FireDACASADriver;DBXOdbcDriver;FireDACTDataDriver;FMXTee;soaprtl;DbxCommonDriver;FlexCel_Core;GRDelphi;ibxpress;Tee;DataSnapServer;xmlrtl;DataSnapNativeClient;ibxbindings;fmxobj;FireDACDSDriver;soapmidas;rtl;emsserverresource;DbxClientDriver;vclwinx;DBXSybaseASADriver;CustomIPTransport;vcldsnap;unidacvcl270;bindcomp;appanalytics;frxADO27;DBXInformixDriver;IndyIPClient;fsADO27;bindcompvcl;frxe27;TeeUI;FMX_FlexCel_Components;dbxcds;VclSmp;VCL_FlexCel_Core;adortl;FireDACODBCDriver;frxDBX27;FlexCel_Render;DataSnapIndy10ServerTransport;frxcs27;EhLibDBXDataDrivers270;DataSnapProviderClient;dsnapxml;dbrtl;FireDACMongoDBDriver;IndyProtocols;inetdbxpress;fmxase;$(DCC_UsePackage)</DCC_UsePackage>
    <DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>

     当我们建立工程并运行后,通过dproj文件,很方便地通过预先设置的环境顺利编译。但是,当Delphi环境变化了,Delphi升级或控件升级等等。

     你再次编译时,会造成出错,不能编译。因为,打开dproj文件文件,分析问题出在搜索目录,控件的参数上。上述涉及到package和SearchPath元素中的UniGUI路径出现问题,造成找不到第三方控件的Pas文件,造成不能编译。 

     三、解决

    1、问题找到,采取措施,很简单:删除dproj文件,再编译问题解决。

    但是,此办法,要对工程的 Delphi Compiler 进行设置:

    进入 Project > Options > Delphi Compiler ,设置当前工程的编译选项,保存IDE生成.dproj文件。

    2、比较好的办法:

   (1)新建 一个项目Project1。

   (2)用编辑软件,将Project1.dproj文件中的“Project1”,全部替换为的原项目名。

     例如:Project1替换为MyName。(注:原EXE文件名:MyName.exe)

    (3)Project1.dproj更换名为“MyName.dproj”。

    (4)新的dproj,覆盖原dproj文件。

     打开项目,编译通过。为此,专门编写一个小程序,用于修改dproj:

     大约修改替换5处,使用快捷,方便。

     uniGUI Could Not complile used unit’uniGUITypes’问题解决

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值