Код | #pragma once
#include "GPSInfo.h" // Added by ClassView #include "targetver.h"
class NMEAParser { public: NMEAParser(); NMEAParser(LPCTSTR outputFileName); virtual ~NMEAParser(); void Parse(const CHAR *buf, const UINT bufSize); GPSInfo& GetActualGPSInfo();
private: CFile m_outputFile;
void ParseRecursive(const CHAR ch); void ParseNMEASentence(const CHAR *addressField, const CHAR *buf, const UINT bufSize); void ProcessGPGGA(const CHAR *buf, const UINT bufSize); void ProcessGPGSA(const CHAR *buf, const UINT bufSize); void ProcessGPGSV(const CHAR *buf, const UINT bufSize); void ProcessGPRMB(const CHAR *buf, const UINT bufSize); void ProcessGPRMC(const CHAR *buf, const UINT bufSize); void ProcessGPZDA(const CHAR *buf, const UINT bufSize);
BOOL m_logging; GPSInfo m_GPSInfo; };
|
Цитата(Thesame @ 16.10.2008, 15:42 ) | #include <windows.h> #include <afx.h> |
нельзя подключать одновременно, плюс
Цитата(Thesame @ 16.10.2008, 15:42 ) | выдал ошибку 1>C:\Program Files\Microsoft Visual Studio 9.0\VC\atlmfc\include\afx.h(24) : fatal error C1189: #error : Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version. Please #define _AFXDLL or do not use /MD[d] |
нужно добавить #define _AFXDLL в общем
Код | #pragma once #include <stdio.h> #ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista. #define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows. #define AFX_NMEAPARSER_H__26C0F55B_19A8_4E71_A1BA_A2EBA169FCEB__INCLUDED_ #define _AFXDLL #include <stdio.h> //#include <windows.h> #include <afx.h>
#if !defined(_WIN32) #error _WIN32 must be defined //error #endif
#endif
|
|