Re: [mpir-devel] Re: Can't Compile dll_mpir_gc in VS15
On Tuesday, 6 March 2018 10:06:41 UTC, sisyphus wrote: > > > > -Original Message- > From: Brian Gladman > Sent: Tuesday, March 06, 2018 8:39 PM > To: mpir-...@googlegroups.com > Subject: Re: [mpir-devel] Re: Can't Compile dll_mpir_gc in VS15 > > > On 06/03/2018 09:20, sisy...@optusnet.com.au wrote: > >> For a simple demo of the sort of thing I'm thinking of, consider the > >> following C program: > >> > >> /**/ > >> #include > >> > >> int main (void) { > >> > >> int a = 3; > >> printf("%d\n", a); > >> > >> int b = 6; > >> printf("%d\n", b); > >> > >> return 0; > >> } > >> > >> /***/ > >> > >> That builds fine for me on Windows with gcc, but using cl I get: > >> > >> try.c(8) : error C2143: syntax error : missing ';' before 'type' > >> try.c(9) : error C2065: 'b' : undeclared identifier > > > > I'll check this out. Have you tracked down why cl fails when this > > happens? > > I believe it's a compliancy issue - ie that myode is valid only under C99 > (or C11 ? .. or something like that). > The script I posted can be made suitable for 'cl' by moving the > declaration > of b to the "declaration" section of the program. Another solution is to > apply some scoping: > > /*/ > #include > > int main (void) { > > int a = 3; > printf("%d\n", a); > > { > int b = 6; > printf("%d\n", b); > } > > return 0; > } > > /*/ > > Cheers, > Rob > > Thanks Rob, it turned out to be no more than a bad edit on my part :-( > > -- You received this message because you are subscribed to the Google Groups "mpir-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to mpir-devel+unsubscr...@googlegroups.com. To post to this group, send email to mpir-devel@googlegroups.com. Visit this group at https://groups.google.com/group/mpir-devel. For more options, visit https://groups.google.com/d/optout.
Re: [mpir-devel] Re: Can't Compile dll_mpir_gc in VS15
-Original Message- From: Brian Gladman Sent: Tuesday, March 06, 2018 8:39 PM To: mpir-devel@googlegroups.com Subject: Re: [mpir-devel] Re: Can't Compile dll_mpir_gc in VS15 On 06/03/2018 09:20, sisyph...@optusnet.com.au wrote: For a simple demo of the sort of thing I'm thinking of, consider the following C program: /**/ #include int main (void) { int a = 3; printf("%d\n", a); int b = 6; printf("%d\n", b); return 0; } /***/ That builds fine for me on Windows with gcc, but using cl I get: try.c(8) : error C2143: syntax error : missing ';' before 'type' try.c(9) : error C2065: 'b' : undeclared identifier I'll check this out. Have you tracked down why cl fails when this happens? I believe it's a compliancy issue - ie that myode is valid only under C99 (or C11 ? .. or something like that). The script I posted can be made suitable for 'cl' by moving the declaration of b to the "declaration" section of the program. Another solution is to apply some scoping: /*/ #include int main (void) { int a = 3; printf("%d\n", a); { int b = 6; printf("%d\n", b); } return 0; } /*/ Cheers, Rob -- You received this message because you are subscribed to the Google Groups "mpir-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to mpir-devel+unsubscr...@googlegroups.com. To post to this group, send email to mpir-devel@googlegroups.com. Visit this group at https://groups.google.com/group/mpir-devel. For more options, visit https://groups.google.com/d/optout.
Re: [mpir-devel] Re: Can't Compile dll_mpir_gc in VS15
On 06/03/2018 09:20, sisyph...@optusnet.com.au wrote: > > -Original Message- From: Brian Gladman > Sent: Tuesday, March 06, 2018 6:54 PM > To: mpir-devel@googlegroups.com > Subject: Re: [mpir-devel] Re: Can't Compile dll_mpir_gc in VS15 > >> Hi, >> >> The log shows the following errors: >> >> mpz\pprime_p.c(119): error C2143: syntax error: missing ')' before ':' >> mpz\pprime_p.c(119): error C2059: syntax error: ')' >> mpz\pprime_p.c(119): error C2143: syntax error: missing ')' before ';' > [ and more similar] > > I've seen 'cl' throw errors like this on source files that 'gcc' finds > to be quite acceptable. > However, I don't have an exact match and Brian may well be right in > pointing the finger at corrupted files. > > For a simple demo of the sort of thing I'm thinking of, consider the > following C program: > > /**/ > #include > > int main (void) { > > int a = 3; > printf("%d\n", a); > > int b = 6; > printf("%d\n", b); > > return 0; > } > > /***/ > > That builds fine for me on Windows with gcc, but using cl I get: > > try.c(8) : error C2143: syntax error : missing ';' before 'type' > try.c(9) : error C2065: 'b' : undeclared identifier > > Maybe that's totally unrelated to what's happening here - but if file > corruption is not the explanation, I'd be taking a close look at > mpn_modexact_1_odd() because I think (unproven) that's where the problem > is originating in all cases. > > Cheers, > Rob Hi Rob, I'll check this out. Have you tracked down why cl fails when this happens? Brian -- You received this message because you are subscribed to the Google Groups "mpir-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to mpir-devel+unsubscr...@googlegroups.com. To post to this group, send email to mpir-devel@googlegroups.com. Visit this group at https://groups.google.com/group/mpir-devel. For more options, visit https://groups.google.com/d/optout.
Re: [mpir-devel] Re: Can't Compile dll_mpir_gc in VS15
-Original Message- From: Brian Gladman Sent: Tuesday, March 06, 2018 6:54 PM To: mpir-devel@googlegroups.com Subject: Re: [mpir-devel] Re: Can't Compile dll_mpir_gc in VS15 Hi, The log shows the following errors: mpz\pprime_p.c(119): error C2143: syntax error: missing ')' before ':' mpz\pprime_p.c(119): error C2059: syntax error: ')' mpz\pprime_p.c(119): error C2143: syntax error: missing ')' before ';' [ and more similar] I've seen 'cl' throw errors like this on source files that 'gcc' finds to be quite acceptable. However, I don't have an exact match and Brian may well be right in pointing the finger at corrupted files. For a simple demo of the sort of thing I'm thinking of, consider the following C program: /**/ #include int main (void) { int a = 3; printf("%d\n", a); int b = 6; printf("%d\n", b); return 0; } /***/ That builds fine for me on Windows with gcc, but using cl I get: try.c(8) : error C2143: syntax error : missing ';' before 'type' try.c(9) : error C2065: 'b' : undeclared identifier Maybe that's totally unrelated to what's happening here - but if file corruption is not the explanation, I'd be taking a close look at mpn_modexact_1_odd() because I think (unproven) that's where the problem is originating in all cases. Cheers, Rob -- You received this message because you are subscribed to the Google Groups "mpir-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to mpir-devel+unsubscr...@googlegroups.com. To post to this group, send email to mpir-devel@googlegroups.com. Visit this group at https://groups.google.com/group/mpir-devel. For more options, visit https://groups.google.com/d/optout.
Re: [mpir-devel] Re: Can't Compile dll_mpir_gc in VS15
On 06/03/2018 01:06, Oluseye Akomolede wrote: > Good evening, > > Here is the log output combined with the log folders that Visual Studio > 2015 creates. Hi, The log shows the following errors: mpz\pprime_p.c(119): error C2143: syntax error: missing ')' before ':' mpz\pprime_p.c(119): error C2059: syntax error: ')' mpz\pprime_p.c(119): error C2143: syntax error: missing ')' before ';' mpz\kronzu.c(78): error C2143: syntax error: missing ')' before ';' mpz\kronzs.c(82): error C2143: syntax error: missing ')' before ';' mpz\kronuz.c(118): error C2143: syntax error: missing ')' before ';' mpz\kronsz.c(126): error C2143: syntax error: missing ')' before ';' mpz\jacobi.c(158): error C2143: syntax error: missing ')' before ';' mpz\divis_ui.c(71): error C2143: syntax error: missing ')' before ';' which indicates that these files (and maybe others as well) have become corrupted in some way. You need to find out why this has happened since it could be a problem with the original download or a problem on your computer such as, for example, disc errors. I would suggest that you start again using a new download of MPIR. If this fails again in the same way you need to discover how the MPIR files are becoming corrupted. with my regards, Brian Gladman -- You received this message because you are subscribed to the Google Groups "mpir-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to mpir-devel+unsubscr...@googlegroups.com. To post to this group, send email to mpir-devel@googlegroups.com. Visit this group at https://groups.google.com/group/mpir-devel. For more options, visit https://groups.google.com/d/optout.