mingw32

How would I build Box2D to work in Code::Blocks/Mingw32(Windows)

旧街凉风 提交于 2019-11-30 17:20:36
问题 hey the title pretty much says it all. i have been trying different methods from internet sources, but whenever i try something goes wrong..this is where i got Box2D in cMake, i get a bunch of errors when building it(i was going through the steps in the readme.txt, but onfortunately, theyre for Visual C++...) so im wondering hot to set this up as i guess a library (.lib or .a) and use it in my project(my friend passed me his library and when i loaded it in and tried #include ing the box2D

Massive fprintf speed difference without “-std=c99”

限于喜欢 提交于 2019-11-30 06:26:20
I had been struggling for weeks with a poor-performing translator I had written. On the following simple bechmark #include<stdio.h> int main() { int x; char buf[2048]; FILE *test = fopen("test.out", "wb"); setvbuf(test, buf, _IOFBF, sizeof buf); for(x=0;x<1024*1024; x++) fprintf(test, "%04d", x); fclose(test); return 0 } we see the following result bash-3.1$ gcc -O2 -static test.c -o test bash-3.1$ time ./test real 0m0.334s user 0m0.015s sys 0m0.016s As you can see, the moment the "-std=c99" flag is added in, performance comes crashing down: bash-3.1$ gcc -O2 -static -std=c99 test.c -o test

My .bashrc file not executed on Git Bash startup (Windows 7)

◇◆丶佛笑我妖孽 提交于 2019-11-30 06:23:37
问题 This is what I did: cd ~ touch .bashrc notepad .bashrc and the content of my .bashrc is (found on the web somewhere): SSH_ENV="$HOME/.ssh/environment" # start the ssh-agent function start_agent { echo "Initializing new SSH agent..." # spawn ssh-agent ssh-agent | sed 's/^echo/#echo/' > "$SSH_ENV" echo succeeded chmod 600 "$SSH_ENV" . "$SSH_ENV" > /dev/null ssh-add } # test for identities function test_identities { # test whether standard identities have been added to the agent already ssh-add

How to add a path to LDFLAGS

China☆狼群 提交于 2019-11-30 03:52:50
I'm trying to set up a library called PBC (Pairing-based cryptography). And this library requires another library called GMP -(GNU Multiple-Precision Library). My problem is after installing GMP correctly, PBC gives an error of: gmp library not found add its path to LDFLAGS I have no idea what LDFLAGS is and how to add it to the path. PS: I'm using MinGW. The question is not really descriptive enough for anyone to answer well, but.... On a Unix-based system you would likely do something like this: $ export LDFLAGS="-R/the/path/to/the/gmp/lib -L/the/path/to/the/gmp/lib" $ ./configure $ make $

how to generate pdb files while building library using mingw?

余生颓废 提交于 2019-11-30 03:15:19
问题 I am cross compiling from linux to windows using the mingw32 tools. I need to generate pdb files for debugging on windows. Is there a way to do this? 回答1: this project gives you the ability to generate the pdb, it works in most cases for debuging : https://github.com/rainers/cv2pdb more details can help in this post about post mortem debugging http://blog.morlad.at/blah/mingw_postmortem 回答2: GCC/MinGW produces debug info in its own format used by GNU GDB Debugger, there is no support for

Linking with -static-libstdc++ flag on MinGW 4.7.1 [closed]

一曲冷凌霜 提交于 2019-11-29 18:22:57
问题 I try to compile (Allegro 5) on MinGW 4.7.1 (using Code::Blocks 12.11 on Win 7) with compiler flags (write them in Project :: Linker settings :: Other linker settings): -static-libgcc -static-libstdc++ Result: unrecognized command line option '-static-libstdc++' How to solve it? 回答1: What does g++ --version say? I don't know the exact version when it was introduced, but -static-libstdc++ is a fairly recent addition. Before, you had to do something like -static -lstdc++ -dynamic . (If the

Where is vimrc or vim profile for github's mingw32 shell on a Windows machine?

对着背影说爱祢 提交于 2019-11-29 03:17:53
Cygwin has a home directory where I can store a .vimrc file to set up syntax highlighting. I know on linux machines this file is usually in a home directory and that it can be stored globally (although I haven't figure out how the global thing works yet). I'm windows user (I apologize), so I use different shells for different things, and am not all too sure why syntax highlighting is not working when I launch it from the git bash shell. It works fine for cygwin and for putty. but not so much for git's mingw32. Another thing is that when I ssh to a remote server using cygwin, I cannot use Vim,

MinGW-w32 vs. MinGW

泄露秘密 提交于 2019-11-28 21:09:05
What's the difference between the MinGW project and the 32-bit portion of the MinGW-w64 project? Does the 32-bit portion of MinGW-w64 have any relation to x64 at all? It seems like their compilers do the exact same things... One looks like it "cross compiles", from 64 bit to 32 bit, whereas the other looks native. That was just a quick look though, so I could be a long long way off the mark here...... EDIT: This is only somewhat true. A better explanation is provided here The MinGW from http://www.mingw.org/ does only support gcc 32 bit (host and target). The independent minGW-w64 project

My .bashrc file not executed on Git Bash startup (Windows 7)

断了今生、忘了曾经 提交于 2019-11-28 17:19:31
This is what I did: cd ~ touch .bashrc notepad .bashrc and the content of my .bashrc is (found on the web somewhere): SSH_ENV="$HOME/.ssh/environment" # start the ssh-agent function start_agent { echo "Initializing new SSH agent..." # spawn ssh-agent ssh-agent | sed 's/^echo/#echo/' > "$SSH_ENV" echo succeeded chmod 600 "$SSH_ENV" . "$SSH_ENV" > /dev/null ssh-add } # test for identities function test_identities { # test whether standard identities have been added to the agent already ssh-add -l | grep "The agent has no identities" > /dev/null if [ $? -eq 0 ]; then ssh-add # $SSH_AUTH_SOCK

Undefined reference to `_imp__glewInit@0'

倾然丶 夕夏残阳落幕 提交于 2019-11-28 11:23:10
I have built the glew lib so many times. My last build removed the undefined references to all the shader functions such as glCreateShader() . I think this build is the correct one cause I found out that Code:Blocks can open Visual Studio 6.0 projects so it had everything laid out for me. I can compile my app without calling glewInit() but it results in a SEGFAULT right when glCreateShader() is called. Which is caused by not Initializing glew. I need to turn it on but it wont let me XD links: mingw32, glew32, opengl32, glu32, glut32 IDE: Code::Blocks Compiler:MinGW32 Save yourself a lot of