Typedef where?

Sep 29, 2011 at 8:03am

Hello!
I am trying to convert my vc6 code to vc++ 2010.
In http://msdn.microsoft.com/en-us/library/tsx7wabs%28VS.80%29.aspx
it says that typenames has to added if the depended name is treated
as a type. I have been doing that consistently in my code but
this one is giving problems!
What should i do here?


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
		template <class ClassDesc> class DMScriptClassT
		{
		public:
			typedef typename ClassDesc::base_imp_type    imp_type;
			typedef typename ClassDesc::base_ref_type    ref_type;
		public:
			static DM::String class_name()      { return ClassDesc::class_name(); }
			static DM::String base_class_name() { return ClassDesc::base_class_name(); }

			static uint32 GetClassToken( const DM::ScriptObject &so );
			static bool   GetClassToken( const DM::ScriptObject &so, uint32 &token );

			static ref_type                GetImplementation( const DM::ScriptObject &so )
			{
				ref_type imp = reinterpret_cast<imp_type *>( GetClassToken( so ) );
				ThrowStringUnless( imp != NULL, rerrDispatchOffNullObject );
				return imp;
			}
			static ref_type                GetImplementationOrNull( const DM::ScriptObject &so )
			{
				ref_type imp = reinterpret_cast<imp_type *>( GetClassToken( so ) );
				return imp;
			}
			static ref_type                GetImplementationIfThere( const DM::ScriptObject &so )
			{
				ref_type imp;
				uint32 token;
				if ( GetClassToken( so, token ) )
				{
					imp = reinterpret_cast<imp_type *>( token );
				}
				return imp;
			}

			static DM::ScriptObject   NewScriptObject();
			static DM::ScriptObject   NewScriptObject( const ref_type &act_obj );
			static ref_type           ReplaceImplementation( const DM::ScriptObject &so, const ref_type &new_imp );
			static void AddMethod( const char *signature, void *function, ulong linkage )
			{
				DM::ClassAddMethod( class_name(), DM::NewCallbackFunction( signature, function, linkage) );
			}

			static uint32 alloc( DM_Env *dm_env, uint32 );
			static void dealloc( DM_Env *dm_env, uint32 token, uint32 );

			static void RegisterClass();
			static void UnregisterClass();
		};


template <class ClassDesc> bool DMScriptClassT<ClassDesc>::GetClassToken( const DM::ScriptObject &so, uint32 &token_out )
		{
			bool found = false;
			uint32 token = 0;
			if ( so.IsValid() )
			{
				found = DM::ScriptObjectGetClassTokenByIndex( so, ClassDesc::class_index, ClassDesc::class_id, false, &token );
				if ( !found )
				{
					// If cached index and id do not work, look them up again
					uint32             new_class_index;
					DMScript_ClassId   new_class_id;
					found =    DM::ScriptObjectGetClassIndex( so, class_name(), false, &new_class_index, &new_class_id )
					        && DM::ScriptObjectGetClassTokenByIndex( so, new_class_index, new_class_id, false, &token );

					// Only replace cached index and id if the class descriptor described by 'new_class_index'
					// and 'new_class_id' is registered;
					if ( found )
					{
						ClassDesc::class_index = new_class_index;
						ClassDesc::class_id    = new_class_id;
					}
				}
			}

			if ( found )
			{
				token_out = token;
			}
			return found;
		}

		template <class ClassDesc> DMScriptClassT<ClassDesc>::ref_type  DMScriptClassT<ClassDesc>::ReplaceImplementation( const DM::ScriptObject &script_obj, const ref_type &new_imp )
		{
			ref_type old_imp;
			if ( script_obj.IsValid() )
			{
				uint32 old_imp_token = 0;
				if ( !DM::ScriptObjectReplaceClassTokenByIndex( script_obj, ClassDesc::class_index, ClassDesc::class_id
						                                      , reinterpret_cast<uint32>( new_imp.get() ), false, &old_imp_token ) )
				{
					// If cached index and id do not work, look them up again
					uint32             new_class_index;
					DMScript_ClassId   new_class_id;
					DM::ScriptObjectGetClassIndex( script_obj, class_name(), true, &new_class_index, &new_class_id );
					// Only replace cached index and id if the class descriptor described by 'new_class_index'
					// and 'new_class_id' is registered;
					DM::ScriptObjectReplaceClassTokenByIndex( script_obj, new_class_index, new_class_id
						                                    , reinterpret_cast<uint32>( new_imp.get() ), true, &old_imp_token );

					ClassDesc::class_index = new_class_index;
					ClassDesc::class_id    = new_class_id;
				}
				old_imp = reinterpret_cast<imp_type *>( old_imp_token );
				new_imp.addRef();
				old_imp.remRef();
			}
			return old_imp;
		}






It gives error:

1>------ Build started: Project: ITK, Configuration: Debug Win32 ------
1>  ITKMain.cpp
1>c:\program files (x86)\gatan\dmsdk\win32\include\DMPluginUtility.h(467): warning C4346: 'Gatan::PlugIn::DMScriptClassT<ClassDesc>::ref_type' : dependent name is not a type
1>          prefix with 'typename' to indicate a type
1>c:\program files (x86)\gatan\dmsdk\win32\include\DMPluginUtility.h(467): error C2143: syntax error : missing ';' before 'Gatan::PlugIn::DMScriptClassT<ClassDesc>::ReplaceImplementation'
1>c:\program files (x86)\gatan\dmsdk\win32\include\DMPluginUtility.h(467): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\gatan\dmsdk\win32\include\DMPluginUtility.h(467): error C2888: 'DMScriptClassT<ClassDesc>::ref_type ref_type' : symbol cannot be defined within namespace 'PlugIn'
1>c:\program files (x86)\gatan\dmsdk\win32\include\DMPluginUtility.h(467): fatal error C1903: unable to recover from previous error(s); stopping compilation



Any help appreciated!

Sep 29, 2011 at 8:47am
If i put

template <class ClassDesc> typename DMScriptClassT<ClassDesc>::ref_type DMScriptClassT<ClassDesc>::ReplaceImplementation( const DM::ScriptObject &script_obj, const ref_type &new_imp )

Then all the classes i need in other sources are not recognized:

1>------ Build started: Project: ITK, Configuration: Debug Win32 ------
1>  ITKMain.cpp
1>  DiscreteGaussianFilter.cpp
1>..\DiscreteGaussianFilter.cpp(11): error C2653: 'DM' : is not a class or namespace name
1>..\DiscreteGaussianFilter.cpp(11): error C2065: 'Image' : undeclared identifier
1>..\DiscreteGaussianFilter.cpp(11): error C2146: syntax error : missing ';' before identifier 'l_deriv_img_out'
1>..\DiscreteGaussianFilter.cpp(11): error C2065: 'l_deriv_img_out' : undeclared identifier
Sep 29, 2011 at 9:09am
Can you post which line number in the source posted here corresponds to line 467?
Sep 29, 2011 at 9:25am
I think you have to drop the "typename" keyword in your typedefs (line 4 and 5 of your first post).
Sep 29, 2011 at 10:18am

Thanks for the replies!

Line 467 is the line of my second post.

With dropping the typename it gives:

 1>------ Build started: Project: ITK, Configuration: Debug Win32 ------
1>  ITKMain.cpp
1>c:\program files (x86)\gatan\dmsdk\win32\include\DMPluginUtility.h(345): warning C4346: 'ClassDesc::base_imp_type' : dependent name is not a type
1>          prefix with 'typename' to indicate a type
1>          c:\program files (x86)\gatan\dmsdk\win32\include\DMPluginUtility.h(391) : see reference to class template instantiation 'Gatan::PlugIn::DMScriptClassT<ClassDesc>' being compiled
1>c:\program files (x86)\gatan\dmsdk\win32\include\DMPluginUtility.h(345): error C2146: syntax error : missing ';' before identifier 'imp_type'
1>c:\program files (x86)\gatan\dmsdk\win32\include\DMPluginUtility.h(345): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\gatan\dmsdk\win32\include\DMPluginUtility.h(346): warning C4346: 'ClassDesc::base_ref_type' : dependent name is not a type
1>          prefix with 'typename' to indicate a type
1>c:\program files (x86)\gatan\dmsdk\win32\include\DMPluginUtility.h(346): error C2146: syntax error : missing ';' before identifier 'ref_type'
1>c:\program files (x86)\gatan\dmsdk\win32\include\DMPluginUtility.h(346): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\gatan\dmsdk\win32\include\DMPluginUtility.h(355): error C2146: syntax error : missing ';' before identifier 'GetImplementation'
1>c:\program files (x86)\gatan\dmsdk\win32\include\DMPluginUtility.h(355): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\gatan\dmsdk\win32\include\DMPluginUtility.h(355): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\gatan\dmsdk\win32\include\DMPluginUtility.h(356): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\gatan\dmsdk\win32\include\DMPluginUtility.h(360): warning C4183: 'GetImplementation': missing return type; assumed to be a member function returning 'int'
1>c:\program files (x86)\gatan\dmsdk\win32\include\DMPluginUtility.h(361): error C2146: syntax error : missing ';' before identifier 'GetImplementationOrNull'
1>c:\program files (x86)\gatan\dmsdk\win32\include\DMPluginUtility.h(361): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\gatan\dmsdk\win32\include\DMPluginUtility.h(361): error C2086: 'int Gatan::PlugIn::DMScriptClassT<ClassDesc>::ref_type' : redefinition
1>          c:\program files (x86)\gatan\dmsdk\win32\include\DMPluginUtility.h(355) : see declaration of 'Gatan::PlugIn::DMScriptClassT<ClassDesc>::ref_type'
1>c:\program files (x86)\gatan\dmsdk\win32\include\DMPluginUtility.h(361): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\gatan\dmsdk\win32\include\DMPluginUtility.h(362): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\gatan\dmsdk\win32\include\DMPluginUtility.h(365): warning C4183: 'GetImplementationOrNull': missing return type; assumed to be a member function returning 'int'
1>c:\program files (x86)\gatan\dmsdk\win32\include\DMPluginUtility.h(366): error C2146: syntax error : missing ';' before identifier 'GetImplementationIfThere'
1>c:\program files (x86)\gatan\dmsdk\win32\include\DMPluginUtility.h(366): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\gatan\dmsdk\win32\include\DMPluginUtility.h(366): error C2086: 'int Gatan::PlugIn::DMScriptClassT<ClassDesc>::ref_type' : redefinition
1>          c:\program files (x86)\gatan\dmsdk\win32\include\DMPluginUtility.h(355) : see declaration of 'Gatan::PlugIn::DMScriptClassT<ClassDesc>::ref_type'
1>c:\program files (x86)\gatan\dmsdk\win32\include\DMPluginUtility.h(366): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\gatan\dmsdk\win32\include\DMPluginUtility.h(367): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\gatan\dmsdk\win32\include\DMPluginUtility.h(375): warning C4183: 'GetImplementationIfThere': missing return type; assumed to be a member function returning 'int'
1>c:\program files (x86)\gatan\dmsdk\win32\include\DMPluginUtility.h(378): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\gatan\dmsdk\win32\include\DMPluginUtility.h(378): error C2143: syntax error : missing ',' before '&'
1>c:\program files (x86)\gatan\dmsdk\win32\include\DMPluginUtility.h(379): error C2146: syntax error : missing ';' before identifier 'ReplaceImplementation'
1>c:\program files (x86)\gatan\dmsdk\win32\include\DMPluginUtility.h(379): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\gatan\dmsdk\win32\include\DMPluginUtility.h(379): error C2086: 'int Gatan::PlugIn::DMScriptClassT<ClassDesc>::ref_type' : redefinition
1>          c:\program files (x86)\gatan\dmsdk\win32\include\DMPluginUtility.h(355) : see declaration of 'Gatan::PlugIn::DMScriptClassT<ClassDesc>::ref_type'
1>c:\program files (x86)\gatan\dmsdk\win32\include\DMPluginUtility.h(379): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\gatan\dmsdk\win32\include\DMPluginUtility.h(379): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\gatan\dmsdk\win32\include\DMPluginUtility.h(379): error C2143: syntax error : missing ',' before '&'
1>c:\program files (x86)\gatan\dmsdk\win32\include\DMPluginUtility.h(379): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\gatan\dmsdk\win32\include\DMPluginUtility.h(379): warning C4183: 'ReplaceImplementation': missing return type; assumed to be a member function returning 'int'
1>c:\program files (x86)\gatan\dmsdk\win32\include\DMPluginUtility.h(470): warning C4346: 'Gatan::PlugIn::DMScriptClassT<ClassDesc>::ref_type' : dependent name is not a type
1>          prefix with 'typename' to indicate a type
1>c:\program files (x86)\gatan\dmsdk\win32\include\DMPluginUtility.h(470): error C2143: syntax error : missing ';' before 'Gatan::PlugIn::DMScriptClassT<ClassDesc>::ReplaceImplementation'
1>c:\program files (x86)\gatan\dmsdk\win32\include\DMPluginUtility.h(470): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\gatan\dmsdk\win32\include\DMPluginUtility.h(470): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\gatan\dmsdk\win32\include\DMPluginUtility.h(470): warning C4346: 'Gatan::PlugIn::DMScriptClassT<ClassDesc>::ReplaceImplementation' : dependent name is not a type
1>          prefix with 'typename' to indicate a type
1>c:\program files (x86)\gatan\dmsdk\win32\include\DMPluginUtility.h(470): error C2143: syntax error : missing ',' before '&'
1>c:\program files (x86)\gatan\dmsdk\win32\include\DMPluginUtility.h(503): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\gatan\dmsdk\win32\include\DMPluginUtility.h(503): error C2143: syntax error : missing ',' before '&'
Sep 29, 2011 at 10:29am

If i define the ReplaceImplementation inside the template <class ClassDesc> class DMScriptClassT,
like this:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
template <class ClassDesc> class DMScriptClassT
		{
		public:
			typedef typename ClassDesc::base_imp_type    imp_type;
			typedef typename ClassDesc::base_ref_type    ref_type;
		    
		public:
			static DM::String class_name()      { return ClassDesc::class_name(); }
			static DM::String base_class_name() { return ClassDesc::base_class_name(); }

			static uint32 GetClassToken( const DM::ScriptObject &so );
			static bool   GetClassToken( const DM::ScriptObject &so, uint32 &token );

			static ref_type                GetImplementation( const DM::ScriptObject &so )
			{
				ref_type imp = reinterpret_cast<imp_type *>( GetClassToken( so ) );
				ThrowStringUnless( imp != NULL, rerrDispatchOffNullObject );
				return imp;
			}
			static ref_type                GetImplementationOrNull( const DM::ScriptObject &so )
			{
				ref_type imp = reinterpret_cast<imp_type *>( GetClassToken( so ) );
				return imp;
			}
			static ref_type                GetImplementationIfThere( const DM::ScriptObject &so )
			{
				ref_type imp;
				uint32 token;
				if ( GetClassToken( so, token ) )
				{
					imp = reinterpret_cast<imp_type *>( token );
				}
				return imp;
			}

			static DM::ScriptObject   NewScriptObject();
			static DM::ScriptObject   NewScriptObject( const ref_type &act_obj );
			//static  ref_type           ReplaceImplementation( const DM::ScriptObject &so, const ref_type &new_imp );
			static void AddMethod( const char *signature, void *function, ulong linkage )
			{
				DM::ClassAddMethod( class_name(), DM::NewCallbackFunction( signature, function, linkage) );
			}

			static uint32 alloc( DM_Env *dm_env, uint32 );
			static void dealloc( DM_Env *dm_env, uint32 token, uint32 );

			static void RegisterClass();
			static void UnregisterClass();

		static  ref_type ReplaceImplementation( const DM::ScriptObject &script_obj, const ref_type &new_imp )
		{
			ref_type old_imp;
			if ( script_obj.IsValid() )
			{
				uint32 old_imp_token = 0;
				if ( !DM::ScriptObjectReplaceClassTokenByIndex( script_obj, ClassDesc::class_index, ClassDesc::class_id
						                                      , reinterpret_cast<uint32>( new_imp.get() ), false, &old_imp_token ) )
				{
					// If cached index and id do not work, look them up again
					uint32             new_class_index;
					DMScript_ClassId   new_class_id;
					DM::ScriptObjectGetClassIndex( script_obj, class_name(), true, &new_class_index, &new_class_id );
					// Only replace cached index and id if the class descriptor described by 'new_class_index'
					// and 'new_class_id' is registered;
					DM::ScriptObjectReplaceClassTokenByIndex( script_obj, new_class_index, new_class_id
						                                    , reinterpret_cast<uint32>( new_imp.get() ), true, &old_imp_token );

					ClassDesc::class_index = new_class_index;
					ClassDesc::class_id    = new_class_id;
				}
				old_imp = reinterpret_cast<imp_type *>( old_imp_token );
				new_imp.addRef();
				old_imp.remRef();
			}
			return  old_imp;
		}

		};


Then it does not complain about the typenames no more.
Sep 29, 2011 at 10:31am
But then it complains:

1>------ Build started: Project: ITK, Configuration: Debug Win32 ------
1>  DiscreteGaussianFilter.cpp
1>  dmtoitk1.cpp
1>  Generating Code...
1>     Creating library C:/Program Files (x86)/Gatan/DigitalMicrograph/cmake/build20120/Debug/ITK.lib and object C:/Program Files (x86)/Gatan/DigitalMicrograph/cmake/build20120/Debug/ITK.exp
1>DMPlugInBasic_dll-Dbg.lib(PlugInUtility.obj) : warning LNK4217: locally defined symbol ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ (public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)) imported in function "public: virtual int __thiscall Gatan::PlugIn::ResultsStreamBuff::xsputn(char const *,int)" (?xsputn@ResultsStreamBuff@PlugIn@Gatan@@UAEHPBDH@Z)
1>DMPlugInBasic_dll-Dbg.lib(PlugInUtility.obj) : warning LNK4217: locally defined symbol ?copy@?$char_traits@D@std@@SAPADPADPBDI@Z (public: static char * __cdecl std::char_traits<char>::copy(char *,char const *,unsigned int)) imported in function "public: virtual int __thiscall Gatan::PlugIn::ResultsStreamBuff::xsputn(char const *,int)" (?xsputn@ResultsStreamBuff@PlugIn@Gatan@@UAEHPBDH@Z)
1>DMPlugInBasic_dll-Dbg.lib(PlugInUtility.obj) : warning LNK4217: locally defined symbol ?not_eof@?$char_traits@D@std@@SAHABH@Z (public: static int __cdecl std::char_traits<char>::not_eof(int const &)) imported in function "public: virtual int __thiscall Gatan::PlugIn::ResultsStreamBuff::overflow(int)" (?overflow@ResultsStreamBuff@PlugIn@Gatan@@UAEHH@Z)
1>DMPlugInBasic_dll-Dbg.lib(PlugInUtility.obj) : warning LNK4217: locally defined symbol ?eof@?$char_traits@D@std@@SAHXZ (public: static int __cdecl std::char_traits<char>::eof(void)) imported in function "public: virtual int __thiscall Gatan::PlugIn::ResultsStreamBuff::overflow(int)" (?overflow@ResultsStreamBuff@PlugIn@Gatan@@UAEHH@Z)
1>ITKMain.obj : error LNK2019: unresolved external symbol "void __cdecl Gatan::PlugIn::DMScript_HandleException(struct Gatan::PlugIn::DM_Env *,class std::exception const &)" (?DMScript_HandleException@PlugIn@Gatan@@YAXPAUDM_Env@12@ABVexception@std@@@Z) referenced in function __catch$?PlugIn_Start@@YAXXZ$0
1>DMPlugInBasic_dll-Dbg.lib(PlugInUtility.obj) : error LNK2001: unresolved external symbol "protected: virtual class std::basic_streambuf<char,struct std::char_traits<char> > * __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::setbuf(char *,int)" (?setbuf@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEPAV12@PADH@Z)
1>DMPlugInBasic_dll-Dbg.lib(PlugInUtility.obj) : error LNK2001: unresolved external symbol "protected: virtual class std::fpos<int> __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::seekoff(long,enum std::ios_base::seekdir,int)" (?seekoff@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAE?AV?$fpos@H@2@JW4seekdir@ios_base@2@H@Z)
1>DMPlugInBasic_dll-Dbg.lib(PlugInUtility.obj) : error LNK2001: unresolved external symbol "protected: virtual int __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::xsgetn(char *,int)" (?xsgetn@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHPADH@Z)
1>DMPlugInBasic_dll-Dbg.lib(PlugInUtility.obj) : error LNK2001: unresolved external symbol "protected: virtual int __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::showmanyc(void)" (?showmanyc@?$basic_streambuf@DU?$char_traits@D@std@@@std@@MAEHXZ)
1>DMPlugInBasic_dll-Dbg.lib(PlugInUtility.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(char const *,unsigned int,class std::allocator<char> const &)" (__imp_??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBDIABV?$allocator@D@1@@Z) referenced in function "public: virtual int __thiscall Gatan::PlugIn::ResultsStreamBuff::xsputn(char const *,int)" (?xsputn@ResultsStreamBuff@PlugIn@Gatan@@UAEHPBDH@Z)
1>DMPlugInBasic_dll-Dbg.lib(PlugInUtility.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::basic_ostream<char,struct std::char_traits<char> >::basic_ostream<char,struct std::char_traits<char> >(class std::basic_streambuf<char,struct std::char_traits<char> > *,bool,bool)" (__imp_??0?$basic_ostream@DU?$char_traits@D@std@@@std@@QAE@PAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N1@Z) referenced in function _$E145
1>DMPlugInBasic_dll-Dbg.lib(ImageUtility.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl std::operator<<(class std::basic_ostream<char,struct std::char_traits<char> > &,char const *)" (__imp_??6std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBD@Z) referenced in function "void __cdecl Gatan::test_gtn_idiv_sint32(long,long,long,long,long,long,unsigned long,class std::basic_ostream<char,struct std::char_traits<char> > &)" (?test_gtn_idiv_sint32@Gatan@@YAXJJJJJJKAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@@Z)
1>C:\Program Files (x86)\Gatan\DigitalMicrograph\cmake\build20120\Debug\ITK.dll : fatal error LNK1120: 8 unresolved externals
2>------ Skipped Build: Project: ALL_BUILD, Configuration: Debug Win32 ------
2>Project not selected to build for this solution configuration 
========== Build: 0 succeeded, 1 failed, 1 up-to-date, 1 skipped ==========


Does this mean i can not use this DMPlugInBasic_dll-Dbg.lib?
Is it compiled in vc6 enviroment and it is not combatible??
Or what's going on?
Oct 4, 2011 at 12:55am
DMSDK382 can be used together with msvc71.
Later version seems compiled msvc80 and msvc90, but gatan did not release the correspoding sdk.
Oct 4, 2011 at 1:13am
Please try the SDK shipped together with GMS v2.0.2.
It's for msvc90 (Microsoft Visual Studio 2008), should work well with 2010.
Topic archived. No new replies allowed.