cygwin

(1)为什么转向ubantu?

浪子不回头ぞ 提交于 2020-08-10 17:21:27
http://bbs.eeworld.com.cn/thread-1075703-1-1.html linux不熟 makefile不熟 window开发stm32很熟 目前在win10下编译micropython,用mingw64,这是msysgit自带的。 我说的micropython是v1.9以后的版本 编译大部分都是可以的,比如stm32下面的所有板卡,bare文件 也可以。不过需要改一下(在编译mpy-cross的时候就发生错误,所以就知道要改了,现在想来在windows下生成.exe文件。而在linux生成没有后缀。所以需要改makefile,比如编译stm32f4disc这个板卡,需要改py下的两个mk文件和stm32下的makefile.) 在用mingw64时候 用mingw32-make.exe 指令不用linux下的make指令。 目前仅仅编译minimal无法成功,因为这个调用了python3编译器,可能是为了生成那个frozen的c文件。linux的python3安装路径是usr/bin/env,但是我在window下py3不是在这个路径下的,所以还得改makefile,但是前面我说了,我makefile不熟。目前不会改。 事实上目前我若不用mingw64还用cygwin的话,是很可能会解决这个问题的,但是也不见得很顺利。 但是从长期看

Why are the random numbers all the same with MSYS2?

℡╲_俬逩灬. 提交于 2020-08-10 05:20:06
问题 I am trying to generate random numbers using std::random_device but each time I run the program they are the same. I tried the same code using an online IDE and it ran as expected. According to an answer here, this is a bug in Cygwin and MSYS2. How can I upgrade MSYS2? I tried running the commands pacman -Syu and pacman -Su in its terminal but it had errors: MSYS ~ $ pacman -Syuu error: mingw32: key "4A6129F4E4B84AE46ED7F635628F528CF3053E04" is unknown error: key

collect2: error: ld terminated with signal 11 [Segmentation fault], core dumped

不打扰是莪最后的温柔 提交于 2020-07-29 12:12:04
问题 I was learning OpenGL using GLFW, and didn't have a great understanding of makefiles at the time. I had OpenGL working, but I decided to learn makefiles more. I came up with this after a lot of websites, hours, and trial and error: EXENAME = "OpenGL Demo" CC = gcc SRCS = ../src/OpenGLDemo.c OBJS = $(SRCS: .c = .o) CFLAGS = -Wall -g -c LIBS = -L./libs -lglfw3 C:/Windows/SysWOW64/opengl32.dll C:/Windows/SysWOW64/glu32.dll all: opengldemo exe exe: $(OBJS) $(CC) $(OBJS) -o $(EXENAME) $(LIBS)

win10下安装cygwin全过程

时间秒杀一切 提交于 2020-07-28 20:52:13
简单讲:cygwin就是在windows系统上跑linux和unix的环境,跨平台移植的应用程序移植。 安装步骤: 下载cygwin: 打开官网https://cygwin.com/install.html 有64位和32位的安装包,选择适合自己系统的安装包。 下载完成后会发现是个应用程序,setup-x86_64.exe(64位系统下),双击exe。 点击下一步。。。 选择第一个。。 自定义路径。。 一直点击下一步。。 在红箭头处,输入国内阿里云的代码网址 http://mirrors.aliyun.com/cygwin/ 然后点击add按钮,然后一直执行下一步。。 这是创建的命令行终端的桌面图标 这样cygwin已经安装完成。 双击图标,进入命令行界面,输入,cygcheck -c cygwin,可以查看当前的cygwin的版本信息。 这里还没装gcc/g++的编译环境。。 命令行进入setup-x86_64.exe目录下,执行 setup-x86_64.exe -q -P wget -P gcc-g++ -P make -P diffutils -P libmpfr-devel -P libgmp-devel -P libmpc-devel 就让界面一直跑着,安装完会有如下提示: 这个时候再去Cygwin64 Terminal 输入命令 gcc --version查看版本信息

批处理文件以删除超过N天的文件

谁说我不能喝 提交于 2020-07-28 06:25:57
问题: I am looking for a way to delete all files older than 7 days in a batch file. 我正在寻找一种删除批处理文件中所有7天以上的文件的方法。 I've searched around the web, and found some examples with hundreds of lines of code, and others that required installing extra command line utilities to accomplish the task. 我在网上搜索,发现了一些包含数百行代码的示例,还有一些示例需要安装额外的命令行实用程序才能完成任务。 Similar things can be done in BASH in just a couple lines of code. 只需几行代码即可 在BASH 中 完成 类似的操作。 It seems that something at least remotely easy could be done for batch files in Windows. 似乎可以对Windows中的批处理文件至少进行一些远程操作。 I'm looking for a solution that works in a

Cygwin PHP Windows 10 Out of memory

喜欢而已 提交于 2020-07-18 21:03:07
问题 4.5 GB of available system memory. Array only takes up ~4 MB. phpinfo() reports the one and only /etc/php.ini (no web servers, no hosted environment, just my home computer). /etc/php.ini has memory_limit=-1 . ini_get('memory_limit') reports -1 as expected. Simplest possible dynamic array assignment, yet php does exit(255) and reports "Out of memory". temp.php <?php register_shutdown_function(function() { if($error = error_get_last()) { var_dump($error); var_dump(debug_backtrace()); passthru(

Cygwin gitk issue

China☆狼群 提交于 2020-07-17 00:27:34
问题 I have recently installed all of the X11 packages in the cygwin setup and now have is massive annoying error with not being able to see gitk. Everything was working perfectly well until I installed this stuff. Before I had this issue I didn't really note done any of the configuration I merely started xwinserver went to my branch and typed gitk and everything appeared. Now I have to put in my display as it claims the display is not set. I export my display settings check that it is set

How do I install gcc on cygwin?

本小妞迷上赌 提交于 2020-07-15 05:50:23
问题 $ uname -r 2.9.0(0.318/5/3) I don't have the gcc or the g++ command on my path after I install cygwin. What packages do I need to install to get this command? 回答1: $ cygcheck -p bin/gcc Found 8 matches for bin/gcc gcc-core-6.4.0-1 - gcc-core: GNU Compiler Collection (C, OpenMP) gcc-core-6.4.0-2 - gcc-core: GNU Compiler Collection (C, OpenMP) gcc-core-6.4.0-3 - gcc-core: GNU Compiler Collection (C, OpenMP) ... so you need to install the gcc-core package. https://cygwin.com/packages/x86_64/gcc

Why can't I fix the cygwin1.dll mismatch issue?

ぐ巨炮叔叔 提交于 2020-07-10 07:47:06
问题 I'm trying to execute a .sh script (that wasn't written by me) and I get the following error: 0 [main] echo (5320) C:\Program Files\Git\usr\bin\echo.exe: *** fatal error - cygheap base mismatch detected - 0x180343408/0x180317408. This problem is probably due to using incompatible versions of the cygwin DLL. Search for cygwin1.dll using the Windows Start->Find/Search facility and delete all but the most recent version. The most recent version should reside in x:\cygwin\bin, where 'x' is the

Bash: can't launch a program created with make on linux

此生再无相见时 提交于 2020-06-29 04:14:11
问题 I want to build my program using make and then launch the created executable via bash script, but bash can't find the executable, although it was created and i can launch it manually. The problem only exist on linux mint 19 in Gnome-terminal. Edit: The exact error message is: "/path/to/my/executable: no such file or directory" I have a cross-platform project where i need to run cmake, then build the project and finally launch the created executable. I have a bash script to automate the