0

在我的新 C++Builder XE5 上链接 (Ararat) Synapse 库时遇到了一些麻烦。在此之前,我使用 C++Builder XE2,一切正常。现在我用 C++Builder XE5 创建了一个新项目,并在简单的按钮单击事件处理程序方法上添加了一些代码。编码:

单元1.h

#ifndef Unit1H
#define Unit1H
//---------------------------------------------------------------------------
#include <System.Classes.hpp>
#include <Vcl.Controls.hpp>
#include <Vcl.StdCtrls.hpp>
#include <Vcl.Forms.hpp>
//---------------------------------------------------------------------------
#include <blcksock.hpp>
#include <httpsend.hpp>
//---------------------------------------------------------------------------
class TForm1 : public TForm
{
__published:    // IDE-managed Components
    TMemo *Memo1;
    TButton *Button1;
    void __fastcall Button1Click(TObject *Sender);
private:    // User declarations
public:     // User declarations
    __fastcall TForm1(TComponent* Owner);
};

单元1.cpp

#include <vcl.h>
#pragma hdrstop

#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
    : TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
    THTTPSend *client = new THTTPSend();
}

现在我收到了 2 个链接错误:

Unresolved external 'Httpsend::THTTPSend::' referenced from ...\UNIT1.OBJ
Unresolved external '__fastcall Httpsend::THTTPSend::THTTPSend()' referenced from ...\UNIT1.OBJ

在项目选项中,我包含了一个包含 Synapse 文件的目录

这个错误怎么解决???

这是我正在使用的 Synapse 源的链接:http: //filetonet.com/AAA124f20433ab06682a1443633d799fa5bhttp://yadi.sk/d/UKJKR2hoHtD9q

4

2 回答 2

0

仅仅将项目指向 Synapse 的目录是不够的。您必须将 Synapse 库/源文件实际添加到您的项目中。

于 2014-02-15T23:15:48.220 回答
0

经过很多麻烦后,我将一些必需的 .pas 文件添加到我的项目中,然后将修改后的 synsock.hpp 放入项目目录和 #include "synsock.hpp" 行,然后再包含 blcksock.hpp 和 httpsend.hpp。现在一切都很好,但这太可怕了......

于 2014-02-18T11:23:48.983 回答