|
![](/i/fill.gif) |
I can't help with your problem, but personally, I wouldn't send anything
this specific to comp.programming.c++....you'll get flamed from here to
sunday and back. But heck, you'll have figured that out by now<G>.
Marcin Tustin wrote:
> The text that follows was sent to comp.programming.C++
>
> Hello all! I'm new to C++, and I'm writing a dll
> plugin for Moray. I have two translation units, and I need
> to communicate between them. Here are the headers.
> Once they compile, I get errors like "GetDLLInfo already
> defined in Blob.obj" when linking Blobinterface.obj.
> Incidentally, I'm using VC++ 6.
>
> // Blob.h : main header file for the BLOB DLL
> //
>
> #if
> !defined(AFX_BLOB_H__908F9E32_5567_11D3_BD31_AFFA61F8C72B__I
> NCLUDED_)
> #define
> AFX_BLOB_H__908F9E32_5567_11D3_BD31_AFFA61F8C72B__INCLUDED_
>
> #if _MSC_VER > 1000
> #pragma once
> #endif // _MSC_VER > 1000
>
> #ifndef __AFXWIN_H__
> #error include 'stdafx.h' before including this file
> for PCH
> #endif
>
> #ifndef _MFCPA_H_
> #include "..\MFCPluginApp.h"
> #define _MFCPA_H_
> #endif
>
> #ifndef _MFCPACPP_
> #include "..\MFCPluginApp.cpp"
> #define _MFCIHPP_
> #define _MFCPACPP_
> #endif
>
> #include "..\plugin.h"
> #include "resource.h" // main symbols
>
> #include <afxcoll.h>
> #include <afxtempl.h>
>
> //#include "map.h"
>
> ////////////////////////////////////////////////////////////
> /////////////////
> // CBlobApp
> // See Blob.cpp for the implementation of this class
> //
>
> //typedef CMap<DWORD,DWORD,CMyStruct*,CMyStruct*&> BLOBMAP;
>
> class CBlobApp : public CMFCPluginApp
> {
> public:
> void RegisterBlob(long hHandle, MRY_OBJ_ATTRIBUTES
> BlobStruct);
> CBlobApp();
>
> virtual LRESULT GetDLLInfo(LPMRY_DLLINFO pDataBlock);
> virtual BOOL InitInstance();
>
> // Overrides
> // ClassWizard generated virtual function overrides
> //{{AFX_VIRTUAL(CBlobApp)
> //}}AFX_VIRTUAL
>
> //{{AFX_MSG(CBlobApp)
> // NOTE - the ClassWizard will add and remove
> member functions here.
> // DO NOT EDIT what you see in these blocks
>
> of generated code !
> //}}AFX_MSG
> DECLARE_MESSAGE_MAP()
> private:
> CMap<LONG,LONG,MRY_OBJ_ATTRIBUTES,MRY_OBJ_ATTRIBUTES
> gBlobMap;
>
>
> }
> //Blob.cpp declares CBlobApp theApp, but does not initialize
>
> it.
>
> //////////
> //Blobinterface.h
> #ifndef _BLOB_INTERFACES_HPP_
> #define _BLOB_INTERFACES_HPP_
>
> #pragma once
>
> #ifndef _MFCIHPP_
> #define _MFCIHPP_
> #include "..\MFCInterface.hpp"
> #endif
>
> #ifndef _MFCICPP_
> #define _MFCICPP_
> //#include "..\MFCInterface.cpp"
> #endif
>
> //#include "..\MFCPluginApp.h"
>
> #include "blob.cpp"
> //#include "map.h"
> // Forward-declare the Scene Interface class
> class CScene;
>
> ////////////////////////////////////////////////////////////
> /////
> // CScene Scene Interface
> // This interface is used to communicate with Moray and to
> receive
> // event messages from Moray.
> ////////////////////////////////////////////////////////////
> /////
> class CScene : public CSceneInterface {
> DECLARE_SCENE_STATIC(CScene);
> // NO objects defined by
> blobCLensFlareInterface* m_pLensInterface;
> public:
> // void AddApp(CBlobApp* panApp);
>
> virtual void Init();
> virtual long OnEvent(long hObjID,int nFlags);
> // CBlobApp *ptheApp;
>
>
> //No new objects void
> SetLensFlareInterface(CLensFlareInterface* pLensInterfa
> ce) { m_pLensInterface=pLensInterface; };
> }
>
> extern CBlobApp theApp;
>
> #endif
>
> --
> Humanity will not be happy until the day when the
> last bureaucrat has been hanged with the guts of
> the last capitalist.
>
> Marcin Tustin
> Mar### [at] mindless REMOVEGOATS&OATS.com
> Marcint@^^refreshmagazine.com.nomail
--
Semper ubi sub ubi
- Teresa Roguski
Post a reply to this message
|
![](/i/fill.gif) |