Giter VIP home page Giter VIP logo

Comments (3)

DannyArends avatar DannyArends commented on September 2, 2024

Hey Karl,

Seems like some header is not imported in the mqm code, which is imported in the normal R/qtl C code base, since in:

hmm_main.c at line 1014 the function error() is called without any issues of not being defined
discan.c at line at line 249 the function warning() is called without any issues of not being defined

My guess is that it's due to those files being C files, while the mqm files are C++

As far as I can see, the fix would be to:
#include <R_ext/Error.h>

which exports the error() and warning() macros. This is kind of strange, since importing R.h should lead to the R_ext/Error.h being imported (and the MQM code does import R.h)

from qtl.

kbroman avatar kbroman commented on September 2, 2024

It's maybe related to the following from the R-exts manual:

Most of these header files, including all those included by R.h, can be used from C++ code.

Note: Because R re-maps many of its external names to avoid clashes with system or user code, it is essential to include the appropriate header files when using these entry points.

This remapping can cause problems, and can be eliminated by defining R_NO_REMAP (before including any R headers) and prepending ‘Rf_’ to all the function names used from Rinternals.h and R_ext/Error.h. These problems can usually be avoided by including other headers (such as system headers and those for external software used by the package) before any R headers.

from qtl.

kbroman avatar kbroman commented on September 2, 2024

To reproduce the problem, it seems like, from the NEWS for R-devel, that we want to set an environment variable _R_CXX_USE_NO_REMAP_ to true. This will compile C++ code with -DR_NO_REMAP.

from qtl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.