|
폼소스에서 *.C의 함수를 호출했는데 아래와 같은 링크에러가 납니다.
[Linker Error] Unresolved external 'Poll()' referenced from E:\TEMP\FORM_MAIN.OBJ
********** Form_Main.Cpp의 내용 *************
#pragma hdrstop
#include "Ex.h"
//━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
#pragma package(smart_init)
#pragma resource "*.dfm"
TMainWin *MainWin;
//━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
__fastcall TMainWin::TMainWin(TComponent* Owner)
: TForm(Owner)
{
}
void __fastcall TMainWin::FormShow(TObject *Sender)
{
Poll();
}
********** Ex.C 의 내용 ***************
#include "Ex.h"
void Poll(void)
{
}
********** Ex.h 의 내용 ***************
#ifndef Ex_H
#define Ex_H
void Poll(void);
// extern "C" void Poll(void); <= 요렁게 하면 E2040 Declaration terminated incorrectly 에러가 납니다.
#endif
|