[R-pkg-devel] Subject: cerr, cout, rand, and srand

Maxime Turgeon maxime.turgeon at mail.mcgill.ca
Tue May 16 16:36:35 CEST 2017


This is well documented in Writing R extensions:

 - https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Printing for I/O streams

 - https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Registering-native-routines for native routine registrations.


As for the random number generator, you should use the one provided by R: https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Random-numbers


Max

Writing R Extensions<https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Random-numbers>
cran.r-project.org
1 Creating R packages. Packages provide a mechanism for loading optional code, data and documentation as needed. The R distribution itself includes about 30 packages.


Writing R Extensions<https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Registering-native-routines>
cran.r-project.org
1 Creating R packages. Packages provide a mechanism for loading optional code, data and documentation as needed. The R distribution itself includes about 30 packages.


Writing R Extensions<https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Printing>
cran.r-project.org
1 Creating R packages. Packages provide a mechanism for loading optional code, data and documentation as needed. The R distribution itself includes about 30 packages.


________________________________
From: R-package-devel <r-package-devel-bounces at r-project.org> on behalf of Cho, In-Ho [CCE E] <icho at iastate.edu>
Sent: May 16, 2017 9:58:47 AM
To: r-package-devel at r-project.org
Subject: [R-pkg-devel] Subject: cerr, cout, rand, and srand

Hi Everyone,


My Package did not pass the pre-test with following Note.

I am not sure how to fix this problem.

Any advice will be really appreciated.

Many thanks,


In Ho

-----------

* checking compiled code ... NOTE
File 'FHDI/libs/i386/FHDI.dll':
  Found '_ZSt4cerr', possibly from 'std::cerr' (C++)
    Object: 'FHDI.o'
  Found '_ZSt4cout', possibly from 'std::cout' (C++)
    Object: 'FHDI.o'
  Found 'rand', possibly from 'rand' (C)
    Object: 'FHDI.o'
  Found 'srand', possibly from 'srand' (C)
    Object: 'FHDI.o'
File 'FHDI/libs/x64/FHDI.dll':
  Found '_ZSt4cerr', possibly from 'std::cerr' (C++)
    Object: 'FHDI.o'
  Found '_ZSt4cout', possibly from 'std::cout' (C++)
    Object: 'FHDI.o'
  Found 'rand', possibly from 'rand' (C)
    Object: 'FHDI.o'
  Found 'srand', possibly from 'srand' (C)
    Object: 'FHDI.o'
File 'FHDI/libs/i386/FHDI.dll':
  Found no calls to: 'R_registerRoutines', 'R_useDynamicSymbols'
File 'FHDI/libs/x64/FHDI.dll':
  Found no calls to: 'R_registerRoutines', 'R_useDynamicSymbols'

Compiled code should not call entry points which might terminate R nor
write to stdout/stderr instead of to the console, nor the system RNG.
It is good practice to register native routines and to disable symbol
search.


        [[alternative HTML version deleted]]

______________________________________________
R-package-devel at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

	[[alternative HTML version deleted]]



More information about the R-package-devel mailing list