首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >带Abbrevia GetIt包的ilink32链接器问题:ilink32错误未解决

带Abbrevia GetIt包的ilink32链接器问题:ilink32错误未解决
EN

Stack Overflow用户
提问于 2022-02-08 19:59:39
回答 1查看 47关注 0票数 0

我试图在控制台应用程序中使用https://github.com/TurboPack/Abbrevia包和c++Builder。首先,我尝试手动安装软件包。但后来我在GetIt上找到了它。无论如何设置包,问题都将持续存在。我认为我手动进行的路径设置与包安装程序相同。对于Abdfbase::TAbDeflateHelper::这是原始错误消息:

c:\pathtotheobjectfile\main.obj ilink32 Fehler错误: Nicht aufl sbares externes‘Abdfbase::TAbDeflateHelper::

仅仅设置路径和编译c++builder的项目(因此获取对象)就是所有的设置aks的目的。对于GetIt,我甚至不需要那么做。

这是我最简单的开始,我甚至连链接都没有。

代码语言:javascript
复制
#pragma hdrstop
#pragma argsused

#ifdef _WIN32
#include <tchar.h>
#else
  typedef char _TCHAR;
  #define _tmain main
#endif

#include <stdio.h>
#include <AbDfBase.hpp>
using namespace Abdfbase;

int _tmain(int argc, _TCHAR* argv[]) 
{
    TAbDeflateHelper* helper = new TAbDeflateHelper();
    return 0;
}

这是我第一次尝试使用c++builder。我遗漏了什么系统设置或特殊代码?

作为参考,导入的.hpp的开头显示了我试图实例化的类。

代码语言:javascript
复制
/ CodeGear C++Builder
// Copyright (c) 1995, 2021 by Embarcadero Technologies, Inc.
// All rights reserved

// (DO NOT EDIT: machine generated header) 'AbDfBase.pas' rev: 35.00 (Windows)

#ifndef AbdfbaseHPP
#define AbdfbaseHPP

#pragma delphiheader begin
#pragma option push
#pragma option -w-      // All warnings off
#pragma option -Vx      // Zero-length empty class member 
#pragma pack(push,8)
#include <System.hpp>
#include <SysInit.hpp>
#include <System.SysUtils.hpp>
#include <System.Classes.hpp>

//-- user supplied -----------------------------------------------------------

namespace Abdfbase
{
//-- forward type declarations -----------------------------------------------
class DELPHICLASS TAbDeflateHelper;
class DELPHICLASS TAbLogger;
class DELPHICLASS TAbNodeManager;
class DELPHICLASS EAbAbortProgress;
class DELPHICLASS EAbPartSizedInflate;
class DELPHICLASS EAbInflatePasswordError;
class DELPHICLASS EAbInternalInflateError;
class DELPHICLASS EAbInflateError;
class DELPHICLASS EAbInternalDeflateError;
class DELPHICLASS EAbDeflateError;
//-- type declarations -------------------------------------------------------
typedef System::StaticArray<int, 536870911> TAbDfIntegerList;

typedef TAbDfIntegerList *PAbDfIntegerList;

typedef void __fastcall (__closure *TAbProgressStep)(int aPercentDone);

class PASCALIMPLEMENTATION TAbDeflateHelper : public System::TObject
{
    typedef System::TObject inherited;
    
private:
    int FAmpleLength;
    int FChainLength;
    System::UnicodeString FLogFile;
    int FMaxLazy;
    TAbProgressStep FOnProgressStep;
    int FOptions;
    __int64 FPartSize;
    __int64 FSizeCompressed;
    __int64 FSizeNormal;
    __int64 FStreamSize;
    int FWindowSize;
    System::WideChar FZipOption;
    
protected:
    void __fastcall dhSetAmpleLength(int aValue);
    void __fastcall dhSetChainLength(int aValue);
    void __fastcall dhSetLogFile(const System::UnicodeString aValue);
    void __fastcall dhSetMaxLazy(int aValue);
    void __fastcall dhSetOnProgressStep(TAbProgressStep aValue);
    void __fastcall dhSetOptions(int aValue);
    void __fastcall dhSetWindowSize(int aValue);
    void __fastcall dhSetZipOption(System::WideChar aValue);
    
public:
    __fastcall TAbDeflateHelper();
    void __fastcall Assign(TAbDeflateHelper* aHelper);
    __property int AmpleLength = {read=FAmpleLength, write=dhSetAmpleLength, nodefault};
    __property int ChainLength = {read=FChainLength, write=dhSetChainLength, nodefault};
    __property System::UnicodeString LogFile = {read=FLogFile, write=dhSetLogFile};
    __property int MaxLazyLength = {read=FMaxLazy, write=dhSetMaxLazy, nodefault};
    __property int Options = {read=FOptions, write=dhSetOptions, nodefault};
    __property __int64 PartialSize = {read=FPartSize, write=FPartSize};
    __property System::WideChar PKZipOption = {read=FZipOption, write=dhSetZipOption, nodefault};
    __property __int64 StreamSize = {read=FStreamSize, write=FStreamSize};
    __property int WindowSize = {read=FWindowSize, write=dhSetWindowSize, nodefault};
    __property __int64 CompressedSize = {read=FSizeCompressed, write=FSizeCompressed};
    __property __int64 NormalSize = {read=FSizeNormal, write=FSizeNormal};
    __property TAbProgressStep OnProgressStep = {read=FOnProgressStep, write=dhSetOnProgressStep};
public:
    /* TObject.Destroy */ inline __fastcall virtual ~TAbDeflateHelper() { }
    
};
EN

回答 1

Stack Overflow用户

发布于 2022-02-08 23:38:54

设置搜索路径不会告诉编译器/链接器您实际使用的是哪些特定库。您的项目没有链接到Abbrevia包库,因此出现了错误。

如果您创建了一个GUI应用程序,并在设计时将Abbrevia组件可视化地丢弃到TFormTFrameTDataModule上,那么就会为您添加必要的包库引用。

但是,在控制台应用程序中,如果没有至少一个TDataModule,则必须手动向项目添加对Abbrevia的.bpi包库的引用。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71040159

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档