macOS High Sierra
(10.13.6
)运行MATLAB R2014a
,结果出现空指针异常,具体异常信息如下图:继续阅读解决macOS High Sierra(10.13.6)运行MATLAB R2014a出现NullPointerExpetion的问题
macOS High Sierra
(10.13.6
)运行MATLAB R2014a
,结果出现空指针异常,具体异常信息如下图:最近在调试CC1310
跟NodeMCU
通过SPI
接口通信,中间遇到很多问题,在此记录一下。 继续阅读Ti CC1310作为从设备与NodeMCU通过SPI总线进行通信
最近在捣鼓NodeMCU
,中间各种折腾,下面记录一下编译固件的过程。
首先参考 ubuntu 16.04(x64)构建NodeMCU编译工具链 来构建工具链,然后把工具链加入到环境变量。
然后就是下载固件代码并进行编译了
1 2 3 4 5 6 7 8 9 10 |
$ git clone https://github.com/nodemcu/nodemcu-firmware.git $ cd nodemcu-firmware $ export PATH=/opt/Espressif/esp-open-sdk/xtensa-lx106-elf/bin:$PATH $ make #根据自己的设备实际情况选择4M还是512k的版本 $ make flash4m |
如果存在下载问题,可以本站下载一份代码拷贝。点击此处下载。
只要NodeMCU
开发板通电或重置,就会执行init.lua
脚本。因此,我们把自己的代码写在这个脚本里面即可。然后用luatool
更新到NodeMCU
设备里面即可。
1 2 3 4 5 6 7 8 9 |
$ sudo pip2 install pyserial $ sudo pip2 install esptool $ git clone https://github.com/4refr0nt/luatool.git $ cd luatool/luatool $ python2 luatool.py --port /dev/ttyUSB0 --src init.lua --dest init.lua --verbose -b 115200 |
注意上面的代码中,--port
参数需要根据实际情况进行修改,--src
参数也是一样需要根据我们实际的文件名来调整,最后的-b
指定波特率,上面固件编译后默认的波特率是115200
,淘宝上卖的设备,很多是默认9600
的,这个要注意。
如果上面的代码下载存在问题,可以本站下载一份拷贝 点击这里下载luatool
继续阅读ubuntu 16.04(x64)编译并烧录NodeMCU固件
最近在捣鼓NodeMCU
,中间各种折腾,下面记录一下编译工具链的过程。
官方推荐的操作过程如下:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
$ sudo mkdir /opt/Espressif $ sudo chown `whoami` /opt/Espressif/ $ cd /opt/Espressif $ sudo apt-get install git autoconf build-essential gperf bison flex texinfo libtool libncurses5-dev wget gawk libc6-dev-amd64 python-serial libexpat-dev $ sudo apt install help2man $ sudo apt-get install libtool-bin $ git clone --recursive https://github.com/pfalcon/esp-open-sdk.git $ cd esp-open-sdk $ make STANDALONE=y $ export PATH=$PWD/xtensa-lx106-elf/bin:$PATH |
上面操作中最慢的依旧是下载依赖的工具链的源代码部分,可以从本站下载一份已经下载完全部依赖项目的编译环境。点击此处下载
本站下载的文件,直接执行make
命令即可,不要执行make clean
,make clean
会删除ESP8266_NONOS_SDK
文件夹,导致编译不通过。这种情况,可以还原Makefile
,再次去服务器上拉取文件即可。
编译完成后,注意以下几个路径
esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/sysroot/usr/include/
为头文件的所在目录esp-open-sdk/xtensa-lx106-elf/bin
为工具链所在目录esp-open-sdk/xtensa-lx106-elf/xtensa-lx106-elf/sysroot/lib
为链接库目录上面的几个路径在编译源代码的时候会用到。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
$ sudo apt-get install git autoconf build-essential gperf bison flex texinfo libtool libncurses5-dev wget gawk libc6-dev-amd64 python-serial libexpat-dev $ sudo apt-get install libtool-bin $ sudo mkdir /opt/Espressif $ sudo chown `whoami` /opt/Espressif/ $ cd /opt/Espressif $ git clone -b lx106 git://github.com/jcmvbkbc/crosstool-NG.git $ cd crosstool-NG $ ./bootstrap && ./configure --prefix=`pwd` && make && make install $ ./ct-ng xtensa-lx106-elf $ ./ct-ng build $ PATH=$PWD/builds/xtensa-lx106-elf/bin:$PATH |
对于上面的命令执行过程中,往往卡住在ct-ng build
这个位置,观察目录下的build.log
会发现总是卡住在文件下载的位置,大量的链接无法正确下载,都是国情导致的。
如果出现下载问题,一般建议从本站下载一份已经下载好的文件,当然,也可以手工从其他镜像站点逐个手工下载依赖的源代码压缩包。
参考操作如下:
1 2 3 4 5 6 7 8 9 10 11 |
$ cd /opt/Espressif/crosstool-NG $ mkdir .build $ cd .build $ wget https://www.mobibrw.com/wp-content/uploads/2018/08/tarballs.zip $ unzip tarballs.zip $ rm -rf tarballs.zip |
然后重新执行ct-ng build
命令即可。
如果上面的代码下载存在问题,可以从本站下载一份拷贝,点击下载crosstool-NG
已经编译好的工具链,可以从本站下载,点击这里下载 xtensa-lx106-elf
最近在捣鼓NodeMCU
,中间各种折腾,下面记录一下编译固件烧录工具的过程。
首先安装依赖包:
1 2 3 4 5 6 7 |
$ sudo apt-get install python3-pip $ sudo pip3 install --upgrade pip $ sudo pip3 install wxpython $ sudo apt-get install pyseria |
安装wxpython
的时候,如果遇到问题,参考 ubuntu 16.04在Python3上安装wxpython-4.0.3
下载代码
1 2 3 |
$ sudo apt-get install git $ git clone https://github.com/marcelstoer/nodemcu-pyflasher.git |
如果源代码下载存在问题,可以本站下载一份拷贝
编译并运行
1 2 3 4 5 |
$ cd nodemcu-pyflasher $ bash build.sh $ python3 Main.py |
需要在ubuntu 16.04
上安装Python3
需要使用的wxpython-4.0.3
,中间过程如下:
1 2 3 4 5 6 7 |
$ sudo apt-get install python3-pip $ sudo apt-get install build-essential $ sudo pip3 install --upgrade pip $ sudo pip3 install wxpython |
如果提示如下错误信息:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
checking for pkg-config... no checking for GTK+ - version >= 3.0.0... no *** A new enough version of pkg-config was not found. *** See http://pkgconfig.sourceforge.net configure: error: The development files for GTK+ were not found. For GTK+ 2, please ensure that pkg-config is in the path and that gtk+-2.0.pc is installed. For GTK+ 1.2 please check that gtk-config is in the path, and that the version is 1.2.3 or above. Also check that the libraries returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config --libs' are in the LD_LIBRARY_PATH or equivalent. Error running configure ERROR: failed building wxWidgets Traceback (most recent call last): File "build.py", line 1321, in cmd_build_wx wxbuild.main(wxDir(), build_options) File "/tmp/pip-build-i74kd49w/wxpython/buildtools/build_wxwidgets.py", line 375, in main "Error running configure") File "/tmp/pip-build-i74kd49w/wxpython/buildtools/build_wxwidgets.py", line 85, in exitIfError raise builder.BuildError(msg) buildtools.builder.BuildError: Error running configure Finished command: build_wx (0m2.471s) Finished command: build (0m2.471s) Command '"/usr/bin/python3" -u build.py build' failed with exit code 1. ---------------------------------------- Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-i74kd49w/wxpython/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-kx0e4kl4-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-i74kd49w/wxpython/ |
则执行如下命令:
1 |
$ sudo apt-get install build-essential libgtk-3-dev |
如果出现如下错误信息:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
checking for GST... configure: WARNING: GStreamer 1.0 not available, falling back to 0.10 checking for GST... configure: WARNING: GStreamer 0.10 not available, falling back to 0.8 configure: error: GStreamer not available Error running configure ERROR: failed building wxWidgets Traceback (most recent call last): File "build.py", line 1321, in cmd_build_wx wxbuild.main(wxDir(), build_options) File "/tmp/pip-install-_6rbj1se/wxpython/buildtools/build_wxwidgets.py", line 375, in main "Error running configure") File "/tmp/pip-install-_6rbj1se/wxpython/buildtools/build_wxwidgets.py", line 85, in exitIfError raise builder.BuildError(msg) buildtools.builder.BuildError: Error running configure Finished command: build_wx (0m5.302s) Finished command: build (0m5.302s) Command '"/usr/bin/python3" -u build.py build' failed with exit code 1. ---------------------------------------- Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-_6rbj1se/wxpython/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-gkelw1g2/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-_6rbj1se/wxpython/ |
则执行如下命令:
1 |
$ sudo apt install libgstreamer-plugins-base1.0-dev |
如果出现如下错误信息:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 |
../../../../sip/cpp/sip_html2wxWebViewHistoryItem.cpp: In function ‘PyObject* meth_wxWebViewHistoryItem_GetUrl(PyObject*, PyObject*)’: ../../../../sip/cpp/sip_html2wxWebViewHistoryItem.cpp:24:10: error: ‘::wxWebViewHistoryItem’ has not been declared ::wxWebViewHistoryItem *sipCpp; ^ ../../../../sip/cpp/sip_html2wxWebViewHistoryItem.cpp:24:34: error: ‘sipCpp’ was not declared in this scope ::wxWebViewHistoryItem *sipCpp; ^ ../../../../sip/cpp/sip_html2wxWebViewHistoryItem.cpp: In function ‘PyObject* meth_wxWebViewHistoryItem_GetTitle(PyObject*, PyObject*)’: ../../../../sip/cpp/sip_html2wxWebViewHistoryItem.cpp:58:10: error: ‘::wxWebViewHistoryItem’ has not been declared ::wxWebViewHistoryItem *sipCpp; ^ ../../../../sip/cpp/sip_html2wxWebViewHistoryItem.cpp:58:34: error: ‘sipCpp’ was not declared in this scope ::wxWebViewHistoryItem *sipCpp; ^ ../../../../sip/cpp/sip_html2wxWebViewHistoryItem.cpp: In function ‘void release_wxWebViewHistoryItem(void*, int)’: ../../../../sip/cpp/sip_html2wxWebViewHistoryItem.cpp:90:32: error: ‘wxWebViewHistoryItem’ in namespace ‘::’ does not name a type delete reinterpret_cast< ::wxWebViewHistoryItem *>(sipCppV); ^ ../../../../sip/cpp/sip_html2wxWebViewHistoryItem.cpp:90:53: error: expected ‘>’ before ‘*’ token delete reinterpret_cast< ::wxWebViewHistoryItem *>(sipCppV); ^ ../../../../sip/cpp/sip_html2wxWebViewHistoryItem.cpp:90:53: error: expected ‘(’ before ‘*’ token ../../../../sip/cpp/sip_html2wxWebViewHistoryItem.cpp:90:54: error: expected primary-expression before ‘>’ token delete reinterpret_cast< ::wxWebViewHistoryItem *>(sipCppV); ^ ../../../../sip/cpp/sip_html2wxWebViewHistoryItem.cpp:90:64: error: expected ‘)’ before ‘;’ token delete reinterpret_cast< ::wxWebViewHistoryItem *>(sipCppV); ^ ../../../../sip/cpp/sip_html2wxWebViewHistoryItem.cpp: In function ‘void* init_type_wxWebViewHistoryItem(sipSimpleWrapper*, PyObject*, PyObject*, PyObject**, PyObject**, PyObject**)’: ../../../../sip/cpp/sip_html2wxWebViewHistoryItem.cpp:109:6: error: ‘::wxWebViewHistoryItem’ has not been declared ::wxWebViewHistoryItem *sipCpp = 0; ^ ../../../../sip/cpp/sip_html2wxWebViewHistoryItem.cpp:109:30: error: ‘sipCpp’ was not declared in this scope ::wxWebViewHistoryItem *sipCpp = 0; ^ ../../../../sip/cpp/sip_html2wxWebViewHistoryItem.cpp:127:27: error: expected type-specifier before ‘::’ token sipCpp = new ::wxWebViewHistoryItem(*url,*title); ^ ../../../../sip/cpp/sip_html2wxWebViewHistoryItem.cpp:134:24: error: type ‘<type error>’ argument given to ‘delete’, expected pointer delete sipCpp; ^ ../../../../sip/cpp/sip_html2wxWebViewHistoryItem.cpp:143:18: error: ‘wxWebViewHistoryItem’ in namespace ‘::’ does not name a type const ::wxWebViewHistoryItem* a0; ^ ../../../../sip/cpp/sip_html2wxWebViewHistoryItem.cpp:145:114: error: ‘a0’ was not declared in this scope if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, "J9", sipType_wxWebViewHistoryItem, &a0)) ^ ../../../../sip/cpp/sip_html2wxWebViewHistoryItem.cpp:148:27: error: expected type-specifier before ‘::’ token sipCpp = new ::wxWebViewHistoryItem(*a0); ^ ../../../../sip/cpp/sip_html2wxWebView.cpp:50:45: error: ‘wxWebView’ was not declared in this scope PyObject* _wxWebView_GetBackwardHistory(wxWebView* self) ^ ../../../../sip/cpp/sip_html2wxWebView.cpp:50:56: error: ‘self’ was not declared in this scope PyObject* _wxWebView_GetBackwardHistory(wxWebView* self) ^ ../../../../sip/cpp/sip_html2wxWebView.cpp:51:5: error: expected ‘,’ or ‘;’ before ‘{’ token { ^ ../../../../sip/cpp/sip_html2wxWebViewHandler.cpp:18:1: error: expected class-name before ‘{’ token { ^ ../../../../sip/cpp/sip_html2wxWebViewHandler.cpp:21:34: error: ‘wxWebViewHandler’ in namespace ‘::’ does not name a type sipwxWebViewHandler(const ::wxWebViewHandler&); ^ ../../../../sip/cpp/sip_html2wxWebViewHandler.cpp: In constructor ‘sipwxWebViewHandler::sipwxWebViewHandler(const wxString&)’: ../../../../sip/cpp/sip_html2wxWebViewHandler.cpp:42:89: error: expected class-name before ‘(’ token sipwxWebViewHandler::sipwxWebViewHandler(const ::wxString& scheme): ::wxWebViewHandler(scheme), sipPySelf(0) ^ ../../../../sip/cpp/sip_html2wxWebViewHandler.cpp:42:89: error: expected ‘{’ before ‘(’ token ../../../../sip/cpp/sip_html2wxWebViewHandler.cpp: At global scope: ../../../../sip/cpp/sip_html2wxWebViewHandler.cpp:42:97: error: expected constructor, destructor, or type conversion before ‘,’ token sipwxWebViewHandler::sipwxWebViewHandler(const ::wxString& scheme): ::wxWebViewHandler(scheme), sipPySelf(0) ^ ../../../../sip/cpp/sip_html2wxWebViewHandler.cpp:42:108: error: expected constructor, destructor, or type conversion before ‘(’ token sipwxWebViewHandler::sipwxWebViewHandler(const ::wxString& scheme): ::wxWebViewHandler(scheme), sipPySelf(0) ^ ../../../../sip/cpp/sip_html2wxWebViewHandler.cpp:47:51: error: ‘wxWebViewHandler’ in namespace ‘::’ does not name a type sipwxWebViewHandler::sipwxWebViewHandler(const ::wxWebViewHandler& a0): ::wxWebViewHandler(a0), sipPySelf(0) ^ ../../../../sip/cpp/sip_html2wxWebViewHandler.cpp: In constructor ‘sipwxWebViewHandler::sipwxWebViewHandler(const int&)’: ../../../../sip/cpp/sip_html2wxWebViewHandler.cpp:47:93: error: expected class-name before ‘(’ token sipwxWebViewHandler::sipwxWebViewHandler(const ::wxWebViewHandler& a0): ::wxWebViewHandler(a0), sipPySelf(0) ^ ../../../../sip/cpp/sip_html2wxWebViewHandler.cpp:47:93: error: expected ‘{’ before ‘(’ token ../../../../sip/cpp/sip_html2wxWebViewHandler.cpp: At global scope: ../../../../sip/cpp/sip_html2wxWebViewHandler.cpp:47:97: error: expected constructor, destructor, or type conversion before ‘,’ token sipwxWebViewHandler::sipwxWebViewHandler(const ::wxWebViewHandler& a0): ::wxWebViewHandler(a0), sipPySelf(0) ^ ../../../../sip/cpp/sip_html2wxWebViewHandler.cpp:47:108: error: expected constructor, destructor, or type conversion before ‘(’ token sipwxWebViewHandler::sipwxWebViewHandler(const ::wxWebViewHandler& a0): ::wxWebViewHandler(a0), sipPySelf(0) ^ ../../../../sip/cpp/sip_html2wxWebViewHandler.cpp: In member function ‘wxString sipwxWebViewHandler::GetName() const’: ../../../../sip/cpp/sip_html2wxWebViewHandler.cpp:65:19: error: ‘::wxWebViewHandler’ has not been declared return ::wxWebViewHandler::GetName(); ^ ../../../../sip/cpp/sip_html2wxWebViewHandler.cpp: In function ‘PyObject* meth_wxWebViewHandler_GetFile(PyObject*, PyObject*, PyObject*)’: ../../../../sip/cpp/sip_html2wxWebViewHandler.cpp:99:10: error: ‘::wxWebViewHandler’ has not been declared ::wxWebViewHandler *sipCpp; ^ ../../../../sip/cpp/sip_html2wxWebViewHandler.cpp:99:30: error: ‘sipCpp’ was not declared in this scope ::wxWebViewHandler *sipCpp; ^ ../../../../sip/cpp/sip_html2wxWebViewHandler.cpp: In function ‘PyObject* meth_wxWebViewHandler_GetName(PyObject*, PyObject*)’: ../../../../sip/cpp/sip_html2wxWebViewHandler.cpp:145:18: error: ‘wxWebViewHandler’ in namespace ‘::’ does not name a type const ::wxWebViewHandler *sipCpp; ^ ../../../../sip/cpp/sip_html2wxWebViewHandler.cpp:147:91: error: ‘sipCpp’ was not declared in this scope if (sipParseArgs(&sipParseErr, sipArgs, "B", &sipSelf, sipType_wxWebViewHandler, &sipCpp)) ^ ../../../../sip/cpp/sip_html2wxWebViewHandler.cpp:154:66: error: ‘::wxWebViewHandler’ has not been declared sipRes = new ::wxString((sipSelfWasArg ? sipCpp-> ::wxWebViewHandler::GetName() : sipCpp->GetName())); ^ ../../../../sip/cpp/sip_html2wxWebViewHandler.cpp: In function ‘void release_wxWebViewHandler(void*, int)’: ../../../../sip/cpp/sip_html2wxWebViewHandler.cpp:180:36: error: ‘wxWebViewHandler’ in namespace ‘::’ does not name a type delete reinterpret_cast< ::wxWebViewHandler *>(sipCppV); ^ ../../../../sip/cpp/sip_html2wxWebViewHandler.cpp:180:53: error: expected ‘>’ before ‘*’ token delete reinterpret_cast< ::wxWebViewHandler *>(sipCppV); ^ ../../../../sip/cpp/sip_html2wxWebViewHandler.cpp:180:53: error: expected ‘(’ before ‘*’ token ../../../../sip/cpp/sip_html2wxWebViewHandler.cpp:180:54: error: expected primary-expression before ‘>’ token delete reinterpret_cast< ::wxWebViewHandler *>(sipCppV); ^ ../../../../sip/cpp/sip_html2wxWebViewHandler.cpp:180:64: error: expected ‘)’ before ‘;’ token delete reinterpret_cast< ::wxWebViewHandler *>(sipCppV); ^ ../../../../sip/cpp/sip_html2wxWebViewHandler.cpp: In function ‘void* init_type_wxWebViewHandler(sipSimpleWrapper*, PyObject*, PyObject*, PyObject**, PyObject**, PyObject**)’: ../../../../sip/cpp/sip_html2wxWebViewHandler.cpp:234:18: error: ‘wxWebViewHandler’ in namespace ‘::’ does not name a type const ::wxWebViewHandler* a0; ^ ../../../../sip/cpp/sip_html2wxWebViewHandler.cpp:236:110: error: ‘a0’ was not declared in this scope if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, "J9", sipType_wxWebViewHandler, &a0)) ^ ../../../../sip/cpp/sip_html2wxWebViewFSHandler.cpp:18:1: error: expected class-name before ‘{’ token { ^ ../../../../sip/cpp/sip_html2wxWebViewFSHandler.cpp:21:36: error: ‘wxWebViewFSHandler’ in namespace ‘::’ does not name a type sipwxWebViewFSHandler(const ::wxWebViewFSHandler&); ^ ../../../../sip/cpp/sip_html2wxWebViewFSHandler.cpp: In constructor ‘sipwxWebViewFSHandler::sipwxWebViewFSHandler(const wxString&)’: ../../../../sip/cpp/sip_html2wxWebViewFSHandler.cpp:42:95: error: expected class-name before ‘(’ token sipwxWebViewFSHandler::sipwxWebViewFSHandler(const ::wxString& scheme): ::wxWebViewFSHandler(scheme), sipPySelf(0) ^ ../../../../sip/cpp/sip_html2wxWebViewFSHandler.cpp:42:95: error: expected ‘{’ before ‘(’ token ../../../../sip/cpp/sip_html2wxWebViewFSHandler.cpp: At global scope: ../../../../sip/cpp/sip_html2wxWebViewFSHandler.cpp:42:103: error: expected constructor, destructor, or type conversion before ‘,’ token sipwxWebViewFSHandler::sipwxWebViewFSHandler(const ::wxString& scheme): ::wxWebViewFSHandler(scheme), sipPySelf(0) ^ ../../../../sip/cpp/sip_html2wxWebViewFSHandler.cpp:42:114: error: expected constructor, destructor, or type conversion before ‘(’ token sipwxWebViewFSHandler::sipwxWebViewFSHandler(const ::wxString& scheme): ::wxWebViewFSHandler(scheme), sipPySelf(0) ^ ../../../../sip/cpp/sip_html2wxWebViewFSHandler.cpp:47:55: error: ‘wxWebViewFSHandler’ in namespace ‘::’ does not name a type sipwxWebViewFSHandler::sipwxWebViewFSHandler(const ::wxWebViewFSHandler& a0): ::wxWebViewFSHandler(a0), sipPySelf(0) ^ ../../../../sip/cpp/sip_html2wxWebViewFSHandler.cpp: In constructor ‘sipwxWebViewFSHandler::sipwxWebViewFSHandler(const int&)’: ../../../../sip/cpp/sip_html2wxWebViewFSHandler.cpp:47:101: error: expected class-name before ‘(’ token sipwxWebViewFSHandler::sipwxWebViewFSHandler(const ::wxWebViewFSHandler& a0): ::wxWebViewFSHandler(a0), sipPySelf(0) ^ ../../../../sip/cpp/sip_html2wxWebViewFSHandler.cpp:47:101: error: expected ‘{’ before ‘(’ token ../../../../sip/cpp/sip_html2wxWebViewFSHandler.cpp: At global scope: ../../../../sip/cpp/sip_html2wxWebViewFSHandler.cpp:47:105: error: expected constructor, destructor, or type conversion before ‘,’ token sipwxWebViewFSHandler::sipwxWebViewFSHandler(const ::wxWebViewFSHandler& a0): ::wxWebViewFSHandler(a0), sipPySelf(0) ^ ../../../../sip/cpp/sip_html2wxWebViewFSHandler.cpp:47:116: error: expected constructor, destructor, or type conversion before ‘(’ token sipwxWebViewFSHandler::sipwxWebViewFSHandler(const ::wxWebViewFSHandler& a0): ::wxWebViewFSHandler(a0), sipPySelf(0) ^ ../../../../sip/cpp/sip_html2wxWebViewFSHandler.cpp: In member function ‘wxFSFile* sipwxWebViewFSHandler::GetFile(const wxString&)’: ../../../../sip/cpp/sip_html2wxWebViewFSHandler.cpp:65:19: error: ‘::wxWebViewFSHandler’ has not been declared return ::wxWebViewFSHandler::GetFile(uri); ^ ../../../../sip/cpp/sip_html2wxWebViewFSHandler.cpp: In member function ‘wxString sipwxWebViewFSHandler::GetName() const’: ../../../../sip/cpp/sip_html2wxWebViewFSHandler.cpp:80:19: error: ‘::wxWebViewFSHandler’ has not been declared return ::wxWebViewFSHandler::GetName(); ^ ../../../../sip/cpp/sip_html2wxWebViewFSHandler.cpp: In function ‘PyObject* meth_wxWebViewFSHandler_GetFile(PyObject*, PyObject*, PyObject*)’: ../../../../sip/cpp/sip_html2wxWebViewFSHandler.cpp:99:10: error: ‘::wxWebViewFSHandler’ has not been declared ::wxWebViewFSHandler *sipCpp; ^ ../../../../sip/cpp/sip_html2wxWebViewFSHandler.cpp:99:32: error: ‘sipCpp’ was not declared in this scope ::wxWebViewFSHandler *sipCpp; ^ ../../../../sip/cpp/sip_html2wxWebViewFSHandler.cpp:112:50: error: ‘::wxWebViewFSHandler’ has not been declared sipRes = (sipSelfWasArg ? sipCpp-> ::wxWebViewFSHandler::GetFile(*uri) : sipCpp->GetFile(*uri)); ^ ../../../../sip/cpp/sip_html2wxWebViewFSHandler.cpp: In function ‘void* cast_wxWebViewFSHandler(void*, const sipTypeDef*)’: ../../../../sip/cpp/sip_html2wxWebViewFSHandler.cpp:134:6: error: ‘::wxWebViewFSHandler’ has not been declared ::wxWebViewFSHandler *sipCpp = reinterpret_cast< ::wxWebViewFSHandler *>(sipCppV); ^ ../../../../sip/cpp/sip_html2wxWebViewFSHandler.cpp:134:28: error: ‘sipCpp’ was not declared in this scope ::wxWebViewFSHandler *sipCpp = reinterpret_cast< ::wxWebViewFSHandler *>(sipCppV); ^ ../../../../sip/cpp/sip_html2wxWebViewFSHandler.cpp:134:57: error: ‘wxWebViewFSHandler’ in namespace ‘::’ does not name a type ::wxWebViewFSHandler *sipCpp = reinterpret_cast< ::wxWebViewFSHandler *>(sipCppV); ^ ../../../../sip/cpp/sip_html2wxWebViewFSHandler.cpp:134:76: error: expected ‘>’ before ‘*’ token ::wxWebViewFSHandler *sipCpp = reinterpret_cast< ::wxWebViewFSHandler *>(sipCppV); ^ ../../../../sip/cpp/sip_html2wxWebViewFSHandler.cpp:134:76: error: expected ‘(’ before ‘*’ token ../../../../sip/cpp/sip_html2wxWebViewFSHandler.cpp:134:77: error: expected primary-expression before ‘>’ token ::wxWebViewFSHandler *sipCpp = reinterpret_cast< ::wxWebViewFSHandler *>(sipCppV); ^ ../../../../sip/cpp/sip_html2wxWebViewFSHandler.cpp:134:87: error: expected ‘)’ before ‘;’ token ::wxWebViewFSHandler *sipCpp = reinterpret_cast< ::wxWebViewFSHandler *>(sipCppV); ^ ../../../../sip/cpp/sip_html2wxWebViewFSHandler.cpp:137:31: error: ‘wxWebViewHandler’ in namespace ‘::’ does not name a type return static_cast< ::wxWebViewHandler *>(sipCpp); ^ ../../../../sip/cpp/sip_html2wxWebViewFSHandler.cpp:137:48: error: expected ‘>’ before ‘*’ token return static_cast< ::wxWebViewHandler *>(sipCpp); ^ ../../../../sip/cpp/sip_html2wxWebViewFSHandler.cpp:137:48: error: expected ‘(’ before ‘*’ token ../../../../sip/cpp/sip_html2wxWebViewFSHandler.cpp:137:49: error: expected primary-expression before ‘>’ token return static_cast< ::wxWebViewHandler *>(sipCpp); ^ ../../../../sip/cpp/sip_html2wxWebViewFSHandler.cpp:137:58: error: expected ‘)’ before ‘;’ token return static_cast< ::wxWebViewHandler *>(sipCpp); ^ ../../../../sip/cpp/sip_html2wxWebViewFSHandler.cpp: In function ‘void release_wxWebViewFSHandler(void*, int)’: ../../../../sip/cpp/sip_html2wxWebViewFSHandler.cpp:152:36: error: ‘wxWebViewFSHandler’ in namespace ‘::’ does not name a type delete reinterpret_cast< ::wxWebViewFSHandler *>(sipCppV); ^ ../../../../sip/cpp/sip_html2wxWebViewFSHandler.cpp:152:55: error: expected ‘>’ before ‘*’ token delete reinterpret_cast< ::wxWebViewFSHandler *>(sipCppV); ^ ../../../../sip/cpp/sip_html2wxWebViewFSHandler.cpp:152:55: error: expected ‘(’ before ‘*’ token ../../../../sip/cpp/sip_html2wxWebViewFSHandler.cpp:152:56: error: expected primary-expression before ‘>’ token delete reinterpret_cast< ::wxWebViewFSHandler *>(sipCppV); ^ ../../../../sip/cpp/sip_html2wxWebViewFSHandler.cpp:152:66: error: expected ‘)’ before ‘;’ token delete reinterpret_cast< ::wxWebViewFSHandler *>(sipCppV); ^ ../../../../sip/cpp/sip_html2wxWebViewFSHandler.cpp: In function ‘void* init_type_wxWebViewFSHandler(sipSimpleWrapper*, PyObject*, PyObject*, PyObject**, PyObject**, PyObject**)’: ../../../../sip/cpp/sip_html2wxWebViewFSHandler.cpp:206:18: error: ‘wxWebViewFSHandler’ in namespace ‘::’ does not name a type const ::wxWebViewFSHandler* a0; ^ ../../../../sip/cpp/sip_html2wxWebViewFSHandler.cpp:208:112: error: ‘a0’ was not declared in this scope if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, "J9", sipType_wxWebViewFSHandler, &a0)) ^ ../../../../sip/cpp/sip_html2wxWebViewFactory.cpp:24:1: error: expected class-name before ‘{’ token { ^ ../../../../sip/cpp/sip_html2wxWebViewFactory.cpp:27:34: error: ‘wxWebViewFactory’ in namespace ‘::’ does not name a type sipwxWebViewFactory(const ::wxWebViewFactory&); ^ ../../../../sip/cpp/sip_html2wxWebViewFactory.cpp:35:8: error: ‘wxWebView’ in namespace ‘::’ does not name a type ::wxWebView* Create( ::wxWindow*, ::wxWindowID,const ::wxString&,const ::wxPoint&,const ::wxSize&,long,const ::wxString&); ^ ../../../../sip/cpp/sip_html2wxWebViewFactory.cpp:36:8: error: ‘wxWebView’ in namespace ‘::’ does not name a type ::wxWebView* Create(); ^ ../../../../sip/cpp/sip_html2wxWebViewFactory.cpp: In constructor ‘sipwxWebViewFactory::sipwxWebViewFactory()’: ../../../../sip/cpp/sip_html2wxWebViewFactory.cpp:48:64: error: expected class-name before ‘(’ token sipwxWebViewFactory::sipwxWebViewFactory(): ::wxWebViewFactory(), sipPySelf(0) ^ ../../../../sip/cpp/sip_html2wxWebViewFactory.cpp:48:64: error: expected ‘{’ before ‘(’ token ../../../../sip/cpp/sip_html2wxWebViewFactory.cpp: At global scope: ../../../../sip/cpp/sip_html2wxWebViewFactory.cpp:48:65: error: expected unqualified-id before ‘)’ token sipwxWebViewFactory::sipwxWebViewFactory(): ::wxWebViewFactory(), sipPySelf(0) ^ ../../../../sip/cpp/sip_html2wxWebViewFactory.cpp:48:77: error: expected constructor, destructor, or type conversion before ‘(’ token sipwxWebViewFactory::sipwxWebViewFactory(): ::wxWebViewFactory(), sipPySelf(0) ^ ../../../../sip/cpp/sip_html2wxWebViewFactory.cpp:53:51: error: ‘wxWebViewFactory’ in namespace ‘::’ does not name a type sipwxWebViewFactory::sipwxWebViewFactory(const ::wxWebViewFactory& a0): ::wxWebViewFactory(a0), sipPySelf(0) ^ ../../../../sip/cpp/sip_html2wxWebViewFactory.cpp: In constructor ‘sipwxWebViewFactory::sipwxWebViewFactory(const int&)’: ../../../../sip/cpp/sip_html2wxWebViewFactory.cpp:53:93: error: expected class-name before ‘(’ token sipwxWebViewFactory::sipwxWebViewFactory(const ::wxWebViewFactory& a0): ::wxWebViewFactory(a0), sipPySelf(0) ^ ../../../../sip/cpp/sip_html2wxWebViewFactory.cpp:53:93: error: expected ‘{’ before ‘(’ token ../../../../sip/cpp/sip_html2wxWebViewFactory.cpp: At global scope: ../../../../sip/cpp/sip_html2wxWebViewFactory.cpp:53:97: error: expected constructor, destructor, or type conversion before ‘,’ token sipwxWebViewFactory::sipwxWebViewFactory(const ::wxWebViewFactory& a0): ::wxWebViewFactory(a0), sipPySelf(0) ^ ../../../../sip/cpp/sip_html2wxWebViewFactory.cpp:53:108: error: expected constructor, destructor, or type conversion before ‘(’ token sipwxWebViewFactory::sipwxWebViewFactory(const ::wxWebViewFactory& a0): ::wxWebViewFactory(a0), sipPySelf(0) ^ ../../../../sip/cpp/sip_html2wxWebViewFactory.cpp:63:4: error: ‘wxWebView’ in namespace ‘::’ does not name a type ::wxWebView* sipwxWebViewFactory::Create( ::wxWindow*parent, ::wxWindowID id,const ::wxString& url,const ::wxPoint& pos,const ::wxSize& size,long style,const ::wxString& name) ^ ../../../../sip/cpp/sip_html2wxWebViewFactory.cpp:78:4: error: ‘wxWebView’ in namespace ‘::’ does not name a type ::wxWebView* sipwxWebViewFactory::Create() ^ ../../../../sip/cpp/sip_html2wxWebViewFactory.cpp: In function ‘PyObject* meth_wxWebViewFactory_Create(PyObject*, PyObject*, PyObject*)’: ../../../../sip/cpp/sip_html2wxWebViewFactory.cpp:108:10: error: ‘::wxWebViewFactory’ has not been declared ::wxWebViewFactory *sipCpp; ^ ../../../../sip/cpp/sip_html2wxWebViewFactory.cpp:108:30: error: ‘sipCpp’ was not declared in this scope ::wxWebViewFactory *sipCpp; ^ ../../../../sip/cpp/sip_html2wxWebViewFactory.cpp:112:14: error: ‘::wxWebView’ has not been declared ::wxWebView*sipRes; ^ ../../../../sip/cpp/sip_html2wxWebViewFactory.cpp:112:26: error: ‘sipRes’ was not declared in this scope ::wxWebView*sipRes; ^ ../../../../sip/cpp/sip_html2wxWebViewFactory.cpp:136:37: error: ‘wxWebViewDefaultURLStr’ was not declared in this scope const ::wxString& urldef = wxWebViewDefaultURLStr; ^ ../../../../sip/cpp/sip_html2wxWebViewFactory.cpp:146:38: error: ‘wxWebViewNameStr’ was not declared in this scope const ::wxString& namedef = wxWebViewNameStr; ^ ../../../../sip/cpp/sip_html2wxWebViewFactory.cpp:149:10: error: ‘::wxWebViewFactory’ has not been declared ::wxWebViewFactory *sipCpp; ^ ../../../../sip/cpp/sip_html2wxWebViewFactory.cpp:149:30: error: ‘sipCpp’ was not declared in this scope ::wxWebViewFactory *sipCpp; ^ ../../../../sip/cpp/sip_html2wxWebViewFactory.cpp:163:14: error: ‘::wxWebView’ has not been declared ::wxWebView*sipRes; ^ ../../../../sip/cpp/sip_html2wxWebViewFactory.cpp:163:26: error: ‘sipRes’ was not declared in this scope ::wxWebView*sipRes; ^ ../../../../sip/cpp/sip_html2wxWebViewFactory.cpp: In function ‘void* cast_wxWebViewFactory(void*, const sipTypeDef*)’: ../../../../sip/cpp/sip_html2wxWebViewFactory.cpp:199:6: error: ‘::wxWebViewFactory’ has not been declared ::wxWebViewFactory *sipCpp = reinterpret_cast< ::wxWebViewFactory *>(sipCppV); ^ ../../../../sip/cpp/sip_html2wxWebViewFactory.cpp:199:26: error: ‘sipCpp’ was not declared in this scope ::wxWebViewFactory *sipCpp = reinterpret_cast< ::wxWebViewFactory *>(sipCppV); ^ ../../../../sip/cpp/sip_html2wxWebViewFactory.cpp:199:55: error: ‘wxWebViewFactory’ in namespace ‘::’ does not name a type ::wxWebViewFactory *sipCpp = reinterpret_cast< ::wxWebViewFactory *>(sipCppV); ^ ../../../../sip/cpp/sip_html2wxWebViewFactory.cpp:199:72: error: expected ‘>’ before ‘*’ token ::wxWebViewFactory *sipCpp = reinterpret_cast< ::wxWebViewFactory *>(sipCppV); ^ ../../../../sip/cpp/sip_html2wxWebViewFactory.cpp:199:72: error: expected ‘(’ before ‘*’ token ../../../../sip/cpp/sip_html2wxWebViewFactory.cpp:199:73: error: expected primary-expression before ‘>’ token ::wxWebViewFactory *sipCpp = reinterpret_cast< ::wxWebViewFactory *>(sipCppV); ^ ../../../../sip/cpp/sip_html2wxWebViewFactory.cpp:199:83: error: expected ‘)’ before ‘;’ token ::wxWebViewFactory *sipCpp = reinterpret_cast< ::wxWebViewFactory *>(sipCppV); ^ ../../../../sip/cpp/sip_html2wxWebViewFactory.cpp: In function ‘void release_wxWebViewFactory(void*, int)’: ../../../../sip/cpp/sip_html2wxWebViewFactory.cpp:217:36: error: ‘wxWebViewFactory’ in namespace ‘::’ does not name a type delete reinterpret_cast< ::wxWebViewFactory *>(sipCppV); ^ ../../../../sip/cpp/sip_html2wxWebViewFactory.cpp:217:53: error: expected ‘>’ before ‘*’ token delete reinterpret_cast< ::wxWebViewFactory *>(sipCppV); ^ ../../../../sip/cpp/sip_html2wxWebViewFactory.cpp:217:53: error: expected ‘(’ before ‘*’ token ../../../../sip/cpp/sip_html2wxWebViewFactory.cpp:217:54: error: expected primary-expression before ‘>’ token delete reinterpret_cast< ::wxWebViewFactory *>(sipCppV); ^ ../../../../sip/cpp/sip_html2wxWebViewFactory.cpp:217:64: error: expected ‘)’ before ‘;’ token delete reinterpret_cast< ::wxWebViewFactory *>(sipCppV); ^ ../../../../sip/cpp/sip_html2wxWebViewFactory.cpp: In function ‘void* init_type_wxWebViewFactory(sipSimpleWrapper*, PyObject*, PyObject*, PyObject**, PyObject**, PyObject**)’: ../../../../sip/cpp/sip_html2wxWebViewFactory.cpp:255:18: error: ‘wxWebViewFactory’ in namespace ‘::’ does not name a type const ::wxWebViewFactory* a0; ^ ../../../../sip/cpp/sip_html2wxWebViewFactory.cpp:257:110: error: ‘a0’ was not declared in this scope if (sipParseKwdArgs(sipParseErr, sipArgs, sipKwds, NULL, sipUnused, "J9", sipType_wxWebViewFactory, &a0)) ^ Waf: Leaving directory `/tmp/pip-install-uc7g8zv4/wxpython/build/waf/3.5/gtk3' Build failed -> task in '_html2' failed with exit status 1 (run with -v to display more information) -> task in '_html2' failed with exit status 1 (run with -v to display more information) -> task in '_html2' failed with exit status 1 (run with -v to display more information) -> task in '_html2' failed with exit status 1 (run with -v to display more information) -> task in '_html2' failed with exit status 1 (run with -v to display more information) Command '"/usr/bin/python3" /tmp/pip-install-uc7g8zv4/wxpython/bin/waf-2.0.7 --wx_config=/tmp/pip-install-uc7g8zv4/wxpython/build/wxbld/gtk3/wx-config --gtk3 --python="/usr/bin/python3" --out=build/waf/3.5/gtk3 configure build ' failed with exit code 1. Finished command: build_py (4m1.752s) Finished command: build (6m9.232s) Command '"/usr/bin/python3" -u build.py build' failed with exit code 1. |
则执行如下命令(显然是编译脚本忘记检查依赖项导致的):
1 |
$ sudo apt-get install libwebkitgtk-3.0-dev |
在macOS High Sierra(10.13.6)
版本上,使用Homebrew
安装python2
的时候出现如下问题:
1 2 3 4 5 6 7 8 9 10 11 12 |
$ brew install python2 Warning: python@2 2.7.15_1 is already installed, it's just not linked You can use `brew link python@2` to link this version. $ brew link python@2 Linking /usr/local/Cellar/python@2/2.7.15_1... Error: Permission denied @ dir_s_mkdir - /usr/local/Frameworks $ sudo brew link python@2 Password: Error: Running Homebrew as root is extremely dangerous and no longer supported. As Homebrew does not drop privileges on installation you would be giving all build scripts full access to your system. |
网上的解决方法是把整个/usr/local
的所有者修改为当前用户,但是新版本的macOS High Sierra(10.13.6)
已经不支持这样操作了,如下:
1 2 |
$ sudo chown -R `whoami` /usr/local chown: /usr/local: Operation not permitted |
那么解决方法如下:
1 2 3 4 5 6 7 |
$ sudo chown -R `whoami` /usr/local/Homebrew/ $ sudo chown -R $(whoami) $(brew --prefix)/* $ sudo mkdir /usr/local/Frameworks $ sudo chown -R `whoami` /usr/local/Frameworks/ |
完成上面的操作后,我们可以看到已经能成功操作了:
1 2 3 4 5 6 7 8 |
$ brew link python@2 Linking /usr/local/Cellar/python@2/2.7.15_1... 5 symlinks created #如果曾经安装过pip可能导致pip被链接到系统的python版本,可是系统目录上各种无权限,因此我们移除已经安装的pip,重新链接pip到brew安装的python $ sudo rm -rf /usr/local/bin/pip $ brew reinstall python2 |
The CC1310 is backwards compatible with the CC1101 described in the above appnote.
在2018
年7
月24
日发布的Chrome 68
中,Google
有一项重大举措就是宣布所有HTTP
网站都会被标识为not secure
,也就是不安全
,并计划在Google
搜索结果里降低HTTP
网站的权重和排名。
实际的效果如下图: