Hi devlist,
I've been playing around with a signal external, trying to compile under windows XP with MSVC6 (Oh, how I love unix...) and with various combinations of the #ifdef defines at the top of the .c file I get:
Syntax error : missing ';' before 'type' and undeclared identifiers if the final #endif is after the #else statement,
Unexpected end of file found if there is no final #endif (as you'd expect),
Mismatched #if/#endif pair if the #endif is at the end of the file.
All other configurations (leaving out the #ifdef NT block, also changing _MSC_VER to NT) result in the syntax error error.
Now, I know I'm being lazy, not finding out what the blocks of code do. Could anyone be bothered to explain this to me? If I understood what these are doing then I might be able to troubleshoot more efficiently than hit-and miss. And...is anyone out there still compiling externs with MSVC??? Hans???
Best, Ed
-> -> --> ---> -----> --------> -------------> r3search + praktik EK5perimenz --------------------------------- Yahoo! Model Search - Could you be the next catwalk superstar? Check out the competition now
Hallo!
only a quick look at your code, but:
#ifdef NT #include <windows.h> #include <commctrl.h> #else -> this should be an endif I guess, otherwise the code below won't be compiled:
static t_class *framescore_tilde_class;
typedef struct _framescore_tilde { t_object x_obj; t_float f; t_float fmax, fwin, faccum; t_outlet *fscore; } t_framescore_tilde;
[...]
#endif
LG Georg
#ifdef NT #include #include #else -> this should be an endif I guess, otherwise the code below won't be compiled: If I do this, I get back to Syntax error : missing ';' before 'type' error.
Best, Ed
-> -> --> ---> -----> --------> -------------> r3search + praktik EK5perimenz --------------------------------- To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre.
Hallo!
#ifdef NT #include #include #else -> this should be an endif I guess, otherwise the code below won't be compiled:
If I do this, I get back to Syntax error : missing ';' before 'type' error.
well, then you also have an other mistake ... but if you use here #else your code won't be compiled (see preprocessor output)
LG Georg
On 12/4/05, Ed Kelly morph_2016@yahoo.co.uk wrote:
#ifdef NT #include #include #else -> this should be an endif I guess, otherwise the code below won't be compiled: If I do this, I get back to Syntax error : missing ';' before 'type' error.
Looks like you have three #ifdef but only two #endif.
chris clepper cgc@humboldtblvd.com wrote: Looks like you have three #ifdef but only two #endif. Whoops! That was a mistake in the file I posted, the file I compiled had two #ifdef and two #endif.
When I have the #endif after the #else, replace the #else with an #endif or when I get rid of the second #ifdef/#endif block I get the same error, but I noticed something today I wasn't paying attention to before. I think I read somewhere on the list about _tilde_setup names causing problems for MSVC, but here I get an illegal type 'void' when declaring extern void framescore_tilde_setup
Since this is the first error I get I assume it to be the important one! The other errors are likely to be gibberish...enclosed is the compiler output. Best, Ed
-> -> --> ---> -----> --------> -------------> r3search + praktik EK5perimenz --------------------------------- Yahoo! Messenger NEW - crystal clear PC to PC calling worldwide with voicemail
Compiling... framescore~.c c:\documents and settings\acer\my documents\software\pure data\dev\w32\framescore~\framescore~.c(32) : error C2182: 'framescore_tilde_setup' : illegal use of type 'void' c:\documents and settings\acer\my documents\software\pure data\dev\w32\framescore~\framescore~.c(51) : error C2143: syntax error : missing ';' before 'type' c:\documents and settings\acer\my documents\software\pure data\dev\w32\framescore~\framescore~.c(53) : error C2143: syntax error : missing ';' before 'type' c:\documents and settings\acer\my documents\software\pure data\dev\w32\framescore~\framescore~.c(54) : error C2143: syntax error : missing ';' before 'type' c:\documents and settings\acer\my documents\software\pure data\dev\w32\framescore~\framescore~.c(55) : error C2143: syntax error : missing ';' before 'type' c:\documents and settings\acer\my documents\software\pure data\dev\w32\framescore~\framescore~.c(56) : error C2143: syntax error : missing ';' before 'type' c:\documents and settings\acer\my documents\software\pure data\dev\w32\framescore~\framescore~.c(65) : error C2065: 'blockaccum' : undeclared identifier c:\documents and settings\acer\my documents\software\pure data\dev\w32\framescore~\framescore~.c(67) : error C2065: 'diff' : undeclared identifier c:\documents and settings\acer\my documents\software\pure data\dev\w32\framescore~\framescore~.c(70) : error C2065: 'score' : undeclared identifier c:\documents and settings\acer\my documents\software\pure data\dev\w32\framescore~\framescore~.c(72) : error C2065: 'avg' : undeclared identifier c:\documents and settings\acer\my documents\software\pure data\dev\w32\framescore~\framescore~.c(98) : error C2373: 'framescore_tilde_setup' : redefinition; different type modifiers c:\documents and settings\acer\my documents\software\pure data\dev\w32\framescore~\framescore~.c(32) : see declaration of 'framescore_tilde_setup' Error executing cl.exe.
On Dec 7, 2005, at 8:42 AM, Ed Kelly wrote:
chris clepper cgc@humboldtblvd.com wrote: Whoops! That was a mistake in the file I posted, the file I compiled had two #ifdef and two #endif. When I have the #endif after the #else, replace the #else with an #endif or when I get rid of the second #ifdef/#endif block I get the same error, but I noticed something today I wasn't paying attention to before. I think I read somewhere on the list about _tilde_setup names causing problems for MSVC, but here I get an illegal type 'void' when declaring extern void framescore_tilde_setup Since this is the first error I get I assume it to be the important one! The other errors are likely to be gibberish...enclosed is the compiler output. Best, Ed
You might need to add the __dllexport business. Or use MinGW.
.hc
-> -> --> ---> -----> --------> -------------> r3search + praktik EK5perimenz
Yahoo! Messenger NEW - crystal clear PC to PC calling worldwide with voicemailCompiling... framescore~.c c:\documents and settings\acer\my documents\software\pure data\dev\w32\framescore~\framescore~.c(32) : error C2182: 'framescore_tilde_setup' : illegal use of type 'void' c:\documents and settings\acer\my documents\software\pure data\dev\w32\framescore~\framescore~.c(51) : error C2143: syntax error : missing ';' before 'type' c:\documents and settings\acer\my documents\software\pure data\dev\w32\framescore~\framescore~.c(53) : error C2143: syntax error : missing ';' before 'type' c:\documents and settings\acer\my documents\software\pure data\dev\w32\framescore~\framescore~.c(54) : error C2143: syntax error : missing ';' before 'type' c:\documents and settings\acer\my documents\software\pure data\dev\w32\framescore~\framescore~.c(55) : error C2143: syntax error : missing ';' before 'type' c:\documents and settings\acer\my documents\software\pure data\dev\w32\framescore~\framescore~.c(56) : error C2143: syntax error : missing ';' before 'type' c:\documents and settings\acer\my documents\software\pure data\dev\w32\framescore~\framescore~.c(65) : error C2065: 'blockaccum' : undeclared identifier c:\documents and settings\acer\my documents\software\pure data\dev\w32\framescore~\framescore~.c(67) : error C2065: 'diff' : undeclared identifier c:\documents and settings\acer\my documents\software\pure data\dev\w32\framescore~\framescore~.c(70) : error C2065: 'score' : undeclared identifier c:\documents and settings\acer\my documents\software\pure data\dev\w32\framescore~\framescore~.c(72) : error C2065: 'avg' : undeclared identifier c:\documents and settings\acer\my documents\software\pure data\dev\w32\framescore~\framescore~.c(98) : error C2373: 'framescore_tilde_setup' : redefinition; different type modifiers c:\documents and settings\acer\my documents\software\pure data\dev\w32\framescore~\framescore~.c(32) : see declaration of 'framescore_tilde_setup' Error executing cl.exe. _______________________________________________ PD-dev mailing list PD-dev@iem.at http://lists.puredata.info/listinfo/pd-dev
________________________________________________________________________ ____
"Looking at things from a more basic level, you can come up with a more direct solution... It may sound small in theory, but it in practice, it can change entire economies."
- Amy Smith