首先,我已经从https://sourceforge.net/projects/mingw/files/和 mingw32-gcc-g++ 和 mingw32-gcc-objs安装了 MinGW 。我已将 C:\MinGW\bin 添加到我的路径中。
其次,我已经为 Windows 安装了 Git(不是很重要,cmd.exe 上的结果是一样的)。
第三,我已经用http://gnuwin32.sourceforge.net/packages/make.htm安装了完整的包“make”
之后,我用 .msi 安装了 cmake 3.5.1。
但是当我运行时cmake ../src,结果是:
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:5 (project):
No CMAKE_C_COMPILER could be found.
CMake Error at CMakeLists.txt:5 (project):
No CMAKE_CXX_COMPILER could be found.
-- Configuring incomplete, errors occurred!
See also "C:/Users/pauka/Dropbox/ETUDE/SRI/S8/STA_Stage/sources/tests/bin/CMakeFiles/CMakeOutput.log".
See also "C:/Users/pauka/Dropbox/ETUDE/SRI/S8/STA_Stage/sources/tests/bin/CMakeFiles/CMakeError.log".
Run Code Online (Sandbox Code Playgroud)
所以cmake找不到gcc或g++。但是当我运行 gcc -version 时,输出很好......我应该为 cmake 配置什么?
我的 CMakeLists.txt …
我正在做一个安装ros的脚本,在安装它之后,使用catkin_make编译工作区.
我找到了解决问题的解决方案,但我无法解释原因.我有一个名为install.bash的文件正在调用其他人:
#!/bin/bash
source 01_install_ros.bash
Run Code Online (Sandbox Code Playgroud)
重要的是01_install_ros.bash:
# variable not set because it is done in the script setup.bash of ros
echo "before source in 01_install_ros"
echo "ROS_ROOT: "$ROS_ROOT
whereis catkin_make
echo ""
echo "source /opt/ros/kinetic/setup.bash" >> $HOME/.bashrc
# doesn't set the variables
source "$HOME"/.bashrc
# the solutions
source /opt/ros/kinetic/setup.bash
# variables not set if I use the source of .bashrc
echo "after source in 01_install_ros"
echo "ROS_ROOT: "$ROS_ROOT
whereis catkin_make
echo ""
Run Code Online (Sandbox Code Playgroud)
正如在评论中所写,采购.bashrc而不是直接setup.bash不起作用.我真的不明白为什么.你能解释一下吗?
我有一个 HTML 表单,用于注册用户。我正在从网络摄像头录制文件,我需要使用表单上传视频文件。
这是我的代码(运行良好):
$("#registration-form").submit(function(event) {
event.preventDefault();
var recordedBlob = recordRTC.getBlob();
var file = new File([recordedBlob], 'filename.webm', {
type: 'video/webm'
});
var formElement = document.getElementById("registration-form");
var formData = new FormData(formElement);
formData.append('appbundle_participant[videoFile][file]', file);
$.ajax({
url: '',
data: formData,
processData: false,
contentType: false,
type: 'POST',
success: function(data) {
// do some stuff
}
});
});
Run Code Online (Sandbox Code Playgroud)
是否可以用 Javascript 提交表单,但其行为与单击提交相同?所以...没有成功或错误功能,只需转到 Web 服务器返回的下一页即可。非常感谢。