Compiling C++ files using MEX - matlab

I want to use MEX for compiling C\C++ files on MATLAB. I tried mex -setup first then mex xyz.cpp. But I am still getting error
E:\MATLAB~1\BIN\MEX.PL: Error: Compile of 'xyz.cpp' failed.
When typing this command
mex -v mexDiscreteFlow.cpp BPFlow.cpp Stochastic.cpp
I get the following output
This is mex, Copyright 1984-2007 The MathWorks, Inc.
-> Default options filename found in C:\Users\abc\AppData\Roaming\MathWorks\MATLAB\R2008b
----------------------------------------------------------------
-> Options file = C:\Users\abc\AppData\Roaming\MathWorks\MATLAB\R2008b\mexopts.bat
MATLAB = E:\MATLAB~1
-> COMPILER = lcc
-> Compiler flags:
COMPFLAGS = -c -Zp8 -I"E:\MATLAB~1\sys\lcc\include" -DMATLAB_MEX_FILE -noregistrylookup
OPTIMFLAGS = -DNDEBUG
DEBUGFLAGS = -g4
arguments =
Name switch = -Fo
-> Pre-linking commands =
-> LINKER = lcclnk
-> Link directives:
LINKFLAGS = -tmpdir "." -dll "E:\MATLAB~1\extern\lib\win32\lcc\mexFunction.def" -L"E:\MATLAB~1\sys\lcc\lib" -libpath "E:\MATLAB~1\extern\lib\win32\lcc" "C:\USERS\abc\APPDATA\LOCAL\TEMP\MEX_JT~1\templib2.obj"
LINKDEBUGFLAGS =
LINKFLAGSPOST = libmx.lib libmex.lib libmat.lib
Name directive = -o "mexDiscreteFlow.mexw32"
File link directive =
Lib. link directive =
Rsp file indicator = #
-> Resource Compiler = lrc -I"E:\MATLAB~1\sys\lcc\include" -noregistrylookup -fo"mexversion.res"
-> Resource Linker =
----------------------------------------------------------------
--> lcc -c -Zp8 -I"E:\MATLAB~1\sys\lcc\include" -DMATLAB_MEX_FILE -noregistrylookup -FoC:\USERS\abc\APPDATA\LOCAL\TEMP\MEX_JT~1\mexDiscreteFlow.obj -IE:\MATLAB~1\extern\include -IE:\MATLAB~1\simulink\include -DNDEBUG -DMX_COMPAT_32 C:\USERS\abc\DOWNLO~1\RELEASE\RELEASE\MEX\mexDiscreteFlow.cpp
lcc preprocessor error: C:\USERS\abc\DOWNLO~1\RELEASE\RELEASE\MEX\ImageProcessing.h:7 C:\USERS\abc\DOWNLO~1\RELEASE\RELEASE\MEX\Image.h:7 C:\USERS\abc\DOWNLO~1\RELEASE\RELEASE\MEX\mexDiscreteFlow.cpp:3 Could not find include file
Error C:\USERS\abc\DOWNLO~1\RELEASE\RELEASE\MEX\mexDiscreteFlow.cpp: C:\USERS\abc\DOWNLO~1\RELEASE\RELEASE\MEX\project.h: 7 syntax error; found <' expecting;'
Error C:\USERS\abc\DOWNLO~1\RELEASE\RELEASE\MEX\mexDiscreteFlow.cpp: C:\USERS\abc\DOWNLO~1\RELEASE\RELEASE\MEX\project.h: 7 skipping <'
Error C:\USERS\abc\DOWNLO~1\RELEASE\RELEASE\MEX\mexDiscreteFlow.cpp: C:\USERS\abc\DOWNLO~1\RELEASE\RELEASE\MEX\project.h: 7 syntax error; foundT' expecting ;'
Error C:\USERS\abc\DOWNLO~1\RELEASE\RELEASE\MEX\mexDiscreteFlow.cpp: C:\USERS\abc\DOWNLO~1\RELEASE\RELEASE\MEX\project.h: 7 syntax error; found>' expecting ;'
Error C:\USERS\abc\DOWNLO~1\RELEASE\RELEASE\MEX\mexDiscreteFlow.cpp: C:\USERS\abc\DOWNLO~1\RELEASE\RELEASE\MEX\project.h: 7 skipping>'
Error C:\USERS\abc\DOWNLO~1\RELEASE\RELEASE\MEX\mexDiscreteFlow.cpp: C:\USERS\abc\DOWNLO~1\RELEASE\RELEASE\MEX\project.h: 8 syntax error; found *' expecting)'
Error C:\USERS\abc\DOWNLO~1\RELEASE\RELEASE\MEX\mexDiscreteFlow.cpp: C:\USERS\abc\DOWNLO~1\RELEASE\RELEASE\MEX\project.h: 8 skipping *'pBuffer'
Error C:\USERS\abc\DOWNLO~1\RELEASE\RELEASE\MEX\mexDiscreteFlow.cpp: C:\USERS\abc\DOWNLO~1\RELEASE\RELEASE\MEX\project.h: 10 undeclared identifier pBuffer'
Error C:\USERS\abc\DOWNLO~1\RELEASE\RELEASE\MEX\mexDiscreteFlow.cpp: C:\USERS\abc\DOWNLO~1\RELEASE\RELEASE\MEX\project.h: 11 undeclared identifierdelete'
Error C:\USERS\abc\DOWNLO~1\RELEASE\RELEASE\MEX\mexDiscreteFlow.cpp: C:\USERS\abc\DOWNLO~1\RELEASE\RELEASE\MEX\project.h: 11 illegal expression
Error C:\USERS\abc\DOWNLO~1\RELEASE\RELEASE\MEX\mexDiscreteFlow.cpp: C:\USERS\abc\DOWNLO~1\RELEASE\RELEASE\MEX\project.h: 11 syntax error; found pBuffer' expecting]'
Error C:\USERS\abc\DOWNLO~1\RELEASE\RELEASE\MEX\mexDiscreteFlow.cpp: C:\USERS\abc\DOWNLO~1\RELEASE\RELEASE\MEX\project.h: 11 type error: pointer expected
Warning C:\USERS\abc\DOWNLO~1\RELEASE\RELEASE\MEX\mexDiscreteFlow.cpp: C:\USERS\abc\DOWNLO~1\RELEASE\RELEASE\MEX\project.h: 11 Statement has no effect
Error C:\USERS\abc\DOWNLO~1\RELEASE\RELEASE\MEX\mexDiscreteFlow.cpp: C:\USERS\abc\DOWNLO~1\RELEASE\RELEASE\MEX\project.h: 11 syntax error; found pBuffer' expecting;'
Warning C:\USERS\abc\DOWNLO~1\RELEASE\RELEASE\MEX\mexDiscreteFlow.cpp: C:\USERS\abc\DOWNLO~1\RELEASE\RELEASE\MEX\project.h: 11 Statement has no effect
Warning C:\USERS\abc\DOWNLO~1\RELEASE\RELEASE\MEX\mexDiscreteFlow.cpp: C:\USERS\abc\DOWNLO~1\RELEASE\RELEASE\MEX\project.h: 11 possible usage of delete before definition
Error C:\USERS\abc\DOWNLO~1\RELEASE\RELEASE\MEX\mexDiscreteFlow.cpp: C:\USERS\abc\DOWNLO~1\RELEASE\RELEASE\MEX\project.h: 15 syntax error; found <' expecting;'
Error C:\USERS\abc\DOWNLO~1\RELEASE\RELEASE\MEX\mexDiscreteFlow.cpp: C:\USERS\abc\DOWNLO~1\RELEASE\RELEASE\MEX\project.h: 15 skipping <'
Error C:\USERS\abc\DOWNLO~1\RELEASE\RELEASE\MEX\mexDiscreteFlow.cpp: C:\USERS\abc\DOWNLO~1\RELEASE\RELEASE\MEX\project.h: 15 syntax error; foundT' expecting ;'
Error C:\USERS\abc\DOWNLO~1\RELEASE\RELEASE\MEX\mexDiscreteFlow.cpp: C:\USERS\abc\DOWNLO~1\RELEASE\RELEASE\MEX\project.h: 15 syntax error; found>' expecting ;'
Error C:\USERS\abc\DOWNLO~1\RELEASE\RELEASE\MEX\mexDiscreteFlow.cpp: C:\USERS\abc\DOWNLO~1\RELEASE\RELEASE\MEX\project.h: 15 skipping>'
Error C:\USERS\abc\DOWNLO~1\RELEASE\RELEASE\MEX\mexDiscreteFlow.cpp: C:\USERS\abc\DOWNLO~1\RELEASE\RELEASE\MEX\project.h: 16 syntax error; found *' expecting)'
Error C:\USERS\abc\DOWNLO~1\RELEASE\RELEASE\MEX\mexDiscreteFlow.cpp: C:\USERS\abc\DOWNLO~1\RELEASE\RELEASE\MEX\project.h: 16 too many errors
E:\MATLAB~1\BIN\MEX.PL: Error: Compile of 'mexDiscreteFlow.cpp' failed.
??? Error using ==> mex at 213
Unable to complete successfully.
Can anyone offer some suggestions ?
Thanks

lcc is the C compiler shipped with Matlab, but you are trying to compile a C++ file.
You need to run mex -setup again and choose a C++ compiler (but first get a C++ compiler, if you don't already have one)

Related

What does error when compiling drivers for wn722n mean?

I am trying to install drivers for wireless adapter wn722n on kali linux.
Following TP link manual:https://static.tp-link.com/2018/201812/20181207/Installation%20Guide%20for%20Linux.pdf
I get a lot of errors at the make stage that I don't understand:
root#kali:~/Downloads/rtl8188EUS_linux_v5.2.2.4_25483.20171222# make
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.5.0-kali2-amd64/build M=/root/Downloads/rtl8188EUS_linux_v5.2.2.4_25483.20171222 modules
make[1]: Entering directory '/usr/src/linux-headers-5.5.0-kali2-amd64'
CC [M] /root/Downloads/rtl8188EUS_linux_v5.2.2.4_25483.20171222/core/rtw_cmd.o
In file included from /root/Downloads/rtl8188EUS_linux_v5.2.2.4_25483.20171222/include/osdep_service.h:46,
from /root/Downloads/rtl8188EUS_linux_v5.2.2.4_25483.20171222/include/drv_types.h:32,
from /root/Downloads/rtl8188EUS_linux_v5.2.2.4_25483.20171222/core/rtw_cmd.c:22:
/root/Downloads/rtl8188EUS_linux_v5.2.2.4_25483.20171222/include/osdep_service_linux.h: In function ‘_init_timer’:
/root/Downloads/rtl8188EUS_linux_v5.2.2.4_25483.20171222/include/osdep_service_linux.h:288:8: error: ‘_timer’ {aka ‘struct timer_list’} has no member named ‘data’
288 | ptimer->data = (unsigned long)cntx;
| ^~
/root/Downloads/rtl8188EUS_linux_v5.2.2.4_25483.20171222/include/osdep_service_linux.h:289:2: error: implicit declaration of function ‘init_timer’; did you mean ‘_init_timer’? [-Werror=implicit-function-declaration]
289 | init_timer(ptimer);
| ^~~~~~~~~~
| _init_timer
In file included from /root/Downloads/rtl8188EUS_linux_v5.2.2.4_25483.20171222/include/drv_types.h:35,
from /root/Downloads/rtl8188EUS_linux_v5.2.2.4_25483.20171222/core/rtw_cmd.c:22:
/root/Downloads/rtl8188EUS_linux_v5.2.2.4_25483.20171222/include/wifi.h: At top level:
/root/Downloads/rtl8188EUS_linux_v5.2.2.4_25483.20171222/include/wifi.h:1012: warning: "IEEE80211_MAX_AMPDU_BUF" redefined
1012 | #define IEEE80211_MAX_AMPDU_BUF 0x40
|
In file included from /root/Downloads/rtl8188EUS_linux_v5.2.2.4_25483.20171222/include/osdep_service_linux.h:86,
from /root/Downloads/rtl8188EUS_linux_v5.2.2.4_25483.20171222/include/osdep_service.h:46,
from /root/Downloads/rtl8188EUS_linux_v5.2.2.4_25483.20171222/include/drv_types.h:32,
from /root/Downloads/rtl8188EUS_linux_v5.2.2.4_25483.20171222/core/rtw_cmd.c:22:
/usr/src/linux-headers-5.5.0-kali2-common/include/linux/ieee80211.h:1451: note: this is the location of the previous definition
1451 | #define IEEE80211_MAX_AMPDU_BUF 0x100
|
cc1: some warnings being treated as errors
make[3]: *** [/usr/src/linux-headers-5.5.0-kali2-common/scripts/Makefile.build:271: /root/Downloads/rtl8188EUS_linux_v5.2.2.4_25483.20171222/core/rtw_cmd.o] Error 1
make[2]: *** [/usr/src/linux-headers-5.5.0-kali2-common/Makefile:1707: /root/Downloads/rtl8188EUS_linux_v5.2.2.4_25483.20171222] Error 2
make[1]: *** [/usr/src/linux-headers-5.5.0-kali2-common/Makefile:179: sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.5.0-kali2-amd64'
make: *** [Makefile:1911: modules] Error 2
Anyone has an idea what those mean?

Illegal Character Escape in Text.Smolder.Renderer.String.purs

In an attempt to compile my program, I received the following error regarding the file String.purs from the Text.Smolder.Renderer module:
Error found:
at bower_components\purescript-smolder\src\Text\Smolder\Renderer\String.purs:76:
56 - 76:57 (line 76, column 56 - line 76, column 57)
Unable to parse module:
Illegal character escape code
I looked at the source file and found the following at line 76:
toStream s = foldr (\c t -> c :< (Just t)) (mkCofree '\0' Nothing) cs
How can this be corrected? (And how on earth could a compiler error be in a public library!!!)

psql errors on restore database

Please read a litle story first. So I have a front end application that run on a SUSE Linux Enterprise 9 PC and PostgreSQL 7.4.2 database server.
Now I installed on a Windows 8.1 PC postgresql-9.5.1 from get.enterprisedb.com.
When I want to restore the backup from SUSE (that was made from a menu item of the front end application) with the command:
psql -U admin -d MyDataBase -f BackupDatabase
I receive a lot of errors like:
^
psql:d:/Ael_DB.tar:27100: ERROR: syntax error at or near "Scara"
LINE 1: Scara: A;
^
psql:d:/Ael_DB.tar:27101: ERROR: syntax error at or near "Apartamentul"
LINE 1: Apartamentul: 20;
^
psql:d:/Ael_DB.tar:27102: ERROR: syntax error at or near "Ü8"
LINE 1: Ü?Localitate: Constanta;
^
psql:d:/Ael_DB.tar:27103: ERROR: syntax error at or near "Bulevardul"
LINE 1: Bulevardul: AUREL VLAICU;
^
psql:d:/Ael_DB.tar:27104: ERROR: syntax error at or near "NumÄ?r"
LINE 1: NumÄ?r arterÄ?: 6;
^
psql:d:/Ael_DB.tar:27105: ERROR: syntax error at or near "Blocul"
LINE 1: Blocul: C6;
^
psql:d:/Ael_DB.tar:27106: ERROR: syntax error at or near "Apartamentul"
LINE 1: Apartamentul: 48;
^
psql:d:/Ael_DB.tar:27107: ERROR: syntax error at or near "WLocalitate"
LINE 1: WLocalitate: Constanta;
^
psql:d:/Ael_DB.tar:27108: ERROR: syntax error at or near "Strada"
LINE 1: Strada: CAIUTI;
^
psql:d:/Ael_DB.tar:27109: ERROR: syntax error at or near "NumÄ?r"
LINE 1: NumÄ?r arterÄ?: 27;
^
psql:d:/Ael_DB.tar:27110: ERROR: syntax error at or near "Localitate"
LINE 1: Localitate: Constanta;
^
psql:d:/Ael_DB.tar:27111: ERROR: syntax error at or near "Strada"
LINE 1: Strada: CRINULUI;
^
psql:d:/Ael_DB.tar:27112: ERROR: syntax error at or near "NumÄ?r"
LINE 1: NumÄ?r arterÄ?: 19;
^
psql:d:/Ael_DB.tar:27113: ERROR: syntax error at or near "Localitate"
LINE 1: Localitate: Constanta;
^
psql:d:/Ael_DB.tar:27114: ERROR: syntax error at or near "Strada"
LINE 1: Strada: DRAGOSLAVELE;
^
psql:d:/Ael_DB.tar:27115: ERROR: syntax error at or near "NumÄ?r"
LINE 1: NumÄ?r arterÄ?: 1B;
^
psql:d:/Ael_DB.tar:27116: ERROR: syntax error at or near "Blocul"
LINE 1: Blocul: 1A;
^
psql:d:/Ael_DB.tar:27117: ERROR: syntax error at or near "Apartamentul"
LINE 1: Apartamentul: 9;
^
psql:d:/Ael_DB.tar:27118: ERROR: syntax error at or near ""Localitate"
LINE 1: "Localitate: Constanta;
^
psql:d:/Ael_DB.tar:27119: ERROR: syntax error at or near "Strada"
LINE 1: Strada: OBORULUI;
^
psql:d:/Ael_DB.tar:27120: ERROR: syntax error at or near "NumÄ?r"
LINE 1: NumÄ?r arterÄ?: 54;
^
psql:d:/Ael_DB.tar:27121: ERROR: syntax error at or near "Blocul"
LINE 1: Blocul: L2;
^
psql:d:/Ael_DB.tar:27122: ERROR: syntax error at or near "Scara"
LINE 1: Scara: B;
^
psql:d:/Ael_DB.tar:27123: ERROR: syntax error at or near "Apartamentul"
LINE 1: Apartamentul: 34;
^
psql:d:/Ael_DB.tar:27124: ERROR: syntax error at or near "┼Localitate"
LINE 1: ┼Localitate: Constanta;
^
psql:d:/Ael_DB.tar:27125: ERROR: syntax error at or near "Strada"
LINE 1: Strada: PRELUNGIREA LILIACULUI;
^
psql:d:/Ael_DB.tar:27126: ERROR: syntax error at or near "NumÄ?r"
LINE 1: NumÄ?r arterÄ?: 6;
^
psql:d:/Ael_DB.tar:27127: ERROR: syntax error at or near "Blocul"
LINE 1: Blocul: G8;
^
psql:d:/Ael_DB.tar:27128: ERROR: syntax error at or near "Apartamentul"
LINE 1: Apartamentul: 50;
^
psql:d:/Ael_DB.tar:27129: ERROR: syntax error at or near "Localitate"
LINE 1: Localitate: Constanta;
^
psql:d:/Ael_DB.tar:27130: ERROR: syntax error at or near "Strada"
LINE 1: Strada: STEFAN CEL MARE;
^
psql:d:/Ael_DB.tar:27131: ERROR: syntax error at or near "NumÄ?r"
LINE 1: NumÄ?r arterÄ?: 57;
^
psql:d:/Ael_DB.tar:27132: ERROR: syntax error at or near "Blocul"
LINE 1: Blocul: M17;
^
psql:d:/Ael_DB.tar:27133: ERROR: syntax error at or near "Apartamentul"
LINE 1: Apartamentul: 24;
^
psql:d:/Ael_DB.tar:27134: ERROR: syntax error at or near "eme"
LINE 1: eme.Localitate: Mereni;
^
psql:d:/Ael_DB.tar:27147: ERROR: syntax error at or near "ńwĆ"
LINE 1: ńwĆ
^
psql:d:/Ael_DB.tar:27147: ERROR: syntax error at or near "˘ţŤ"
LINE 1: ˘ţŤ;
^
psql:d:/Ael_DB.tar:27147: ERROR: syntax error at or near "˘ţŤ"
LINE 1: ˘ţŤ;
^
psql:d:/Ael_DB.tar:27147: ERROR: syntax error at or near "o"
LINE 1: o↕?;
^
psql:d:/Ael_DB.tar:27147: ERROR: syntax error at or near "uLp"
LINE 1: uLp;
^
psql:d:/Ael_DB.tar:27147: ERROR: syntax error at or near "uLp"
LINE 1: uLp;
^
psql:d:/Ael_DB.tar:27153: ERROR: syntax error at or near "∟"
LINE 1: ∟♀×#=∟♀>Ý`
^
psql:d:/Ael_DB.tar:27153: ERROR: syntax error at or near "Öę?"
LINE 1: Öę?;
^
psql:d:/Ael_DB.tar:27153: ERROR: syntax error at or near "Öę?"
LINE 1: Öę?;
^
psql:d:/Ael_DB.tar:27153: ERROR: syntax error at or near "o"
LINE 1: o↕?;
^
psql:d:/Ael_DB.tar:27153: ERROR: syntax error at or near "o"
LINE 1: o↕?;
^
psql:d:/Ael_DB.tar:27153: ERROR: syntax error at or near "o"
LINE 1: o↕?;
^
psql:d:/Ael_DB.tar:27153: ERROR: syntax error at or near "o"
LINE 1: o↕?;
^
psql:d:/Ael_DB.tar:27153: ERROR: syntax error at or near "∟"
LINE 1: ∟ů⌂?śů⌂?śů⌂?ś♀]?<ף<Öę?<|Í<ŹÂuD"
LINE 1: |>D;
^
psql:d:/Ael_DB.tar:27153: ERROR: syntax error at or near "|>D"
LINE 1: |>D;
^
psql:d:/Ael_DB.tar:27153: ERROR: syntax error at or near "|>D"
LINE 1: |>D;
^
psql:d:/Ael_DB.tar:27153: ERROR: syntax error at or near ">"
LINE 1: >Ă.;
^
psql:d:/Ael_DB.tar:27153: ERROR: syntax error at or near ">"
LINE 1: >Ă.;
^
psql:d:/Ael_DB.tar:27153: ERROR: syntax error at or near ">"
LINE 1: >Ă.;
^
psql:d:/Ael_DB.tar:27153: ERROR: syntax error at or near ">"
LINE 1: >Ă.;
^
☼▲◄♀☻". available for "▼→♥gupa↕; agem↕↕g▬N↨X ☼#☺☻; ┌g☺4g☺(☻►=♦?☻
Try \h with no arguments to see available help.
psql:d:/Ael_DB.tar:27171: ERROR: syntax error at or near "∟"
LINE 1: .resources.resource.9.typede5zĆ♀4VĎm_1181127081303.zipbp"]...
^
psql:d:/Ael_DB.tar:27171: ERROR: syntax error at or near ")"
LINE 1: )R6↔ ^H§"0Ű☺k‼"d§}↔=$ç♂▬order b'y ´ nt♀▲Á☺ůlocal"ć☻#'m♂"Me...
^
psql:d:/Ael_DB.tar:27174: ERROR: syntax error at or near "l"
LINE 1: l◄!L'♠Z su‼ŕraI_c◄1⌂ nl/ç &tšl‼Sl§=↔=n☼§☺E☼U♥m☺Ř nm☻Km☼...
^
psql:d:/Ael_DB.tar:27175: ERROR: syntax error at or near "Localitate"
LINE 1: Localitate: Constanta;
^
psql:d:/Ael_DB.tar:27176: ERROR: syntax error at or near "Bulevardul"
LINE 1: Bulevardul: 1 DECEMBRIE 1918;
^
psql:d:/Ael_DB.tar:27177: ERROR: syntax error at or near "NumÄ?r"
LINE 1: NumÄ?r arterÄ?: 6;
^
psql:d:/Ael_DB.tar:27178: ERROR: syntax error at or near "Blocul"
LINE 1: Blocul: L56;
^
psql:d:/Ael_DB.tar:27179: ERROR: syntax error at or near "Scara"
LINE 1: Scara: B;
^
psql:d:/Ael_DB.tar:27180: ERROR: syntax error at or near "Apartamentul"
LINE 1: Apartamentul: 25;
^
psql:d:/Ael_DB.tar:27181: ERROR: syntax error at or near "Localitate"
LINE 1: Localitate: Constanta;
^
psql:d:/Ael_DB.tar:27182: ERROR: syntax error at or near "Bulevardul"
LINE 1: Bulevardul: 1 MAI;
^
psql:d:/Ael_DB.tar:27183: ERROR: syntax error at or near "NumÄ?r"
LINE 1: NumÄ?r arterÄ?: 3;
^
psql:d:/Ael_DB.tar:27184: ERROR: syntax error at or near "Blocul"
LINE 1: Blocul: H10;
^
psql:d:/Ael_DB.tar:27185: ERROR: syntax error at or near "Scara"
LINE 1: Scara: A;
^
psql:d:/Ael_DB.tar:27186: ERROR: syntax error at or near "Apartamentul"
LINE 1: Apartamentul: 20;
^
psql:d:/Ael_DB.tar:27187: ERROR: syntax error at or near "Localitate"
LINE 1: Localitate: Constanta;
^
psql:d:/Ael_DB.tar:27188: ERROR: syntax error at or near "Bulevardul"
LINE 1: Bulevardul: AUREL VLAICU;
^
psql:d:/Ael_DB.tar:27189: ERROR: syntax error at or near "NumÄ?r"
LINE 1: NumÄ?r arterÄ?: 6;
^
psql:d:/Ael_DB.tar:27190: ERROR: syntax error at or near "Blocul"
LINE 1: Blocul: C6;
^
psql:d:/Ael_DB.tar:27191: ERROR: syntax error at or near "Apartamentul"
LINE 1: Apartamentul: 48;
^
psql:d:/Ael_DB.tar:27192: ERROR: syntax error at or near "WLocalitate"
LINE 1: WLocalitate: Constanta;
^
psql:d:/Ael_DB.tar:27193: ERROR: syntax error at or near "Strada"
LINE 1: Strada: CAIUTI;
^
psql:d:/Ael_DB.tar:27194: ERROR: syntax error at or near "NumÄ?r"
LINE 1: NumÄ?r arterÄ?: 27;
^
psql:d:/Ael_DB.tar:27195: ERROR: syntax error at or near "Localitate"
LINE 1: Localitate: Constanta;
^
psql:d:/Ael_DB.tar:27196: ERROR: syntax error at or near "Strada"
LINE 1: Strada: CRINULUI;
^
psql:d:/Ael_DB.tar:27197: ERROR: syntax error at or near "NumÄ?r"
LINE 1: NumÄ?r arterÄ?: 19;
^
psql:d:/Ael_DB.tar:27198: ERROR: syntax error at or near "Localitate"
LINE 1: Localitate: Constanta;
^
psql:d:/Ael_DB.tar:27199: ERROR: syntax error at or near "Strada"
LINE 1: Strada: DRAGOSLAVELE;
^
psql:d:/Ael_DB.tar:27200: ERROR: syntax error at or near "NumÄ?r"
LINE 1: NumÄ?r arterÄ?: 1B;
^
psql:d:/Ael_DB.tar:27201: ERROR: syntax error at or near "Blocul"
LINE 1: Blocul: 1A;
^
psql:d:/Ael_DB.tar:27202: ERROR: syntax error at or near "Apartamentul"
LINE 1: Apartamentul: 9;
^
psql:d:/Ael_DB.tar:27203: ERROR: syntax error at or near ""Localitate"
LINE 1: "Localitate: Constanta;
^
psql:d:/Ael_DB.tar:27204: ERROR: syntax error at or near "Strada"
LINE 1: Strada: OBORULUI;
^
psql:d:/Ael_DB.tar:27205: ERROR: syntax error at or near "NumÄ?r"
LINE 1: NumÄ?r arterÄ?: 54;
^
psql:d:/Ael_DB.tar:27206: ERROR: syntax error at or near "Blocul"
LINE 1: Blocul: L2;
^
psql:d:/Ael_DB.tar:27207: ERROR: syntax error at or near "Scara"
LINE 1: Scara: B;
^
psql:d:/Ael_DB.tar:27208: ERROR: syntax error at or near "Apartamentul"
LINE 1: Apartamentul: 34;
^
psql:d:/Ael_DB.tar:27209: ERROR: syntax error at or near "┼Localitate"
LINE 1: ┼Localitate: Constanta;
^
psql:d:/Ael_DB.tar:27210: ERROR: syntax error at or near "Strada"
LINE 1: Strada: PRELUNGIREA LILIACULUI;
^
psql:d:/Ael_DB.tar:27211: ERROR: syntax error at or near "NumÄ?r"
LINE 1: NumÄ?r arterÄ?: 6;
^
I did not let the command to finish since the database has 6 GB and would last too long.
The question is where I am wrong or missing something ?

Error: pandoc document conversion failed with error 127

|................................................................ | 98%
|.................................................................| 100%
output file: test.knit.md
/usr/lib/rstudio-server/bin/pandoc/pandoc +RTS -K512m -RTS test.utf8.md --to html --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output test.html --smart --email-obfuscation none --self-contained --standalone --section-divs --table-of-contents --toc-depth 3 --template /usr/lib64/R/library/rmarkdown/rmd/h/default.html --variable 'theme:cerulean' --include-in-header /tmp/Rtmp4CjD4R/rmarkdown-str6f6421e357bc.html --mathjax --variable 'mathjax-url:https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --highlight-style haddock
Error: pandoc document conversion failed with error 127
Occasionally, I run the codes and it completed 100% and created a md format file.
> traceback()
10: eval(expr, envir, enclos)
9: FUN(X[[i]], ...)
8: lapply(aesthetics, eval, envir = data, enclos = plot$plot_env)
7: f(..., self = self)
6: l$compute_aesthetics(d, plot)
5: f(l = layers[[i]], d = data[[i]])
4: by_layer(function(l, d) l$compute_aesthetics(d, plot))
3: ggplot_build(x)
2: print.ggplot(x)
1: function (x, ...)
UseMethod("print")(x)
There is no ggplot function run inside the RMarkdown but there is ggplot error when I tried to traceback(). However there is an error Error:127, any solution?
Googling the error message indicates that ‘status 127’ means that commands are not being found.

having errors when compile .cc file to mex in Matlab

I am trying to complie a .cc file to mex, and I am using mex filename command in Matlab. My complier is [1] Lcc-win32 C 2.4.1 in C:\PROGRA~1\MATLAB\R2012b\sys\lcc .
However, there are some errors:
lcc preprocessor error: learn.cc:5 Could not find include file <sys/time.h>
Error learn.cc: 70 illegal statement termination
Error learn.cc: 70 skipping `int'
Error learn.cc: 70 undeclared identifier `alen'
Error learn.cc: 71 illegal statement termination
Error learn.cc: 71 skipping `int'
Error learn.cc: 71 undeclared identifier `blen'
Error learn.cc: 87 invalid struct field declarations
Error learn.cc: 87 syntax error; found `collapsed' expecting `}'
Error learn.cc: 87 skipping `collapsed' `*' `x'
Error learn.cc: 93 unrecognized declaration
Warning learn.cc: 93 empty declaration
Error learn.cc: 97 undefined size for `incomplete struct timeval defined at learn.cc 97 tp'
Error learn.cc: 99 unknown field `tv_usec' of `incomplete struct timeval defined at learn.cc 97'
Error learn.cc: 102 syntax error; found `double' expecting `;'
Error learn.cc: 103 syntax error; found `double' expecting `;'
Error learn.cc: 106 missing parameter type
Error learn.cc: 106 syntax error; found `X' expecting `)'
Error learn.cc: 106 skipping `X' `,'
Error learn.cc: 106 syntax error; found `double' expecting `{'
Error learn.cc: 106 missing identifier
Error learn.cc: 106 too many errors
I guess the reason for the first error is that there is no time.h file in the sys folder. Instead there is timeb.h file. But I don't know the reason to the following errors.
Here are some relative codes:
line 70 int alen = **((int **)a);
line 71 int blen = **((int **)b);
line 86-93 struct data {
collapsed *x;
int num;
int numblocks;
int *blocksizes;
float *regmult;
float *learnmult;
};
line 96-100 void seed_time() {
struct timeval tp;
check(gettimeofday(&tp, NULL) == 0);
srand48((long)tp.tv_usec);
}
line 102 static inline double min(double x, double y) { return (x <= y ? x : y); }
line 103 static inline double max(double x, double y) { return (x <= y ? y : x); }
Can anyone give me a hint?
As far as i can tell, there is nothing wrong with lines 70,71. Are a,b integer double arrays declared and allocated with something like:
int ** a = malloc(4 * sizeof(int*) );
for (int var = 0; var < 4; ++var) {
a[var] = malloc(3*sizeof(int));
}
?
Are you sure that the sys/time.h file can be replaced by sys/timeb.h file? Have you tried?
sys/time.h looks like a pretty linux/unix specific file. Are you sure that the sys/ folder refers to your matlab sys directory (C:\PROGRA~1\MATLAB\R2012b\sys\lcc)?
In general, it looks like you are trying to compile a linux .mex file on a windows machine. For example gettimeofday is a linux pure call (according to this answer):
Equivalent of gettimeday() for Windows