Unresolved External error when Creating Custom Message

Discussion of open issues, suggestions and bugs regarding to (known as Delphi HL7) HL7 Components
Post Reply
divinedesign
Posts: 3
Joined: Thu Feb 25, 2016 8:58 am

Unresolved External error when Creating Custom Message

Post by divinedesign »

Hi,

I'm trying to create a custom DFT message but I'm getting the following linker error:
I've used this code before in older projects (differten HL7 versions) and this is the first time I'm running into this problem.
Do you have any advice? Thank you.

[ilink32 Error] Error: Unresolved external '__fastcall Bshl7object::TBSHL7Object::GetObjectW(System::UnicodeString)' on C++ Builder XE7

I get the error as soon as I add ": public TBSHL7Message"

Code: Select all

//---------------------------------------------------------------------------

#ifndef MsgDFTH
#define MsgDFTH

//---------------------------------------------------------------------------
#include <BSHL7Object.hpp>
#include <BSHL723.hpp>
#include "GrpFIN.h"
//---------------------------------------------------------------------------

class MsgDFT : public TBSHL7Message
{
public:
   __fastcall MsgDFT();
   TbsMSH_23* GetMSH();

   TbsEVN_23* GetEVN();

   TbsPID_23* GetPID();

   TbsPV1_23* GetPV1();

   GrpFIN* GetFIN(int RepCount);

   void __fastcall Init(void);
};

#endif

Code: Select all

#pragma hdrstop

#include "MsgDFT.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)

__fastcall MsgDFT::MsgDFT()
{

}

void __fastcall MsgDFT::Init(void)
{
	SetType("DFT_CUST","2.3","ATX");
}

TbsMSH_23* MsgDFT::GetMSH()
{
	return (TbsMSH_23*)GetOrCreateObject("MSH");
}

TbsEVN_23* MsgDFT::GetEVN()
{
	return (TbsEVN_23*)GetOrCreateObject("EVN");
}

TbsPID_23* MsgDFT::GetPID()
{
	return (TbsPID_23*)GetOrCreateObject("PID");
}

TbsPV1_23* MsgDFT::GetPV1()
{
	return (TbsPV1_23*)GetOrCreateObject("PV1");
}

GrpFIN* MsgDFT::GetFIN(int RepCount)
{
	return (GrpFIN*)GetOrCreateArrayObject("FIN_CUST", RepCount);
}

Code: Select all

#pragma hdrstop
#include <vcl.h>
#include "StringFunctions.h"
#include "HL7Library.h"
#include <BSHL7Object.hpp>
#include <BSHL723.hpp>
//---------------------------------------------------------------------------
#pragma package(smart_init)

void _fastcall setupHL7Library()
{
	String fullFileName = ExtractFilePath(Application->ExeName) + "BSHL723.BSL";
	BSHL7Library()->LoadFromFile(fullFileName);

	//add custum zft segment definition
	TBSHL7Definition *LDefinitionZft = new TBSHL7Definition("ZFT","2.3","ATX",'S');
	BSHL7Library()->AddType(LDefinitionZft);
	LDefinitionZft->Add("Field1","ST",0,1);

	//add custum fin group segment definition
	TBSHL7Definition *LDefinitionFin = new TBSHL7Definition("FIN_CUST","2.3","ATX",'G');
	BSHL7Library()->AddType(LDefinitionFin);
	LDefinitionFin->Add("FT1","FT1",0,1);
	LDefinitionFin->Add("ZFT","ZFT",0,1);

	//add custum dft message definition
	TBSHL7Definition *LDefinitionDft = new TBSHL7Definition("DFT_CUST","2.3","ATX",'M');
	BSHL7Library()->AddType(LDefinitionDft);
	LDefinitionDft->Add("MSH","MSH",1,1);
	LDefinitionDft->Add("EVN","EVN",0,1);
	LDefinitionDft->Add("PID","PID",0,1);
	LDefinitionDft->Add("PV1","PV1",0,1);
	LDefinitionDft->Add("FIN_CUST","FIN_CUST",0,-1,"ATX"); //Max: -1 For  array
}
//
admin
Site Admin
Posts: 256
Joined: Sun Jun 05, 2011 8:06 pm

Re: Unresolved External error when Creating Custom Message

Post by admin »

Hi,

Please send a sample project.

Best regards.
divinedesign
Posts: 3
Joined: Thu Feb 25, 2016 8:58 am

Re: Unresolved External error when Creating Custom Message

Post by divinedesign »

Hi, I've emailed you a sample project just now. Thanks!
admin
Site Admin
Posts: 256
Joined: Sun Jun 05, 2011 8:06 pm

Re: Unresolved External error when Creating Custom Message

Post by admin »

Hi,

Problem fixed with version 1.7.12.

Best regards.
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests