Click here to Skip to main content
15,918,889 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: CxImage library Pin
Mark Salsbery9-Jul-07 11:10
Mark Salsbery9-Jul-07 11:10 
QuestionWhat's the equivalent to C# static classes? Pin
mid=57417-Jul-07 6:36
mid=57417-Jul-07 6:36 
AnswerRe: What's the equivalent to C# static classes? Pin
Mark Salsbery7-Jul-07 7:27
Mark Salsbery7-Jul-07 7:27 
GeneralRe: What's the equivalent to C# static classes? Pin
mid=57417-Jul-07 7:34
mid=57417-Jul-07 7:34 
GeneralRe: What's the equivalent to C# static classes? Pin
Mark Salsbery7-Jul-07 8:04
Mark Salsbery7-Jul-07 8:04 
GeneralRe: What's the equivalent to C# static classes? Pin
mid=57417-Jul-07 8:08
mid=57417-Jul-07 8:08 
GeneralRe: What's the equivalent to C# static classes? Pin
Mark Salsbery7-Jul-07 9:07
Mark Salsbery7-Jul-07 9:07 
Questionunresolved external symbol error when using template function Pin
patrick.steal7-Jul-07 1:40
patrick.steal7-Jul-07 1:40 
Hi

I am trying to make a detour wrapper class and so i have created some template functions and classes. These are the classes(in simplified form):


Header File:
<br />
#ifndef DETOUREME_H<br />
#define DETOUREME_H<br />
<br />
#include "..\..\..\stdafx.h"<br />
<br />
HRESULT WINAPI somefunction( void );<br />
<br />
class DetourWrapper<br />
{<br />
public:<br />
	DetourWrapper(void){};<br />
	~DetourWrapper(void){};<br />
<br />
	template<typename H> BOOL isDetoured ( H* pClass, int iType );<br />
};<br />
<br />
class DetourThis<br />
{<br />
public:<br />
	DetourThis(){};<br />
	~DetourThis(){};<br />
<br />
	virtual BOOL isDetoured( void ){ return TRUE; };<br />
};<br />
<br />
extern DetourWrapper g_pDW;<br />
extern DetourThis *d_pDT;<br />
<br />
#endif




CPP File:
<br />
#include "Debug.h"<br />
<br />
extern DetourWrapper g_pDW;<br />
extern DetourThis *d_pDT = NULL;<br />
<br />
template<typename H> BOOL DetourWrapper::isDetoured ( H* pClass, int iType )<br />
{<br />
	return pClass->isDetoured();<br />
}<br />
<br />
HRESULT WINAPI somefunction( void )<br />
{<br />
	d_pDT = new DetourThis;<br />
	BOOL enabled = g_pDW.isDetoured(d_pDT, 2);<br />
}



Error:
Linking...<br />
Debug.obj : error LNK2001: unresolved external symbol "class DetourWrapper g_pDW" (?g_pDW@@3VDetourWrapper@@A)<br />
C:\Documents and Settings\Steal.Patrick\My Documents\Visual Studio 2005\Projects\Detours\Release\Detour.dll : fatal error LNK1120: 1 unresolved externals



Can someone please tell me what i am doing wrong here?

Thanks
QuestionC++/CLI Pin
Subodh Borker7-Jul-07 1:15
Subodh Borker7-Jul-07 1:15 
AnswerRe: C++/CLI Pin
Bartosz Bien13-Jul-07 6:57
Bartosz Bien13-Jul-07 6:57 
QuestionTo add fields on a table Pin
mikobi6-Jul-07 21:47
mikobi6-Jul-07 21:47 
AnswerRe: To add fields on a table Pin
Christian Graus7-Jul-07 1:18
protectorChristian Graus7-Jul-07 1:18 
Question!declared to have 'C' linkage [modified] Pin
abbd6-Jul-07 0:14
abbd6-Jul-07 0:14 
AnswerRe: !declared to have 'C' linkage Pin
Christian Graus6-Jul-07 0:33
protectorChristian Graus6-Jul-07 0:33 
QuestionTo refresh DataSource Pin
mikobi4-Jul-07 23:22
mikobi4-Jul-07 23:22 
AnswerRe: To refresh DataSource Pin
Paul Conrad12-Jul-07 18:00
professionalPaul Conrad12-Jul-07 18:00 
GeneralRe: To refresh DataSource Pin
mikobi13-Jul-07 2:30
mikobi13-Jul-07 2:30 
QuestionHelp reading vector name from file Pin
empaleador4-Jul-07 14:52
empaleador4-Jul-07 14:52 
AnswerRe: Help reading vector name from file Pin
Christian Graus4-Jul-07 15:07
protectorChristian Graus4-Jul-07 15:07 
GeneralRe: Help reading vector name from file Pin
empaleador4-Jul-07 16:00
empaleador4-Jul-07 16:00 
GeneralRe: Help reading vector name from file Pin
Christian Graus4-Jul-07 17:16
protectorChristian Graus4-Jul-07 17:16 
GeneralRe: Help reading vector name from file Pin
empaleador5-Jul-07 1:41
empaleador5-Jul-07 1:41 
GeneralRe: Help reading vector name from file Pin
Christian Graus5-Jul-07 2:34
protectorChristian Graus5-Jul-07 2:34 
GeneralRe: Help reading vector name from file Pin
led mike5-Jul-07 6:36
led mike5-Jul-07 6:36 
GeneralRe: Help reading vector name from file Pin
Christian Graus5-Jul-07 7:24
protectorChristian Graus5-Jul-07 7:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.