請問,為何 我的C++ Builder 編譯會出現這些問題,是什么地方沒包含檔案?
在線等,網上資料太少了,謝謝大家,在線等
[C++ Error] _streambuf.h(76): E2450 Undefined structure 'locale'
[C++ Error] _streambuf.h(76): E2449 Size of '_M_locale' is unknown or zero
[C++ Error] _streambuf.h(76): E2450 Undefined structure 'locale'
[C++ Error] _streambuf.h(130): E2293 ) expected
[C++ Error] _streambuf.h(136): E2293 ) expected
[C++ Error] _streambuf.h(147): E2293 ) expected
[C++ Error] _streambuf.h(338): E2450 Undefined structure 'locale'
[C++ Error] _streambuf.h(338): E2449 Size of '_M_locale' is unknown or zero
[C++ Error] _streambuf.h(338): E2450 Undefined structure 'locale'
[C++ Error] _streambuf.h(398): E2293 ) expected
[C++ Error] _streambuf.h(401): E2293 ) expected
[C++ Error] _streambuf.h(408): E2293 ) expected
[C++ Error] _streambuf.h(458): E2316 'showmanyc' is not a member of 'streambuf'
[C++ Error] _streambuf.c(175): E2316 'basic_streambuf<_CharT,_Traits>::showmanyc()' is not a member of 'basic_streambuf<_CharT,_Traits>'
[C++ Error] _streambuf.c(187): E2316 'seekpos' is not a member of 'basic_streambuf<_CharT,_Traits>'
[C++ Error] _streambuf.c(208): E2190 Unexpected }
[C++ Error] _sstream.h(69): E2293 ) expected
[C++ Error] _sstream.h(71): E2040 Declaration terminated incorrectly
[C++ Error] _sstream.h(91): E2293 ) expected
[C++ Error] _sstream.h(94): E2293 ) expected
[C++ Error] _sstream.h(102): E2089 Identifier 'openmode' cannot have a type qualifier
[C++ Error] _sstream.h(102): E2303 Type name expected
[C++ Error] _sstream.h(102): E2139 Declaration missing ;
[C++ Error] _sstream.h(135): E2293 ) expected
[C++ Error] _sstream.h(136): E2040 Declaration terminated incorrectly
[C++ Error] _sstream.h(136): E2228 Too many error or warning messages
uj5u.com熱心網友回復:
沒原始碼看不出問題uj5u.com熱心網友回復:
DLL里內容//---------------------------------------------------------------------------
#include <vcl.h>
#include <windows.h>
#pragma hdrstop
#include "main.h" //<--------------添加這個就出現這些錯誤
USERES("Flash_tool.res");
USEFORM("main.cpp",TMainForm);
//---------------------------------------------------------------------------
// Important note about DLL memory management when your DLL uses the
// static version of the RunTime Library:
//
// If your DLL exports any functions that pass String objects (or structs/
// classes containing nested Strings) as parameter or function results,
// you will need to add the library MEMMGR.LIB to both the DLL project and
// any other projects that use the DLL. You will also need to use MEMMGR.LIB
// if any other projects which use the DLL will be performing new or delete
// operations on any non-TObject-derived classes which are exported from the
// DLL. Adding MEMMGR.LIB to your project will change the DLL and its calling
// EXE's to use the BORLNDMM.DLL as their memory manager. In these cases,
// the file BORLNDMM.DLL should be deployed along with your DLL.
//
// To avoid using BORLNDMM.DLL, pass string information using "char *" or
// ShortString parameters.
//
// If your DLL uses the dynamic version of the RTL, you do not need to
// explicitly add MEMMGR.LIB as this will be done implicitly for you
//---------------------------------------------------------------------------
#pragma argsused
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fwdreason, LPVOID lpvReserved)
{
// Perform actions based on the reason for calling.
switch( fwdreason )
{
case DLL_PROCESS_ATTACH:
// Initialize once for each new process.
// Return FALSE to fail DLL load.
break;
case DLL_THREAD_ATTACH:
// Do thread-specific initialization.
break;
case DLL_THREAD_DETACH:
// Do thread-specific cleanup.
break;
case DLL_PROCESS_DETACH:
// Perform any necessary cleanup.
break;
}
return TRUE; // Successful DLL_PROCESS_ATTACH.
}
//---------------------------------------------------------------------------
extern "C" __declspec(dllexport) __stdcall void ShowDLLForm()
{
TMainForm *frm = new TMainForm(Application);
frm->ShowModal();
delete frm;
}
//*****************************************************************************
uj5u.com熱心網友回復:
main當中部分源代碼//---------------------------------------------------------------------------
#ifndef mainH
#define mainH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ComCtrls.hpp>
#include <ExtCtrls.hpp>
#include <Buttons.hpp>
#include <ToolWin.hpp>
#include <Menus.hpp>
#include <ActnList.hpp>
#include <Dialogs.hpp>
#include <ImgList.hpp>
#include <SyncObjs.hpp>
#include "CGAUGES.h"
#include <vector>
#include <list>
#include "Trayicon.h"
#include <stdio.h>
#include <string>
#include "eboot\interface.h"
#include "flashtool_handle.h"
#include "flashtool.h"
#include "tboot_1.h"
#include "CGAUGES.h"
#include "param.h"
#include <CheckLst.hpp>
#include "Logger.h"
#include "Setting.h"
#include "SPFTMsg.h"
#include "FlashToolTypedefs.h"
#include "PlatformInfo.h"
#include "updater.h"
#include "CloneInfoHandle.h"
//---------------------------------------------------------------------------
class DownloadBinFile
{
public:
DownloadBinFile() {
m_Filepath = "";
m_Enable = false;
}
~DownloadBinFile() { }
AnsiString m_Filepath;
bool m_Enable;
};
class DownloadSet
{
public:
DownloadSet() {
m_Scatter = "";
m_BootLoader = "";
m_BootLoader_Ext = "";
m_BootLoader_Enable = false;
m_BinFiles.clear();
}
~DownloadSet() { }
bool operator == (const DownloadSet &r_value);
/*
{
if( 0==m_Scatter.AnsiCompareIC(r_value.m_Scatter) &&
0==m_BootLoader.AnsiCompareIC(r_value.m_BootLoader) &&
m_BinFiles.size()==r_value.m_BinFiles.size()
)
{
unsigned int i;
for(i=0; i < m_BinFiles.size(); i++)
{
if( 0 != m_BinFiles[i].m_Filepath.AnsiCompareIC(r_value.m_BinFiles[i].m_Filepath) )
{
return false;
}
}
return true;
}
return false;
}*/
AnsiString m_Scatter;
AnsiString m_BootLoader;
AnsiString m_BootLoader_Ext;
bool m_BootLoader_Enable;
std::vector<DownloadBinFile> m_BinFiles;
};
typedef std::list<DownloadSet> DownloadHistoryList;
#define MAX_DOWNLOAD_HISTORY 10
。。。。。。
。。。。。。
。。。。。。
//---------------------------------------------------------------------------
class TMainForm : public TForm, public IPlatformOb, public IVersionOb
{
friend class tboot_1;
__published: // IDE-managed Components
TMainMenu *m_Main;
TMenuItem *File1;
TMenuItem *Options1;
TMenuItem *Run1;
TMenuItem *Download1;
TActionList *ActionList1;
TMenuItem *Open1;
TMenuItem *N1;
TMenuItem *Exit1;
TMenuItem *BaudRate1;
TMenuItem *mi_115200;
uj5u.com熱心網友回復:
#ifndef _LOGGER_H#define _LOGGER_H
#include <iostream>
#endif // _LOGGER_H
、、============================
#include "Logger.h"
using namespace std;
#pragma warn -8004
就會出現這種問題
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/90228.html
