在 CLion 中打开 makefile 项目时,我收到错误消息:
Cannot run program "make" (in directory "D:\Werkstudent\XWF\XT_Einzelauswertung"): CreateProcess error=2, The system cannot find the file specified: CreateProcess error=2, The system cannot find the file specified
Make execution failed with exit code = 127
Run Code Online (Sandbox Code Playgroud)
mingw-w64-x86_64-toolchain
已安装。Build, Execution, Deployment -> Toolchains
我添加了 MinGW 和 Environment C:\msys64\mingw64
。Make、C 编译器和 C++ 编译器都被正确检测到。Build, Execution, Deployment -> Build Tools -> Make
我已将可执行文件的路径设置为C:\msys64\mingw64\bin\mingw32-make.exe
.CLion的相关调试日志:
2020-11-23 10:01:57,997 [ 244797] INFO - …
Run Code Online (Sandbox Code Playgroud) 我想在Windows上使用Go,这是一种使用MSYS2的编程语言.
我应该使用哪个包以及如何避免错误,例如:
package bufio: unrecognized import path "bufio"
package bytes: unrecognized import path "bytes"
package crypto: unrecognized import path "crypto"
package crypto/des: unrecognized import path "crypto/des"
package crypto/hmac: unrecognized import path "crypto/hmac"
package crypto/md5: unrecognized import path "crypto/md5"
package crypto/rand: unrecognized import path "crypto/rand"
package crypto/rc4: unrecognized import path "crypto/rc4"
package crypto/sha256: unrecognized import path "crypto/sha256"
package crypto/tls: unrecognized import path "crypto/tls"
package crypto/x509: unrecognized import path "crypto/x509"
package encoding/base64: unrecognized import path "encoding/base64"
package encoding/binary: unrecognized import path "encoding/binary" …
Run Code Online (Sandbox Code Playgroud) 到目前为止,我已经从https://www.haskell.org/platform/windows.html安装了完整版本
最初,pacman 不起作用,所以我确实以管理员身份运行 mingw64.exe
C:\Program Files\Haskell Platform\8.2.1\msys
Run Code Online (Sandbox Code Playgroud)
我已经更新了运行 pacman -Syu 的 msys2 系统并安装了所有 Gtk 库。我正在尝试使用堆栈编译https://github.com/mmsbrggr/hsudoku。我已经解决了丢失的 dll 错误,现在我得到以下信息:
haskell-gi-base-0.20.4:配置
-- 在构建包 haskell-gi-base-0.20.4 时使用:C:\sr\setup-exe-cache\x86_64-windows\Cabal-simple_Z6RU0evB_1.24.2.0_ghc-8.0.2.exe --builddir=.stack -work\dist\ca59d0ab configure --with-ghc=C:\Users\Jacek\AppData\Local\Programs\stack\x86_64-windows\ghc-8.0.2\bin\ghc.EXE --with-ghc-pkg =C:\Users\Jacek\AppData\Local\Programs\stack\x86_64-windows\ghc-8.0.2\bin\ghc-pkg.EXE --user --package-db=clear --package-db=global --package-db=C:\sr\snapshots\7eb65607\pkgdb --libdir=C:\sr\snapshots\7eb65607\lib --bindir=C:\sr\snapshots\7eb65607\bin --datadir=C: \sr\snapshots\7eb65607\share --libexecdir=C:\sr\snapshots\7eb65607\libexec --sysconfdir=C:\sr\snapshots\7eb65607\etc --docdir=C:\sr\snapshots\7eb65607\doc \haskell-gi-base-0.20.4 --htmldir=C:\sr\snapshots\7eb65607\doc\haskell-gi-base-0.20.4 --haddockdir=C:\sr\snapshots\7eb65607\doc\haskell-gi-base-0.20.4 --dependency=base=base-4.9.1.0 --dependency=bytestring=bytestring-0.10.8.1 --dependency=containers=containers-0.5。 7.1 --dependency=text=text-1.2.2.2-9UQZjEJZQFSGMffj1Z5g00 "--extra-include-dirs=C:\Program Files\Haskell Platform\8.2.1\msys\mingw64\include" "--extra-include-dirs =C:\Program Files\Haskell Platform\8.2.1\msys\mingw64\include\GLIB-2.0" --extra-include-dirs=C:\Users\Jacek\AppData\Local\Programs\stack\x86_64-windows \msys2-20150512\mingw64\include --extra-include-dirs=C:\Users\Jacek\Downloads\glib-2.54.1 "--extra-lib-dirs=C:\Program Files\Haskell Platform\8.2. 1\msys\mingw64\bin" "--extra-lib-dirs=C:\Program Files\Haskell Platform\8.2.1\msys\usr\bin" --extra-lib-dirs=C:\Users\Jacek\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\bin --extra-lib-dirs=C:\Users\Jacek\AppData\Local\Programs\stack\x86_64-windows \msys2-20150512\mingw64\lib 进程退出,代码为:ExitFailure 1 日志已写入:C:\Users\Jacek\Documents\ExperimentingHaskell\hsudoku.stack-work\logs\haskell-gi-base-0.20.4。日志
Run Code Online (Sandbox Code Playgroud)Configuring haskell-gi-base-0.20.4... Cabal-simple_Z6RU0evB_1.24.2.0_ghc-8.0.2.exe: Missing dependencies on …
我试着安装Sass.我之前安装了Ruby和MSYS2,这是所有与Chocolatey的最新产品:
choco install ruby
choco install msys2
Run Code Online (Sandbox Code Playgroud)
看似他们已正确安装.ruby -v
结果是:
ruby 2.5.0p0 (2017-12-25 revision 61468) [x64-mingw32]
Run Code Online (Sandbox Code Playgroud)
当我尝试运行时gem install sass
收到以下错误消息:
ERROR: Error installing sass:
The last version of ffi (< 2, >= 0.5.0) to support your Ruby & RubyGems was 1.9.18. Try installing it with `gem install ffi -v 1.9.18` and then running the current command again
ffi requires Ruby version < 2.5, >= 2.0. The current ruby version is 2.5.0.
Run Code Online (Sandbox Code Playgroud)
好的,所以我试图跑 …
我make
在MSYS2项目中使用,一般没有问题.但是,如果我使用zsh,我无法切换子系统.例如:
source shell mingw64
Run Code Online (Sandbox Code Playgroud)
得到:
/usr/bin/shell:58: bad substitution
Run Code Online (Sandbox Code Playgroud)
显然,shell
脚本中存在bash特定代码,并且脚本是源代码,因为它在调用shell中设置环境变量.
可以修复这个修改shell
代码,但是在下一个代码之后可能会被覆盖或变得不兼容pacman -Syu
.
是否有一个通用的解决方案来源zsh中的源Bash脚本(或特定于切换MSYS子系统的解决方案)?
我是MSYS2的新手,所以我尝试使用pip(mingw-w64-x86_64-python3-pip-9.0.1-3)安装numpy,但安装失败。这是输出:
(...) C 编译器:x86_64-pc-msys-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -march=x86-64 -mtune=generic -氧气管
compile options: '-Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/usr/include/python3.6m -c'
x86_64-pc-msys-gcc: _configtest.c
/usr/bin/bash: x86_64-pc-msys-gcc: command not found
/usr/bin/bash: x86_64-pc-msys-gcc: command not found
failure.
removing: _configtest.c _configtest.o
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-3d852664/numpy/setup.py", line 394, in <module>
setup_package()
File "/tmp/pip-build-3d852664/numpy/setup.py", line 386, in setup_package
setup(**metadata)
File "/tmp/pip-build-3d852664/numpy/numpy/distutils/core.py", line 169, in setup
return old_setup(**new_attr)
File "/usr/lib/python3.6/distutils/core.py", line 148, in …
Run Code Online (Sandbox Code Playgroud) 键入pacman -S gcc时,它将gcc安装在msys2的/ usr / bin中,但是键入pacman -S mingw-w64-x86_64-gcc时,它将安装在/ mingww64 / bin中。
他们之间有什么不同?
考虑下面的C程序.
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char* argv[]) {
double x = 4.5;
double x2 = atof("3.5");
printf("%.6f\n", x);
printf("%.6f\n", x2);
return 0;
}
Run Code Online (Sandbox Code Playgroud)
使用MSYS2提供的GCC版本进行编译时,输出最终取决于SSE的可用性:
$ gcc test.c && ./a.exe
4.500000
3.500000
$ gcc -mno-sse test.c && ./a.exe
4.500000
0.000000
Run Code Online (Sandbox Code Playgroud)
这种行为是否有意义,如果没有,是否有任何方法让GCC在这种情况下产生合理的结果(除了简单的删除之外的解决方案之外-mno-sse
)?这是一些版本信息:
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-msys/7.3.0/lto-wrapper.exe
Target: x86_64-pc-msys
Configured with: /msys_scripts/gcc/src/gcc-7.3.0/configure --build=x86_64-pc-msys --prefix=/usr --libexecdir=/usr/lib --
enable-bootstrap --enable-shared --enable-shared-libgcc --enable-static --enable-version-specific-runtime-libs --with-ar
ch=x86-64 --with-tune=generic --disable-multilib --enable-__cxa_atexit --with-dwarf2 --enable-languages=c,c++,fortran,lt
o --enable-graphite --enable-threads=posix --enable-libatomic --enable-libcilkrts --enable-libgomp …
Run Code Online (Sandbox Code Playgroud) 我想升级我的时候有麻烦便携式Msys2下10场有pacman -Syuu
,详情如下。我之前没有做过这个。
问题和解决方案可能是什么?
$ pacman -Syuu
:: Synchronizing package databases...
mingw32 is up to date
mingw64 is up to date
msys is up to date
:: Starting core system upgrade...
there is nothing to do
:: Starting full system upgrade...
warning: grep: downgrading from version 3.1-1 to version 3.0-2
warning: libgc: downgrading from version 8.0.0-1 to version 7.6.8-1
warning: mingw-w64-x86_64-binutils: downgrading from version 2.31.1-2 to version 2.30-5
:: Replace mingw-w64-x86_64-minizip with mingw64/mingw-w64-x86_64-zlib? [Y/n] y …
Run Code Online (Sandbox Code Playgroud) 我知道以前有人问过类似的问题,但是:
-no-pie
了链接器参数,但仍然没有结果。GNU Prof 的版本是 2.36.1该程序是本教程中的代码,复制如下:
//test_gprof.c
#include<stdio.h>
void new_func1(void)
{
printf("\n Inside new_func1()\n");
int i = 0;
for(;i<0xffffffee;i++);
return;
}
void func1(void)
{
printf("\n Inside func1 \n");
int i = 0;
for(;i<0xffffffff;i++);
new_func1();
return;
}
static void func2(void)
{
printf("\n Inside func2 \n");
int i = 0;
for(;i<0xffffffaa;i++);
return;
}
int main(void)
{
printf("\n Inside main()\n");
int i = …
Run Code Online (Sandbox Code Playgroud)