*.o: File format not recognized on Windows 7

前端 未结 1 1817
忘了有多久
忘了有多久 2021-01-22 08:02

I wrote an R package called arbintools for some work-related data analysis and put it on Github. I wrote it and have been using it on my Mac for a while without issue; Today, I

1条回答
  •  北恋
    北恋 (楼主)
    2021-01-22 08:38

    The issue is the .so and .o files are only viable with the same architecture e.g. OS X is 64 bit and Windows is 32bit (mingw_32). Please remove them from dev-1/src and then you should be good to go. These files are automatically built on package install as they are the result of using a compiler.

    After they are removed, try to create a .gitignore file with the following:

    src/*.o
    src/*.so
    src/*.dll
    

    This will make OS specific files not selectable for staging and, in turn, commits.

    As a general rule of thumb, only keep .cpp or .h files within /src while using Rcpp.

    0 讨论(0)
提交回复
热议问题