|
Hello,
I've downloaded an SDK an am able to get the code to compile with VC6 no problem but
when I use Express Edition 2008/2005 I get all sorts of compiler/linker errors. The
problem is I only have access to VC6 in work and would like to have a copy for myself.
Is it still available? or is there a way to get the Express Editions to use the VC6
compiler? Searching for this hasn't turned up anything
Also: Why would something compile with older versions and not newer ones?
Thanks
|
|
|
|
|
Probably it is better to fix the source code. Could you post, please, some of the error messages?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Hi Thanks for the help.
The project is set to compile to .dll. This is done with VC++ 9.0 Express
Here's some errors:
1>LibraryExample.cpp<br />
1>f:\copy of dmm\win32\include\gatantypes.h(403) : error C2906: 'Gatan::ScaleData<gatan::uint8,gatan::uint8>' : explicit specialization requires 'template <>'<br />
1>f:\copy of dmm\win32\include\gatantypes.h(404) : error C2906: 'Gatan::ScaleData<gatan::uint8,gatan::uint16>' : explicit specialization requires 'template <>'<br />
1>f:\copy of dmm\win32\include\gatantypes.h(405) : error C2906: 'Gatan::ScaleData<gatan::uint8,gatan::uint32>' : explicit specialization requires 'template <>'<br />
1>f:\copy of dmm\win32\include\gatantypes.h(407) : error C2906: 'Gatan::ScaleData<gatan::uint16,gatan::uint8>' : explicit specialization requires 'template <>'<br />
1>f:\copy of dmm\win32\include\gatantypes.h(408) : error C2906: 'Gatan::ScaleData<gatan::uint16,gatan::uint16>' : explicit specialization requires 'template <>'<br />
1>f:\copy of dmm\win32\include\gatantypes.h(409) : error C2906: 'Gatan::ScaleData<gatan::uint16,gatan::uint32>' : explicit specialization requires 'template <>'<br />
1>f:\copy of dmm\win32\include\gatantypes.h(411) : error C2906: 'Gatan::ScaleData<gatan::uint32,gatan::uint8>' : explicit specialization requires 'template <>'<br />
1>f:\copy of dmm\win32\include\gatantypes.h(412) : error C2906: 'Gatan::ScaleData<gatan::uint32,gatan::uint16>' : explicit specialization requires 'template <>'<br />
1>f:\copy of dmm\win32\include\gatantypes.h(413) : error C2906: 'Gatan::ScaleData<gatan::uint32,gatan::uint32>' : explicit specialization requires 'template <>'<br />
1>f:\copy of dmm\win32\include\gatantypes.h(415) : error C2906: 'Gatan::ScaleData<gatan::float64,gatan::float64>' : explicit specialization requires 'template <>'<br />
1>f:\copy of dmm\win32\include\gatantypes.h(416) : error C2906: 'Gatan::ScaleData<gatan::float64,gatan::float32>' : explicit specialization requires 'template <>'<br />
1>f:\copy of dmm\win32\include\gatantypes.h(417) : error C2906: 'Gatan::ScaleData<gatan::float32,gatan::float64>' : explicit specialization requires 'template <>'<br />
1>f:\copy of dmm\win32\include\gatantypes.h(419) : error C2906: 'Gatan::ScaleData<gatan::uint8,gatan::float64>' : explicit specialization requires 'template <>'<br />
1>f:\copy of dmm\win32\include\gatantypes.h(420) : error C2906: 'Gatan::ScaleData<gatan::uint16,gatan::float64>' : explicit specialization requires 'template <>'<br />
1>f:\copy of dmm\win32\include\gatantypes.h(421) : error C2906: 'Gatan::ScaleData<gatan::uint32,gatan::float64>' : explicit specialization requires 'template <>'<br />
1>f:\copy of dmm\win32\include\gatantypes.h(423) : error C2906: 'Gatan::ScaleData<gatan::float64,gatan::uint8>' : explicit specialization requires 'template <>'<br />
1>f:\copy of dmm\win32\include\gatantypes.h(424) : error C2906: 'Gatan::ScaleData<gatan::float64,gatan::uint16>' : explicit specialization requires 'template <>'<br />
1>f:\copy of dmm\win32\include\gatantypes.h(425) : error C2906: 'Gatan::ScaleData<gatan::float64,gatan::uint32>' : explicit specialization requires 'template <>'<br />
1>f:\copy of dmm\win32\include\dmpluginlibrarydefs.h(538) : error C2906: 'Gatan::StringProxy_STL_Base<char>' : explicit specialization requires 'template <>'<br />
1>f:\copy of dmm\win32\include\dmpluginlibrarydefs.h(539) : error C2906: 'Gatan::ConstStringProxy_STL_Base<char>' : explicit specialization requires 'template <>'<br />
1>f:\copy of dmm\win32\include\dmpluginlibrarydefs.h(540) : error C2906: 'Gatan::StringProxy_STL_Base<gatan::uint16>' : explicit specialization requires 'template <>'<br />
1>f:\copy of dmm\win32\include\dmpluginlibrarydefs.h(541) : error C2906: 'Gatan::ConstStringProxy_STL_Base<gatan::uint16>' : explicit specialization requires 'template <>'<br />
1>f:\copy of dmm\win32\include\dmpluginlibrarydefs.h(682) : warning C4346: 'To::ret_token_type' : dependent name is not a type<br />
1> prefix with 'typename' to indicate a type<br />
1> f:\copy of dmm\win32\include\dmpluginlibrarydefs.h(687) : see reference to class template instantiation 'Gatan::PlugIn::DM_DynamicCast<from,to>' being compiled<br />
1>f:\copy of dmm\win32\include\dmpluginlibrarydefs.h(682) : error C2143: syntax error : missing ';' before '('<br />
1>f:\copy of dmm\win32\include\dmpluginlibrarydefs.h(682) : warning C4346: 'From::token_type' : dependent name is not a type<br />
1> prefix with 'typename' to indicate a type<br />
1>f:\copy of dmm\win32\include\dmpluginlibrarydefs.h(682) : error C2061: syntax error : identifier 'token_type'<br />
1>f:\copy of dmm\win32\include\dmpluginlibrarydefs.h(683) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int<br />
1>f:\copy of dmm\win32\include\dmpluginutility.h(467) : warning C4346: 'Gatan::PlugIn::DMScriptClassT<classdesc>::ref_type' : dependent name is not a type<br />
1> prefix with 'typename' to indicate a type<br />
1>f:\copy of dmm\win32\include\dmpluginutility.h(467) : error C2143: syntax error : missing ';' before 'Gatan::PlugIn::DMScriptClassT<classdesc>::ReplaceImplementation'<br />
1>f:\copy of dmm\win32\include\dmpluginutility.h(467) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int<br />
1>f:\copy of dmm\win32\include\dmpluginutility.h(467) : error C2888: 'DMScriptClassT<classdesc>::ref_type ref_type' : symbol cannot be defined within namespace 'PlugIn'<br />
1>f:\copy of dmm\win32\include\dmpluginutility.h(467) : fatal error C1903: unable to recover from previous error(s); stopping compilation</classdesc></classdesc></classdesc></from,to></gatan::uint16></gatan::uint16></char></char></gatan::float64,gatan::uint32></gatan::float64,gatan::uint16></gatan::float64,gatan::uint8></gatan::uint32,gatan::float64></gatan::uint16,gatan::float64></gatan::uint8,gatan::float64></gatan::float32,gatan::float64></gatan::float64,gatan::float32></gatan::float64,gatan::float64></gatan::uint32,gatan::uint32></gatan::uint32,gatan::uint16></gatan::uint32,gatan::uint8></gatan::uint16,gatan::uint32></gatan::uint16,gatan::uint16></gatan::uint16,gatan::uint8></gatan::uint8,gatan::uint32></gatan::uint8,gatan::uint16></gatan::uint8,gatan::uint8>
All the errors about using 'template<>' i can solve by editing the header as advised in the error message.
I don't really know how to follow this error:
1>f:\copy of dmm\win32\include\dmpluginlibrarydefs.h(682) : error C2143: syntax error : missing ';' before '('<br />
1>f:\copy of dmm\win32\include\dmpluginlibrarydefs.h(682) : warning C4346: 'From::token_type' : dependent name is not a type<br />
1> prefix with 'typename' to indicate a type<br />
1>f:\copy of dmm\win32\include\dmpluginlibrarydefs.h(682) : error C2061: syntax error : identifier 'token_type'
which realte to this part of the header:
To::ret_token_type operator()( _GATAN_COMPILER_TYPENAME From::token_type tok )<br />
{ return reinterpret_cast<to::ret_token_type>( dm_env->convert_object( reinterpret_cast<dm_objecttoken>(tok), from_desc, to_desc ) ); }</dm_objecttoken></to::ret_token_type>
I did put 'token_type' and 'typename' in somewhere yesterday and solved them but i don't remember how.
Anyway once I got past these errors I ran in to linker errors.
Thanks
|
|
|
|
|
Did you try to prefix token_type with the typename keyword, as suggested?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Hi CPallini,
Yes I have sorted all the previous errors with the suggestions. I wanted to show them in case there was
something i could do with the compile options to get rid of these errors. (I thought I could ask the compiler
to be less strict. Since i got the same thing to compile first time with VC6).
Here's where i'm at now.
Linker errors: (the project was set up so that the linker has the path of the library)
Do you know what the weird combination of symbols mean? such as: (??0bad_cast@std@@QAE@PBD@Z)
1>Linking...<br />
1>LIBCMTD.lib(stdexcpt.obj) : error LNK2005: "public: __thiscall std::bad_cast::bad_cast(char const *)" (??0bad_cast@std@@QAE@PBD@Z) already defined in DMPlugInBasic-Dbg.lib(ImageUtility.obj)<br />
1>LIBCMTD.lib(stdexcpt.obj) : error LNK2005: "public: __thiscall std::bad_cast::bad_cast(class std::bad_cast const &)" (??0bad_cast@std@@QAE@ABV01@@Z) already defined in DMPlugInBasic-Dbg.lib(ImageUtility.obj)<br />
1>LIBCMTD.lib(stdexcpt.obj) : error LNK2005: "public: virtual __thiscall std::bad_cast::~bad_cast(void)" (??1bad_cast@std@@UAE@XZ) already defined in DMPlugInBasic-Dbg.lib(ImageUtility.obj)<br />
1> Creating library .\Debug/LibraryExample.lib and object .\Debug/LibraryExample.exp<br />
1>LibraryExample.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<br />
1>DMPlugInBasic-Dbg.lib(PlugInUtility.obj) : error LNK2001: unresolved external symbol "private: static class std::locale::_Locimp * std::locale::_Locimp::_Global" (?_Global@_Locimp@locale@std@@0PAV123@A)<br />
1>DMPlugInBasic-Dbg.lib(PlugInUtility.obj) : error LNK2019: unresolved external symbol "protected: void __thiscall std::ios_base::_Addstd(void)" (?_Addstd@ios_base@std@@IAEXXZ) referenced in function "protected: void __thiscall std::basic_ios<char,struct std::char_traits<char=""> >::init(class std::basic_streambuf<char,struct std::char_traits<char=""> > *,bool)" (?init@?$basic_ios@DU?$char_traits@D@std@@@std@@IAEXPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@_N@Z)<br />
1>DMPlugInBasic-Dbg.lib(PlugInUtility.obj) : error LNK2001: unresolved external symbol "__int64 const std::_Fpz" (?_Fpz@std@@3_JB)<br />
1>DMPlugInBasic-Dbg.lib(PlugInUtility.obj) : error LNK2019: unresolved external symbol "void __cdecl std::_Xlen(void)" (?_Xlen@std@@YAXXZ) referenced in function "private: bool __thiscall std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >::_Grow(unsigned int,bool)" (?_Grow@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAE_NI_N@Z)<br />
1>DMPlugInBasic-Dbg.lib(ImageUtility.obj) : error LNK2001: unresolved external symbol "void __cdecl std::_Xlen(void)" (?_Xlen@std@@YAXXZ)<br />
1>DMPlugInBasic-Dbg.lib(ImageUtility.obj) : error LNK2019: unresolved external symbol "public: bool __thiscall std::locale::_Iscloc(void)const " (?_Iscloc@locale@std@@QBE_NXZ) referenced in function "class std::num_put<char,class std::ostreambuf_iterator<char,struct="" std::char_traits<char=""> > > const & __cdecl std::use_facet(class std::locale const &,class std::num_put<char,class std::ostreambuf_iterator<char,struct="" std::char_traits<char=""> > > const *,bool)" (?use_facet@std@@YAABV?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@1@ABVlocale@1@PBV21@_N@Z)<br />
1>DMPlugInBasic-Dbg.lib(ImageUtility.obj) : error LNK2019: unresolved external symbol "public: class std::locale::facet const * __thiscall std::locale::_Getfacet(unsigned int,bool)const " (?_Getfacet@locale@std@@QBEPBVfacet@12@I_N@Z) referenced in function "class std::num_put<char,class std::ostreambuf_iterator<char,struct="" std::char_traits<char=""> > > const & __cdecl std::use_facet(class std::locale const &,class std::num_put<char,class std::ostreambuf_iterator<char,struct="" std::char_traits<char=""> > > const *,bool)" (?use_facet@std@@YAABV?$num_put@DV?$ostreambuf_iterator@DU?$char_traits@D@std@@@std@@@1@ABVlocale@1@PBV21@_N@Z)<br />
1>DMPlugInBasic-Dbg.lib(ImageUtility.obj) : error LNK2019: unresolved external symbol "void __cdecl std::_Xran(void)" (?_Xran@std@@YAXXZ) referenced in function "public: class std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> > & __thiscall std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >::assign(class std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> > const &,unsigned int,unsigned int)" (?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ABV12@II@Z)<br />
1>.\Debug/LibraryExample.dll : fatal error LNK1120: 8 unresolved externals</char></char,struct></char></char,struct></char></char,struct></char,class></char,class></char,class></char,class></char></char,struct></char,struct></char,struct>
|
|
|
|
|
Ylno wrote: Do you know what the weird combination of symbols mean? such as: (??0bad_cast@std@@QAE@PBD@Z)
It is C++ name decoration (or mangling) see, for instance [^].
Regarding the linker errors, perhaps this page [^] may help.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Thanks very much for the help. I'll take a look at those links.
Thanks
|
|
|
|
|
Ylno wrote: I've downloaded an SDK...
The Platform SDK or some other one?
Ylno wrote: Is it still available?
Is what still available?
Ylno wrote: or is there a way to get the Express Editions to use the VC6
compiler?
This makes no sense. Why would you want a new compiler/IDE to use an old compiler?
Ylno wrote: Also: Why would something compile with older versions and not newer ones?
Because the new compilers are more strict in adhereing to the C++ standards.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
DavidCrow wrote: The Platform SDK or some other one?
It's another SDK for compiling scripts into .dll to improve execution time.
DavidCrow wrote: Is what still available?
is the VC6 compiler/IDE available.
DavidCrow wrote: This makes no sense. Why would you want a new compiler/IDE to use an old compiler?
Because I got the code to compile with no problems in VC6 and the resulting .dll worked fine. And it seems too much hassle to
get the code to work with a more recent compiler.
|
|
|
|
|
you can still find copies on eBay (i got one from there, a few years back)
Ylno wrote: Why would something compile with older versions and not newer ones?
MS keeps making the compiler more standards-compliant.
it's probably easiest to just fix the code. most of the compiler changes are pretty easy to accommodate.
|
|
|
|
|
|
So what's the problem exactly?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
the code's output is not looking right in notepad, it just print out a long list of numbers..
|
|
|
|
|
1dayprogrammer wrote: it just print out a long list of numbers..
Which means what exactly? A long list like:
1 2 3 4 5 6 ...
or
1
2
3
4
5
6
...
Your code appears to write 215 lines to the file. Is that what you are seeing?
Provide an example of what you are seeing vs. what you are wanting.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
it outputs like:
250 34 34
249 34 35
248 34 36
247 34 37
instead of like:
240 45 0 239 45 0 239 45 1 238 45 1 237 46 1 236 46 1 236 46 2 235 46 2 234 46 2 234 46 2 233 46 3 232 46 3 231 47 3 231 47 3 230 47 4 229 47 4 228 47 4 228 47 4 227 47 5 226 47 5 226 48 5 225 48 6 224 48 6 223 48 6 223 48 6 222 48 7 221 48 7 221 48 7 220 49 7 219 49 8 218 49 8 218 49 8 217 49 8 216 49 9 215 49 9 215 50 9 214 50 9 213 50 10 213 50 10 212 50 10 211 50 11 210 50
|
|
|
|
|
You deleted your post. Not much can be done for that sort of mentality. Good luck with your project.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
deleted the post because i was told in earlier replies that i should not put my whole code as it doesnt show the problem error, and that i should only put the error and the snippet or PRE ...which is what i did.
|
|
|
|
|
1dayprogrammer wrote: i was told in earlier replies that i should not put my whole code as it doesnt show the problem error, and that i should only put the error and the snippet or PRE
Yes, this is very much preferred.
1dayprogrammer wrote: which is what i did.
No, you deletd the whole post instead of just editing it. Notice the [Message Deleted] subject?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
the code's output is not looking right in notepad, it just prints out a long list of numbers..
|
|
|
|
|
In windows new line is "\r\n" not just "\n" (only *nix defaults to only "\n"). While most editors will show you a new line even with just "\n", Notepad is not yet smart enough for that. That's carriage return/line feed - old typewriter way of doing things (come to think of it, what were they thinking? ).
|
|
|
|
|
there are a aubio lib under the unix environment,
now someone try to use the mingw to complied under windows,
then I download the latter, which include the some .exe and dll,
but when I double click the .exe, the Dos window show up and dispear in a while, so I can not see the result,
how should I do to let the exe run , and I can see the result after run.
Do I need to use the VC++ to load the exe and then call the dll, how should I do?
Thanks.
|
|
|
|
|
under widows: click the 'start' button when the menu comes up click 'run'
in the box (Open: ) type 'cmd' then click 'Ok'. This gives you a dos-window.
now find where you have put your .exe file and navigate to it using the dos window.
When you are in the directory where the .exe lives you should be able to type its name
and the program will run and the window won't disappear.
|
|
|
|
|
you will compile the program in VC++ then copy the DLL and LIB file in your exe program where you want to run.
|
|
|
|
|
or you also call the loadlibrary function in the exe application , in loadlibrary function you can directly pass the Dll
may this help
|
|
|
|
|
struct myStruct {
float f;
char ch;
long l;
};
int main(int argc, char* argv[])
{
printf ("%d",sizeof (struct myStruct ));
int* arr=new int[10];
for (int i=0;i<50;i++)
arr[i]=i;
printf("Hello World!\n");
return 0;
}
If you have an idea and I have an idea and if we share to each other then we both have two I ideas.
|
|
|
|
|