首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ Builder >

[Linker Error] Unresolved external '_这种异常是咋回事

2012-09-09 
[Linker Error] Unresolved external _这种错误是怎么回事[Linker Error] Unresolved external _SingleB

[Linker Error] Unresolved external '_这种错误是怎么回事
[Linker Error] Unresolved external '_SingleBedForm_f' referenced from D:\MB\MB800T-1.5.5T4\FETUSMB800T.OBJ
是面是提示信息,下面说说是怎么错的。
本来主窗体的名子是SingleBedForm,后面我要窗体名子改成了SingleBedForm_f就报上面这个错了。但是_SingleBedForm_f(带下划线)这个函数我没有找不到,也就是没有这个函数。报错的FETUSMB800T.OBJ是主程序工程名称下面是内容

C/C++ code
#include <vcl.h>#pragma hdrstop#include "Logo.h"//---------------------------------------USEFORM("singleBed.cpp", SingleBedForm_f);USEFORM("about.cpp", AboutSystemForm);USEFORM("dataManager.cpp", dataManagerForm);USEFORM("doubleBed.cpp", DoubleBedForm);USEFORM("fileInPut.cpp", inPutForm);USEFORM("fileOutPut.cpp", outPutForm);USEFORM("fourBed.cpp", FourBedForm);USEFORM("infoShow.cpp", hintShowForm);USEFORM("PatientList.cpp", PatientListForm);USEFORM("printChildRecord.cpp", FormPrintRecord);USEFORM("printChildRecord_B5.cpp", FormPrintRecord_B5);USEFORM("systemSet.cpp", systemSetForm);USEFORM("trendView.cpp", trendViewForm);USEFORM("Print_A4.cpp", informPrintForm);USEFORM("gradeCheck.cpp", gradeCheckForm);USEFORM("Print_B5.cpp", informPrintForm_B5);USEFORM("Logo.cpp", LogoForm);//---------------------------------------WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int){    try    {        // 添加LogoForm        LogoForm = new TLogoForm(Application);        LogoForm->ProgressBar->Position=0;        LogoForm->ProgressBar->Max=17;        LogoForm->ProgressBar->Min=0;        LogoForm->Hide();        LogoForm->Update();        Application->Initialize();        LogoForm->ProgressBar->Position++;        LogoForm->showLabel->Caption = "正在加载程序,请稍候...";        Application->CreateForm(__classid(TDoubleBedForm), &DoubleBedForm);         Application->CreateForm(__classid(TSingleBedForm_f), &SingleBedForm_f);         Application->CreateForm(__classid(TFourBedForm), &FourBedForm);         Application->CreateForm(__classid(TinPutForm), &inPutForm);         Application->CreateForm(__classid(ToutPutForm), &outPutForm);         Application->CreateForm(__classid(ThintShowForm), &hintShowForm);         Application->CreateForm(__classid(TPatientListForm), &PatientListForm);         Application->CreateForm(__classid(TFormPrintRecord), &FormPrintRecord);         Application->CreateForm(__classid(TFormPrintRecord_B5), &FormPrintRecord_B5);         Application->CreateForm(__classid(TtrendViewForm), &trendViewForm);         Application->CreateForm(__classid(TAboutSystemForm), &AboutSystemForm);         Application->CreateForm(__classid(TinformPrintForm), &informPrintForm);         Application->CreateForm(__classid(TinformPrintForm_B5), &informPrintForm_B5);         Application->CreateForm(__classid(TgradeCheckForm), &gradeCheckForm);         LogoForm->ProgressBar->Position++;        if(LogoForm!=NULL)            LogoForm->Close();        delete LogoForm;        Application->Run();    }    catch (Exception &exception)    {        Application->ShowException(&exception);    }    catch (...)    {        try        {            throw Exception("");        }        catch (Exception &exception)        {            Application->ShowException(&exception);        }    }    return 0;}


我要我把名子改成以前的SingleBedForm就没事了,谁知道这是怎么回事?

[解决办法]
建议你在IDE中修改单元的名字,另存为即可。
_SingleBedForm_f,是编译器生成的名字,对应你工程中的 SingleBedForm_f
------解决方案--------------------


报错的FETUSMB800T.OBJ
删除掉这个文件,编译时重新生成这个文件应该就可以了,


[解决办法]
把SingleBedForm_f从项目中remove掉,然后再加进来

热点排行