0

I am trying to install a library for R in Windows 10; after installing RTools, I tried according to package instructions:

"C:\Program Files\R\R-3.4.4\bin\x64\R.exe" CMD SHLIB \
 McCOIL_categorical_code.c llfunction_het.c

(note that I need to input the full path to R.exe. I guess it's not in the PATH; I am not the PC system administrator.)

The error I get is:

C:\Rtools\mingw_64\bin\nm.exe: McCOIL_categorical_code.o: File format not recognized
C:\Rtools\mingw_64\bin\nm.exe: llfunction_het.o: File format not recognized
c:/Rtools/mingw_64/bin/g++ -shared -s -static-libgcc -o McCOIL_categorical_code.dll tmp.def McCOIL_categorical_code.o llfunction_het.o -LC:/PROGRA~1/R/R-34~1.4/bin/x64 -lR
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe:McCOIL_categorical_code.o: file format not recognized; treating as linker script
C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe:McCOIL_categorical_code.o:7: syntax error
collect2.exe: error: ld returned 1 exit status

How can I fix this?

Following Ralph Stubner's comment:

After deleting .o and .so files, I get quite a long error message:

c:/Rtools/mingw_64/bin/gcc  -I"C:/PROGRA~1/R/R-34~1.4/include" -DNDEBUG          -O2 -Wall  -std=gnu99 -mtune=generic -c McCOIL_categorical_code.c -o McCOIL_categorical_code.o
McCOIL_categorical_code.c:7:1: error: expected identifier or '(' before '<' token
 <!DOCTYPE html>
 ^
McCOIL_categorical_code.c:30:3: error: stray '\302' in program
   <title>THEREALMcCOIL/McCOIL_categorical_code.c at master ┬╖ Greenhouse-Lab/THEREALMcCOIL</title>
   ^
McCOIL_categorical_code.c:30:3: error: stray '\267' in program
McCOIL_categorical_code.c:62:1: error: expected identifier or '(' before '<' token
 <meta class="js-ga-set" name="dimension1" content="Logged In">
 ^
McCOIL_categorical_code.c:142:10: warning: missing terminating ' character
     <!-- '"` --><!-- </textarea></xmp> --></option></form><form class="js-site-search-form" data-scope-type="Repository" data-scope-id="67627026" data-scoped-search-url="/Greenhouse-Lab/THEREALMcCOIL/search" data-unscoped-search-url="/search" action="/Greenhouse-Lab/THEREALMcCOIL/search" accept-charset="UTF-8" method="get"><input name="utf8" type="hidden" value="&#x2713;" />
          ^
McCOIL_categorical_code.c:142:5: error: missing terminating ' character
     <!-- '"` --><!-- </textarea></xmp> --></option></form><form class="js-site-search-form" data-scope-type="Repository" data-scope-id="67627026" data-scoped-search-url="/Greenhouse-Lab/THEREALMcCOIL/search" data-unscoped-search-url="/search" action="/Greenhouse-Lab/THEREALMcCOIL/search" accept-charset="UTF-8" method="get"><input name="utf8" type="hidden" value="&#x2713;" />
     ^
McCOIL_categorical_code.c:179:23: error: stray '\342' in program
                       <span aria-hidden="true" class="d-inline-block ml-1 v-align-middle">↵</span>
                       ^
McCOIL_categorical_code.c:179:23: error: stray '\206' in program
McCOIL_categorical_code.c:179:23: error: stray '\265' in program
McCOIL_categorical_code.c:184:23: error: stray '\342' in program
                       <span class="d-inline-block ml-1 v-align-middle">↵</span>
                       ^
McCOIL_categorical_code.c:184:23: error: stray '\206' in program
McCOIL_categorical_code.c:184:23: error: stray '\265' in program
McCOIL_categorical_code.c:303:18: warning: missing terminating ' character
             <!-- '"` --><!-- </textarea></xmp> --></option></form><form class="logout-form" action="/logout" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="&#x2713;" /><input type="hidden" name="authenticity_token" value="aaMxw44wBLYw7gLOHgCTO1f7FAYeGBn96yH3MODOQFPLs32jf+HcPFIVkoewe9O3AM37VjlyyFF7BbyevDUpog==" />
                  ^
McCOIL_categorical_code.c:303:13: error: missing terminating ' character
             <!-- '"` --><!-- </textarea></xmp> --></option></form><form class="logout-form" action="/logout" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="&#x2713;" /><input type="hidden" name="authenticity_token" value="aaMxw44wBLYw7gLOHgCTO1f7FAYeGBn96yH3MODOQFPLs32jf+HcPFIVkoewe9O3AM37VjlyyFF7BbyevDUpog==" />
             ^
McCOIL_categorical_code.c:316:14: warning: missing terminating ' character
         <!-- '"` --><!-- </textarea></xmp> --></option></form><form class="sr-only right-0" action="/logout" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="&#x2713;" /><input type="hidden" name="authenticity_token" value="E4i87EFD55f3xfzOxy3VCTrB+e88Zz7kO3qKi2fMK9qxmPCMsJI/HZU+bIdpVpWFbfcWvxsN70irXsElOzdCKw==" />
              ^
McCOIL_categorical_code.c:316:9: error: missing terminating ' character
         <!-- '"` --><!-- </textarea></xmp> --></option></form><form class="sr-only right-0" action="/logout" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="&#x2713;" /><input type="hidden" name="authenticity_token" value="E4i87EFD55f3xfzOxy3VCTrB+e88Zz7kO3qKi2fMK9qxmPCMsJI/HZU+bIdpVpWFbfcWvxsN70irXsElOzdCKw==" />
         ^
McCOIL_categorical_code.c:356:14: warning: missing terminating ' character
         <!-- '"` --><!-- </textarea></xmp> --></option></form><form data-autosubmit="true" data-remote="true" class="js-social-container" action="/notifications/subscribe" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="&#x2713;" /><input type="hidden" name="authenticity_token" value="EY3cReXum7Ci4MAJv2wB4vgExywj4+zcvsNFDuNByeu7GUwB6jD6NpvEeopR3QRxPgt4KbnhE4LTQjywRGZC1g==" />      <input type="hidden" name="repository_id" id="repository_id" value="67627026" class="form-control" />
              ^
McCOIL_categorical_code.c:356:9: error: missing terminating ' character
         <!-- '"` --><!-- </textarea></xmp> --></option></form><form data-autosubmit="true" data-remote="true" class="js-social-container" action="/notifications/subscribe" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="&#x2713;" /><input type="hidden" name="authenticity_token" value="EY3cReXum7Ci4MAJv2wB4vgExywj4+zcvsNFDuNByeu7GUwB6jD6NpvEeopR3QRxPgt4KbnhE4LTQjywRGZC1g==" />      <input type="hidden" name="repository_id" id="repository_id" value="67627026" class="form-control" />
         ^
McCOIL_categorical_code.c:391:81: error: stray '@' in program
                     <span class="description">Be notified when participating or @mentioned.</span>
                                                                                 ^
McCOIL_categorical_code.c:436:10: warning: missing terminating ' character
     <!-- '"` --><!-- </textarea></xmp> --></option></form><form class="starred js-social-form" action="/Greenhouse-Lab/THEREALMcCOIL/unstar" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="&#x2713;" /><input type="hidden" name="authenticity_token" value="W2QgNAACbBc0kZy4szBzrtQYw0m+7g0j7WoeLXEl0rkT9X8dwD9PJWGu+pl6flO1n6Xgyda7gI+7yVWfl6EtQg==" />
          ^
McCOIL_categorical_code.c:436:5: error: missing terminating ' character
     <!-- '"` --><!-- </textarea></xmp> --></option></form><form class="starred js-social-form" action="/Greenhouse-Lab/THEREALMcCOIL/unstar" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="&#x2713;" /><input type="hidden" name="authenticity_token" value="W2QgNAACbBc0kZy4szBzrtQYw0m+7g0j7WoeLXEl0rkT9X8dwD9PJWGu+pl6flO1n6Xgyda7gI+7yVWfl6EtQg==" />
     ^
McCOIL_categorical_code.c:451:10: warning: missing terminating ' character
     <!-- '"` --><!-- </textarea></xmp> --></option></form><form class="unstarred js-social-form" action="/Greenhouse-Lab/THEREALMcCOIL/star" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="&#x2713;" /><input type="hidden" name="authenticity_token" value="1WStowi3A76Dms1G5U7yuSJc4ivO6dNe9zSR2USrbEQvryg6dUq+lHOdtj0gwR8nM3jowm8PvFrkgSvsSWFZqg==" />
          ^
McCOIL_categorical_code.c:451:5: error: missing terminating ' character
     <!-- '"` --><!-- </textarea></xmp> --></option></form><form class="unstarred js-social-form" action="/Greenhouse-Lab/THEREALMcCOIL/star" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="&#x2713;" /><input type="hidden" name="authenticity_token" value="1WStowi3A76Dms1G5U7yuSJc4ivO6dNe9zSR2USrbEQvryg6dUq+lHOdtj0gwR8nM3jowm8PvFrkgSvsSWFZqg==" />
     ^
McCOIL_categorical_code.c:470:16: warning: missing terminating ' character
           <!-- '"` --><!-- </textarea></xmp> --></option></form><form class="btn-with-count" action="/Greenhouse-Lab/THEREALMcCOIL/fork" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="&#x2713;" /><input type="hidden" name="authenticity_token" value="VaPmqU3jayHlmxfc904zKBB3TtPO7EQ8Qo73C/I2X+csUTGjN+4sGgpEMBzdRhHqkggmxggm8arDup35lcKx/A==" />
                ^
McCOIL_categorical_code.c:470:11: error: missing terminating ' character
           <!-- '"` --><!-- </textarea></xmp> --></option></form><form class="btn-with-count" action="/Greenhouse-Lab/THEREALMcCOIL/fork" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="&#x2713;" /><input type="hidden" name="authenticity_token" value="VaPmqU3jayHlmxfc904zKBB3TtPO7EQ8Qo73C/I2X+csUTGjN+4sGgpEMBzdRhHqkggmxggm8arDup35lcKx/A==" />
           ^
McCOIL_categorical_code.c:554:48: error: invalid suffix "f504595e0406995fbdcdcef7878e" on floating constant
   <!-- blob contrib key: blob_contributors:v21:14e9f504595e0406995fbdcdcef7878e -->
                                                ^
McCOIL_categorical_code.c:665:5: error: expected identifier or '(' before '<' token
     </div>
     ^
McCOIL_categorical_code.c:691:16: warning: missing terminating ' character
           <!-- '"` --><!-- </textarea></xmp> --></option></form><form class="inline-form js-update-url-with-hash" action="/Greenhouse-Lab/THEREALMcCOIL/edit/master/categorical_method/McCOIL_categorical_code.c" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="&#x2713;" /><input type="hidden" name="authenticity_token" value="YvYAvscQV+X0oiSoP8ifmTu2v48NcZHDzXzH57eMHYvJCb2ItiDPc6k0q/l2K9WENmjbEiIR8E/hS5dKAbLGew==" />
                ^
McCOIL_categorical_code.c:691:11: error: missing terminating ' character
           <!-- '"` --><!-- </textarea></xmp> --></option></form><form class="inline-form js-update-url-with-hash" action="/Greenhouse-Lab/THEREALMcCOIL/edit/master/categorical_method/McCOIL_categorical_code.c" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="&#x2713;" /><input type="hidden" name="authenticity_token" value="YvYAvscQV+X0oiSoP8ifmTu2v48NcZHDzXzH57eMHYvJCb2ItiDPc6k0q/l2K9WENmjbEiIR8E/hS5dKAbLGew==" />
           ^
McCOIL_categorical_code.c:697:14: warning: missing terminating ' character
         <!-- '"` --><!-- </textarea></xmp> --></option></form><form class="inline-form" action="/Greenhouse-Lab/THEREALMcCOIL/delete/master/categorical_method/McCOIL_categorical_code.c" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="&#x2713;" /><input type="hidden" name="authenticity_token" value="1uPvIyXjk5iVwYeDl60EsaCArKa6Nbxdryz2rOluNDxzQckJTKmQtM+d9EsgNpN5aFOU9exeUQlbQHB85BpsHw==" />
              ^
McCOIL_categorical_code.c:697:9: error: missing terminating ' character
         <!-- '"` --><!-- </textarea></xmp> --></option></form><form class="inline-form" action="/Greenhouse-Lab/THEREALMcCOIL/delete/master/categorical_method/McCOIL_categorical_code.c" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="&#x2713;" /><input type="hidden" name="authenticity_token" value="1uPvIyXjk5iVwYeDl60EsaCArKa6Nbxdryz2rOluNDxzQckJTKmQtM+d9EsgNpN5aFOU9exeUQlbQHB85BpsHw==" />
         ^
McCOIL_categorical_code.c:721:69: error: stray '#' in program
         <td id="LC2" class="blob-code blob-code-inner js-file-line">#<span class="pl-k">include</span> <span class="pl-s"><span class="pl-pds">&lt;</span>stdio.h<span class="pl-pds">&gt;</span></span></td>
                                                                     ^
McCOIL_categorical_code.c:721:148: error: expected identifier or '(' before '<' token
         <td id="LC2" class="blob-code blob-code-inner js-file-line">#<span class="pl-k">include</span> <span class="pl-s"><span class="pl-pds">&lt;</span>stdio.h<span class="pl-pds">&gt;</span></span></td>
                                                                                                                                                    ^
McCOIL_categorical_code.c:721:187: error: expected identifier or '(' before '<' token
         <td id="LC2" class="blob-code blob-code-inner js-file-line">#<span class="pl-k">include</span> <span class="pl-s"><span class="pl-pds">&lt;</span>stdio.h<span class="pl-pds">&gt;</span></span></td>
                                                                                                                                                                                           ^
McCOIL_categorical_code.c:725:69: error: stray '#' in program
         <td id="LC3" class="blob-code blob-code-inner js-file-line">#<span class="pl-k">include</span> <span class="pl-s"><span class="pl-pds">&lt;</span>R.h<span class="pl-pds">&gt;</span></span></td>
                                                                     ^
McCOIL_categorical_code.c:725:148: error: expected identifier or '(' before '<' token
         <td id="LC3" class="blob-code blob-code-inner js-file-line">#<span class="pl-k">include</span> <span class="pl-s"><span class="pl-pds">&lt;</span>R.h<span class="pl-pds">&gt;</span></span></td>
                                                                                                                                                    ^
McCOIL_categorical_code.c:725:183: error: expected identifier or '(' before '<' token
         <td id="LC3" class="blob-code blob-code-inner js-file-line">#<span class="pl-k">include</span> <span class="pl-s"><span class="pl-pds">&lt;</span>R.h<span class="pl-pds">&gt;</span></span></td>
                                                                                                                                                                                       ^
McCOIL_categorical_code.c:729:69: error: stray '#' in program
         <td id="LC4" class="blob-code blob-code-inner js-file-line">#<span class="pl-k">include</span> <span class="pl-s"><span class="pl-pds">&lt;</span>Rmath.h<span class="pl-pds">&gt;</span></span></td>
                                                                     ^
McCOIL_categorical_code.c:729:148: error: expected identifier or '(' before '<' token
         <td id="LC4" class="blob-code blob-code-inner js-file-line">#<span class="pl-k">include</span> <span class="pl-s"><span class="pl-pds">&lt;</span>Rmath.h<span class="pl-pds">&gt;</span></span></td>
                                                                                                                                                    ^
McCOIL_categorical_code.c:729:187: error: expected identifier or '(' before '<' token
         <td id="LC4" class="blob-code blob-code-inner js-file-line">#<span class="pl-k">include</span> <span class="pl-s"><span class="pl-pds">&lt;</span>Rmath.h<span class="pl-pds">&gt;</span></span></td>
                                                                                                                                                                                           ^
McCOIL_categorical_code.c:733:69: error: stray '#' in program
         <td id="LC5" class="blob-code blob-code-inner js-file-line">#<span class="pl-k">include</span> <span class="pl-s"><span class="pl-pds">&quot;</span>loglikelihood_het.h<span class="pl-pds">&quot;</span></span></td>
                                                                     ^
McCOIL_categorical_code.c:733:150: error: expected identifier or '(' before '<' token
         <td id="LC5" class="blob-code blob-code-inner js-file-line">#<span class="pl-k">include</span> <span class="pl-s"><span class="pl-pds">&quot;</span>loglikelihood_het.h<span class="pl-pds">&quot;</span></span></td>
                                                                                                                                                      ^
McCOIL_categorical_code.c:733:203: error: expected identifier or '(' before '<' token
         <td id="LC5" class="blob-code blob-code-inner js-file-line">#<span class="pl-k">include</span> <span class="pl-s"><span class="pl-pds">&quot;</span>loglikelihood_het.h<span class="pl-pds">&quot;</span></span></td>
                                                                                                                                                                                                           ^
McCOIL_categorical_code.c:737:69: error: stray '#' in program
         <td id="LC6" class="blob-code blob-code-inner js-file-line">#<span class="pl-k">include</span> <span class="pl-s"><span class="pl-pds">&lt;</span>time.h<span class="pl-pds">&gt;</span></span></td>
                                                                     ^
McCOIL_categorical_code.c:737:148: error: expected identifier or '(' before '<' token
         <td id="LC6" class="blob-code blob-code-inner js-file-line">#<span class="pl-k">include</span> <span class="pl-s"><span class="pl-pds">&lt;</span>time.h<span class="pl-pds">&gt;</span></span></td>
                                                                                                                                                    ^
McCOIL_categorical_code.c:737:186: error: expected identifier or '(' before '<' token
         <td id="LC6" class="blob-code blob-code-inner js-file-line">#<span class="pl-k">include</span> <span class="pl-s"><span class="pl-pds">&lt;</span>time.h<span class="pl-pds">&gt;</span></span></td>
                                                                                                                                                                                          ^
McCOIL_categorical_code.c:1592:9: error: stray '\' in program
         <td id="LC219" class="blob-code blob-code-inner js-file-line">  <span class="pl-k">for</span> (x=<span class="pl-c1">1</span>;x&lt;=n;x++) <span class="pl-c1">fprintf</span>(V0,<span class="pl-s"><span class="pl-pds">&quot;</span><span class="pl-cce">\t</span><span class="pl-c1">%d</span><span class="pl-pds">&quot;</span></span>,  M[x]);</td>
         ^
McCOIL_categorical_code.c:1596:9: error: stray '\' in program
         <td id="LC220" class="blob-code blob-code-inner js-file-line">  <span class="pl-k">for</span> (x=<span class="pl-c1">1</span>;x&lt;=k;x++) <span class="pl-c1">fprintf</span>(V0,<span class="pl-s"><span class="pl-pds">&quot;</span><span class="pl-cce">\t</span><span class="pl-c1">%.6f</span><span class="pl-pds">&quot;</span></span>, P[x]);</td>
         ^
McCOIL_categorical_code.c:1600:9: error: stray '\' in program
         <td id="LC221" class="blob-code blob-code-inner js-file-line">  <span class="pl-k">if</span> (err_method==<span class="pl-c1">3</span>) <span class="pl-c1">fprintf</span>(V0,<span class="pl-s"><span class="pl-pds">&quot;</span><span class="pl-cce">\t</span><span class="pl-c1">%.6f</span><span class="pl-cce">\t</span><span class="pl-c1">%.6f</span><span class="pl-pds">&quot;</span></span>, <span class="pl-c1">e1</span>, <span class="pl-c1">e2</span>);</td>
         ^
McCOIL_categorical_code.c:1600:9: error: stray '\' in program
McCOIL_categorical_code.c:1604:9: error: stray '\' in program
         <td id="LC222" class="blob-code blob-code-inner js-file-line">  <span class="pl-c1">fprintf</span>(V0,<span class="pl-s"><span class="pl-pds">&quot;</span><span class="pl-cce">\n</span><span class="pl-pds">&quot;</span></span>);</td>
         ^
McCOIL_categorical_code.c:1625:9: error: stray '\' in program
         <td id="LC227" class="blob-code blob-code-inner js-file-line"> <span class="pl-k">for</span> (x=<span class="pl-c1">1</span>;x&lt;=n;x++) <span class="pl-c1">fprintf</span>(V0,<span class="pl-s"><span class="pl-pds">&quot;</span><span class="pl-cce">\t</span><span class="pl-c1">%d</span><span class="pl-pds">&quot;</span></span>,  Maccept[x]);</td>
         ^
McCOIL_categorical_code.c:1629:9: error: stray '\' in program
         <td id="LC228" class="blob-code blob-code-inner js-file-line"> <span class="pl-k">for</span> (x=<span class="pl-c1">1</span>;x&lt;=k;x++) <span class="pl-c1">fprintf</span>(V0,<span class="pl-s"><span class="pl-pds">&quot;</span><span class="pl-cce">\t</span><span class="pl-c1">%d</span><span class="pl-pds">&quot;</span></span>, Paccept[x]);</td>
         ^
McCOIL_categorical_code.c:1633:9: error: stray '\' in program
         <td id="LC229" class="blob-code blob-code-inner js-file-line"> <span class="pl-k">if</span> (err_method==<span class="pl-c1">3</span>) <span class="pl-c1">fprintf</span>(V0,<span class="pl-s"><span class="pl-pds">&quot;</span><span class="pl-cce">\t</span><span class="pl-c1">%d</span><span class="pl-cce">\t</span><span class="pl-c1">%d</span><span class="pl-pds">&quot;</span></span>, e1_accept, e2_accept);</td>
         ^
McCOIL_categorical_code.c:1633:9: error: stray '\' in program
McCOIL_categorical_code.c:1637:9: error: stray '\' in program
         <td id="LC230" class="blob-code blob-code-inner js-file-line"> <span class="pl-c1">fprintf</span>(V0,<span class="pl-s"><span class="pl-pds">&quot;</span><span class="pl-cce">\n</span><span class="pl-pds">&quot;</span></span>); </td>
         ^
McCOIL_categorical_code.c:1649:9: error: stray '\' in program
         <td id="LC233" class="blob-code blob-code-inner js-file-line"> <span class="pl-c1">Rprintf</span>(<span class="pl-s"><span class="pl-pds">&quot;</span>Time = <span class="pl-c1">%.2f</span> s<span class="pl-cce">\n</span><span class="pl-pds">&quot;</span></span>, <span class="pl-c1">difftime</span>(t2, t1));</td>
         ^
McCOIL_categorical_code.c:1661:72: error: expected identifier or '(' before '<' token
         <td id="LC236" class="blob-code blob-code-inner js-file-line">}</td>
                                                                        ^
McCOIL_categorical_code.c:1691:12: warning: missing terminating ' character
       <!-- '"` --><!-- </textarea></xmp> --></option></form><form class="js-jump-to-line-form Box-body d-flex" action="" accept-charset="UTF-8" method="get"><input name="utf8" type="hidden" value="&#x2713;" />
            ^
McCOIL_categorical_code.c:1691:7: error: missing terminating ' character
       <!-- '"` --><!-- </textarea></xmp> --></option></form><form class="js-jump-to-line-form Box-body d-flex" action="" accept-charset="UTF-8" method="get"><input name="utf8" type="hidden" value="&#x2713;" />
       ^
McCOIL_categorical_code.c:1711:31: error: expected identifier or '(' before numeric constant
       <li class="mr-3">&copy; 2018 <span title="0.36088s from unicorn-2171277347-xz066">GitHub</span>, Inc.</li>
                               ^
McCOIL_categorical_code.c:1744:5: error: stray '\342' in program
     You canΓÇÖt perform that action at this time.
     ^
McCOIL_categorical_code.c:1744:5: error: stray '\200' in program
McCOIL_categorical_code.c:1744:5: error: stray '\231' in program
make: *** [C:/PROGRA~1/R/R-34~1.4/etc/x64/Makeconf:208: McCOIL_categorical_code.o] Error 1
Warning message:
running command 'make -f "C:/PROGRA~1/R/R-34~1.4/etc/x64/Makeconf" -f "C:/PROGRA~1/R/R-34~1.4/share/make/winshlib.mk" SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)' SHLIB="McCOIL_categorical_code.dll" WIN=64 TCLBIN=64 OBJECTS="McCOIL_categorical_code.o llfunction_het.o"' had status 2
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Max_IT
  • 602
  • 5
  • 15
  • 1
    Is this the full output from the command? Normally the source files should be compiled first. Maybe you are suffering from this: https://stackoverflow.com/questions/37189183/o-file-format-not-recognized-on-windows-7 – Ralf Stubner Aug 10 '18 at 17:04
  • Thank you; I tried to remove those files, but I am not sure how to include the ".gitignore" file in the command line. Instruction says it works for windows and it's a new package (hence I suppose it refers to x64 version)... I tried to contact the author as well, we'll see. – Max_IT Aug 10 '18 at 18:04
  • What is the full output of `R CMD SHLIB ...` after deleting the object files? BTW, if this is a proper R package, than you should call `R CMD INSTALL...` instead. – Ralf Stubner Aug 10 '18 at 19:00
  • Thank you for your time, @Ralph Stubner. I have edited my comment. I am using SHLIB as per author's instructions – Max_IT Aug 10 '18 at 21:30
  • I wonder now if the issue is 32/64 bit, I did not find anything on that regard mentioned in the documentation – Max_IT Aug 10 '18 at 21:33
  • 1
    `McCOIL_categorical_code.c` is not a C program but a HTML file! – Ralf Stubner Aug 10 '18 at 22:35
  • Whoa, well spotted! I am away from the computer I was using right now. I'll get back to it in a couple of days and follow up. Thanks! – Max_IT Aug 14 '18 at 20:04
  • OK, @RalfStubner, thank you for your help. I ended up asking our IT to install it on our Linux computer cluster and I am using it on that. They used the same strategy you suggested though, removing *.so and *.o files. Thanks again for your kind help – Max_IT Aug 22 '18 at 16:06
  • This is a ***very*** common error when copying code from web pages, [PDF](https://en.wikipedia.org/wiki/Portable_Document_Format) documents, through chat (e.g. [Skype Chat](https://en.wikipedia.org/wiki/Features_of_Skype#Skype_chat) or [Facebook Messenger](https://en.wikipedia.org/wiki/Facebook_Messenger)), etc. The canonical question is *[Compilation error: stray ‘\302’ in program, etc.](https://stackoverflow.com/questions/19198332)*. – Peter Mortensen Apr 26 '23 at 23:10
  • In this particular case: 342 206 265 (octal) → 0xE2 0x86 0xB5 (hexadecimal) → UTF-8 sequence for Unicode code point U+FF1A ([DOWNWARDS ARROW WITH CORNER LEFTWARDS](https://www.charset.org/utf-8/9)). It is probably some representation of return/newline. It can be searched for (and replace) with the regular expression `\x{21B5}` in any modern text editor. – Peter Mortensen Apr 26 '23 at 23:10
  • Though there also seems to be other kinds of Unicode characters than DOWNWARDS ARROW WITH CORNER LEFTWARDS, like RIGHT SINGLE QUOTATION MARK (U+2019). – Peter Mortensen Apr 26 '23 at 23:14
  • Correction: DOWNWARDS ARROW WITH CORNER LEFTWARDS is Unicode code point U+21B5. – Peter Mortensen Apr 26 '23 at 23:23
  • Note: The notation is different in Visual Studio Code (and probably others): `\u21B5` – Peter Mortensen Apr 27 '23 at 13:08

0 Answers0