windows r inside rcpp eclipse - eclipse

I'm trying to use Rinside in an IDE, Eclipse. Follow step by step manual
http://blog.fellstat.com/?p=170
However, when you Build All I mark the following errors
C:/R/R-2.15.2/library/Rcpp/include/Rcpp/string.h:55:17: error: 'internal' does not name a type
C:/R/R-2.15.2/library/Rcpp/include/Rcpp/string.h:68:21: error: expected ')' before 'charsxp'
C:/R/R-2.15.2/library/Rcpp/include/Rcpp/string.h:73:23: error: 'StringProxy' does not name a type
C:/R/R-2.15.2/library/Rcpp/include/Rcpp/string.h:73:36: error: ISO C++ forbids declaration of 'proxy' with no type [-fpermissive]
C:/R/R-2.15.2/library/Rcpp/include/Rcpp/string.h:92:23: error: expected ')' before 'x'
C:/R/R-2.15.2/library/Rcpp/include/Rcpp/string.h:97:35: error: declaration of 'operator=' as non-function
C:/R/R-2.15.2/library/Rcpp/include/Rcpp/string.h:97:32: error: expected ';' at end of member declaration
C:/R/R-2.15.2/library/Rcpp/include/Rcpp/string.h:97:41: error: expected ')' before 'x'
C:/R/R-2.15.2/library/Rcpp/include/Rcpp/string.h:100:35: error: declaration of 'operator=' as non-function
C:/R/R-2.15.2/library/Rcpp/include/Rcpp/string.h:100:32: error: expected ';' at end of member declaration
C:/R/R-2.15.2/library/Rcpp/include/Rcpp/string.h:100:40: error: expected ')' before 'x'
C:/R/R-2.15.2/library/Rcpp/include/Rcpp/string.h:103:41: error: 'StringProxy' does not name a type
C:/R/R-2.15.2/library/Rcpp/include/Rcpp/string.h:103:54: error: ISO C++ forbids declaration of 'proxy' with no type [-fpermissive]
C:/R/R-2.15.2/library/Rcpp/include/Rcpp/string.h:125:42: error: 'StringProxy' does not name a type
C:/R/R-2.15.2/library/Rcpp/include/Rcpp/string.h:125:55: error: ISO C++ forbids declaration of 'proxy' with no type [-fpermissive]
C:/R/R-2.15.2/library/Rcpp/include/Rcpp/string.h:133:36: error: declaration of 'operator+=' as non-function
C:/R/R-2.15.2/library/Rcpp/include/Rcpp/string.h:133:32: error: expected ';' at end of member declaration
C:/R/R-2.15.2/library/Rcpp/include/Rcpp/string.h:133:41: error: expected ')' before 'x'
In file included from c:\r\rtools\gcc-4.6.3\bin\../lib/gcc/i686-w64-mingw32/4.6.3/../../../../include/c++/4.6.3/cwchar:46:0,
from c:\r\rtools\gcc-4.6.3\bin\../lib/gcc/i686-w64-mingw32/4.6.3/../../../../include/c++/4.6.3/bits/postypes.h:42,
from c:\r\rtools\gcc-4.6.3\bin\../lib/gcc/i686-w64-mingw32/4.6.3/../../../../include/c++/4.6.3/iosfwd:42,
from c:\r\rtools\gcc-4.6.3\bin\../lib/gcc/i686-w64-mingw32/4.6.3/../../../../include/c++/4.6.3/ios:39,
from c:\r\rtools\gcc-4.6.3\bin\../lib/gcc/i686-w64-mingw32/4.6.3/../../../../include/c++/4.6.3/ostream:40,
from c:\r\rtools\gcc-4.6.3\bin\../lib/gcc/i686-w64- mingw32/4.6.3/../../../../include/c++/4.6.3/iterator:64,
from C:/R/R-2.15.2/library/Rcpp/include/RcppCommon.h:57,
from C:/R/R-2.15.2/library/Rcpp/include/Rcpp.h:27,
from ../src/main.cpp:12:
c:\r\rtools\gcc-4.6.3\bin\../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686-w64- mingw32/include/wchar.h:12:32: error: expected '}' before end of line
In file included from C:/R/R-2.15.2/include/R_ext/RS.h:26:0,
from C:/R/R-2.15.2/include/R.h:44,
from C:/R/R-2.15.2/library/Rcpp/include/RcppCommon.h:32,
from C:/R/R-2.15.2/library/Rcpp/include/Rcpp.h:27,
from ../src/main.cpp:12:
And the error list continues
Somebody help me, really I did everything and nothing helps.
thanks

Related

I'm having this Error when I'm debugging and building my Flutter Project on VSCode

Launching lib\main.dart on sdk gphone x86 arm in debug mode...
lib\main.dart:1
../flutter/.pub-cache/hosted/pub.dartlang.org/http-0.13.1/lib/src/io_client.dart:30:72: Error: Expected ';' after this.
var ioRequest = await _inner!.openUrl(request.method, request.url))
^
../flutter/.pub-cache/hosted/pub.dartlang.org/http-0.13.1/lib/src/io_client.dart:30:73: Error: Expected an identifier, but got ')'.
Try inserting an identifier before ')'.
var ioRequest = await _inner!.openUrl(request.method, request.url))
^
../flutter/.pub-cache/hosted/pub.dartlang.org/http-0.13.1/lib/src/io_client.dart:30:73: Error: Expected ';' after this.
var ioRequest = await _inner!.openUrl(request.method, request.url))
^
../flutter/.pub-cache/hosted/pub.dartlang.org/http-0.13.1/lib/src/io_client.dart:30:73: Error: Unexpected token ')'.
var ioRequest = await _inner!.openUrl(request.method, request.url))
^
../flutter/.pub-cache/hosted/pub.dartlang.org/http-0.13.1/lib/src/io_client.dart:32:9: Error: Expected an identifier, but got '..'.
Try inserting an identifier before '..'.
..followRedirects = request.followRedirects
^^

Magento 2.1.7: Unable to process binding "attr: function (){return {id:'billing-address-same-as-shipping-'+ getCode($parent)} }"

I get an error on my checkout payment page:
knockout.js:3012 Uncaught ReferenceError: Unable to process binding "attr: function (){return {id:'billing-address-same-as-shipping-'+ getCode($parent)} }"
Message: getCode is not defined
at attr (eval at createBindingsStringEvaluator (knockout.js:2624), <anonymous>:3:158)
at update (knockout.js:3659)
at ko.dependentObservable.disposeWhenNodeIsRemoved (knockout.js:3004)
at evaluateImmediate (knockout.js:1737)
at Object.ko.computed.ko.dependentObservable (knockout.js:1946)
at knockout.js:3002
at Object.arrayForEach (knockout.js:151)
at applyBindingsToNodeInternal (knockout.js:2974)
at applyBindingsToNodeAndDescendantsInternal (knockout.js:2854)
at applyBindingsToDescendantsInternal (knockout.js:2836)
Does somebody knows how to get this fixed?

error while compiling with matlab mex

I am try to compile using matlab mex, but i keep receiving this error:
Warning: You are using gcc version "5.4.0-6ubuntu1~16.04.1)". The version
currently supported with MEX is "4.2.3".
For a list of currently supported compilers see:
http://www.mathworks.com/support/compilers/current_release/
In file included from descriptor.h:4:0,
from calc_shot.cpp:11:
mesh.h: In function ‘double magnitude(const vec3d<T>&)’:
mesh.h:106:9: error: ‘sqrt’ is not a member of ‘std’
return std::sqrt((v1.x*v1.x) + (v1.y*v1.y) + (v1.z*v1.z));
^
In file included from calc_shot.cpp:11:0:
descriptor.h: At global scope:
descriptor.h:7:57: error: expected class-name before ‘{’ token
class invalid_mesh_descriptor : public std::logic_error {
^
descriptor.h: In constructor ‘invalid_mesh_descriptor::invalid_mesh_descriptor()’:
descriptor.h:9:57: error: expected class-name before ‘(’ token
explicit invalid_mesh_descriptor() : std::logic_error("Exception invalid_mesh_descriptor caught.") {}
^
descriptor.h:9:57: error: expected ‘{’ before ‘(’ token
descriptor.h: In constructor ‘invalid_mesh_descriptor::invalid_mesh_descriptor(const string&)’:
descriptor.h:10:70: error: expected class-name before ‘(’ token
invalid_mesh_descriptor(const std::string& msg) : std::logic_error("Exception invalid_mesh_descriptor caught: "+msg) {}
^
descriptor.h:10:70: error: expected ‘{’ before ‘(’ token
descriptor.h: In function ‘std::ostream& operator<<(std::ostream&, const vec_descriptor<T>&)’:
descriptor.h:123:45: error: no match for ‘operator<<’ (operand types are ‘std::ostream {aka std::basic_ostream<char>}’ and ‘const char [2]’)
for (size_t k=1; k < d.size(); ++k) s << " " << d(k);
^
In file included from /usr/include/c++/5/string:52:0,
from descriptor.h:5,
from calc_shot.cpp:11:
/usr/include/c++/5/bits/basic_string.h:5172:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&)
operator<<(basic_ostream<_CharT, _Traits>& __os,
^
/usr/include/c++/5/bits/basic_string.h:5172:5: note: template argument deduction/substitution failed:
In file included from calc_shot.cpp:11:0:
descriptor.h:123:48: note: mismatched types ‘const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’ and ‘const char [2]’
for (size_t k=1; k < d.size(); ++k) s << " " << d(k);
^
mex: compile of ' "calc_shot.cpp"' failed.
i used to compile this code with LD_PRELOAD but at the moment i do not remember the argument, how can i solve?
solution:
mex -v calc_shot.cpp shot_descriptor.cpp -DUSE_FLANN -I"C:\Program Files\flann\include" -I/usr/include/eigen3
using this command the programs works like a charm

Cocos2d-x HockeyApp integration

I tried to integrate HockeyApp in my cocos2d-x project, using following link:-
http://support.hockeyapp.net/kb/client-integration-android/hockeyapp-for-android-ndk-early-access
But it gives me following error when I tried to run ndk-build command
jni/../../breakpad/android/google_breakpad/../../src/client/linux/log/log.cc:47:7: error: expected nested-name-specifier before 'AndroidLogBufferWriteFunc'
using AndroidLogBufferWriteFunc = int (*)(int bufID, int prio, const char *tag,
^
jni/../../breakpad/android/google_breakpad/../../src/client/linux/log/log.cc:47:7: error: 'AndroidLogBufferWriteFunc' has not been declared
jni/../../breakpad/android/google_breakpad/../../src/client/linux/log/log.cc:47:33: error: expected ';' before '=' token
using AndroidLogBufferWriteFunc = int (*)(int bufID, int prio, const char *tag,
^
jni/../../breakpad/android/google_breakpad/../../src/client/linux/log/log.cc:47:33: error: expected unqualified-id before '=' token
jni/../../breakpad/android/google_breakpad/../../src/client/linux/log/log.cc:53:1: error: 'AndroidLogBufferWriteFunc' does not name a type
AndroidLogBufferWriteFunc g_android_log_buf_write = nullptr;
^
jni/../../breakpad/android/google_breakpad/../../src/client/linux/log/log.cc: In function 'void logger::initializeCrashLogWriter()':
jni/../../breakpad/android/google_breakpad/../../src/client/linux/log/log.cc:60:3: error: 'g_android_log_buf_write' was not declared in this scope
g_android_log_buf_write = reinterpret_cast<AndroidLogBufferWriteFunc>(
^
jni/../../breakpad/android/google_breakpad/../../src/client/linux/log/log.cc:60:46: error: expected type-specifier before 'AndroidLogBufferWriteFunc'
g_android_log_buf_write = reinterpret_cast<AndroidLogBufferWriteFunc>(
^
jni/../../breakpad/android/google_breakpad/../../src/client/linux/log/log.cc:60:46: error: expected '>' before 'AndroidLogBufferWriteFunc'
jni/../../breakpad/android/google_breakpad/../../src/client/linux/log/log.cc:60:46: error: expected '(' before 'AndroidLogBufferWriteFunc'
jni/../../breakpad/android/google_breakpad/../../src/client/linux/log/log.cc:60:46: error: 'AndroidLogBufferWriteFunc' was not declared in this scope
jni/../../breakpad/android/google_breakpad/../../src/client/linux/log/log.cc:61:54: error: expected ')' before ';' token
dlsym(RTLD_DEFAULT, "__android_log_buf_write"));
^
jni/../../breakpad/android/google_breakpad/../../src/client/linux/log/log.cc: In function 'int logger::writeToCrashLog(const char*)':
jni/../../breakpad/android/google_breakpad/../../src/client/linux/log/log.cc:68:7: error: 'g_android_log_buf_write' was not declared in this scope
if (g_android_log_buf_write) {
^
make: *** [obj/local/armeabi/objs/breakpad_client/src/client/linux/log/log.o] Error 1
GCC 4.6.3 doesn't support C++11 type aliases:
in
Breakpad\src\client\linux\log\log.cc
replace
using AndroidLogBufferWriteFunc = int (*)(int bufID, int prio, const char *tag,const char *text);
with
typedef int (*AndroidLogBufferWriteFunc)(int bufID, int prio, const char *tag,const char *text);

why am i getting these syntax errors when trying to implement system call

still working on this system call!!!
i have added a system call to a kernel, compiled and the OS is running off it.
now i am getting syntax error on the compilation of my test application.
testmycall.h
#include<linux/unistd.h>
#define __NR_mycall 244
_syscall1(long, mycall, int, i)
testmycall.c
#include<stdio.h>
#include "testmycall.h"
int main(int argc, char *argv[])
{
printf("%d\n", mycall(15));
}
here is the error
stef#ubuntu:~$ gcc -o testmycall testmycall.c
In file included from testmycall.c:3:
testmycall.h:7: error: expected ‘)’ before ‘mycall’
stef#ubuntu:~$ gcc -o testmycall testmycall.c
In file included from testmycall.c:3:
testmycall.h:7: error: expected declaration specifiers or ‘...’ before ‘mycall’
testmycall.h:7: error: expected declaration specifiers or ‘...’ before ‘i’
testmycall.c: In function ‘_syscall1’:
testmycall.c:7: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
testmycall.h:7: error: parameter name omitted
testmycall.h:7: error: parameter name omitted
testmycall.c:11: error: expected ‘{’ at end of input
stef#ubuntu
i have added in the syscall instead of _syscall1
now i get this error
stef#ubuntu:~$ gcc -o testmycall testmycall.c
testmycall.c: In function ‘syscall’:
testmycall.c:7: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
testmycall.c:11: error: expected ‘{’
this is the app, any ideas why???
I believe the _syscallN() macros were removed from the kernel headers around 2.6.18 or so.
The (not especially helpful) error messages from gcc are due to _syscall1 not being defined at all - you get the same errors if you write:
any_old_rubbish_here(long, mycall, int, i)
The syscall() function should work. man syscall for details.
The _syscall macros are obsolete and should not be used, instead use syscall, eg.
#define _GNU_SOURCE
#include <unistd.h>
...
printf("%d\n", syscall(__NR_mycall, 15));
Here's my test program:
#define _GNU_SOURCE
#include <stdio.h>
#include <unistd.h>
#define __NR_mycall 244
int main(int argc, char **argv)
{
printf("%d\n", syscall(__NR_mycall,15));
return 0;
}