mingw

Error: default parameter given for parameter 1

Here is my class definition: class MyClass { public: void test(int val = 0); } void MyClass::test(int val = 0) { // } When I try to compile this code I get the error: "default parameter given for parameter 1" It's just a simple function, I don't know what's wrong. I'm using Eclipse + MinGW. ...

GCC destructor behaviour

I've noticed a difference in behaviour for gcc's destructor when compiled under linux and crosscompiled with mingw. On linux the destructor will not get called unless the program terminates normally by itself (returns from main). I guess that kind of makes sense if you take signal handlers into account. On Win32 however, the destructor...

Compiling cpp code in netbeans produce errors, how to solve it ?

i use the netbeans with MinGW and MYSY make /debugger but when i compile a basic cpp code in it and run it it produces two erorrs this is the code runned and the output![alt text][1] box #include <iostream> void main() { cout << "Hello World!" << endl; cout << "Welcome to C++ Programming" << endl; } output is /usr/bin/make -...

link .a and .o files in GCC

hi! I have two precompiled library: X.a and Y.a and a test.cpp (without main function) source code use these two libraries. I compiled the C++ using: g++ -c test.cpp and I got 'test.o'. Now how can I link these three together to generate a .a file because test.cpp use some function in X.a and Y.a and other GCC libraries? BTW, I am...

Using Qt with custom MinGW

Hi, I don't know if this question would fit better on superuser.com, but since it's rather compiler related, I give it a try here. I have to use Qt with a specific version of gcc (4.5). I downloaded the last official Qt release for Windows (Vista, 32 bits version) and didn't install the shipped MinGW version; I just installed the Qt li...

Trying to install MinGW and Tk for Perl on Windows 7

So... I have been trying to get this working for several weeks now. I can install MinGW through the .exe, but no-matter what I do I can't seem to get make support or ppm install MinGW to work in such a way that my compilation of Tk-804.029 will correctly use the 'make' command. (Installing a Perl Module: perl MakeFile.PL - Works fine ...

Globbing with MinGW on Windows

I have an application built with the MinGW C++ compiler that works something like grep - acommand looks something like this: myapp -e '.*' *.txt where the thing that comes after the -e switch is a regex, and the thing after that is file name pattern. It seems that MinGW automatically expands (globs in UNIX terms) the command line so ...

Porting QT application from Linux to Windows?

Greetings all, We are developing a QT application (QT 4.6 LGPL version) in Linux platform.All the libraries we use are cross-platform. Now we want to port it into Windows and continue develop in Windows. My questions are: Which compiler should we use ,Can we use MinGW or Visual C++ compiler? 2.If its Visual C++ compiler, which Visua...

How to boundary check in gcc / mingw?

Having tried this int main(void) { int a[10]; a[20]=5; } gcc -Wall -O2 main.c It gives me no warning... It's gcc within windows (mingw) and I am not able to detect this kind of boundary limit bug how to tell compiler to check it? can mingw do it? thanks ...

Is it possible to access 32-bit registers in C ?

Is it possible to access 32-bit registers in C ? If it is, how ? And if not, then is there any way to embed Assembly code in C ? I`m using the MinGW compiler, by the way. Thanks in advance! ...

Creating lib file from java jar using mingw/gcj

I am trying to convert jar file to native lib file using mingw-gcj under windows platform but it is throwing me the error as C:\testDir\libs>gcj -o glassfish-embedded-all-3.1-SNAPSHOT.lib glassfish-embedde d-all-3.1-SNAPSHOT.jar com/sun/codemodel/JAnonymousClass.java: In class 'com.sun.codemodel.JAnonymousCl ass': com/sun/codemodel/JAn...

How to use iconv in Qt?

I've installed qt-sdk-win-opensource-2010.03 and found an libiconv-2.dll in mingw part of qt distribution. How do I use it (I can't find iconv.h)? Is there a static version of iconv library? ...

GCC on Cygwin coexisting with MinGW

It is possible to have two versions of GCC to coexist: the native windows MinGW version and the cygwin linux version? Things get problematic when on Cygwin the system tries to compile with the MinGW version of GCC, and vice versa. How can I keep both versions of GCC? ...

"Malformed version number string mingw32" when starting rails

My os: windows xp, ruby: 1.8.7, rails: 2.3.5 Everything was fine, but I just installed a "gcc-4.4.0-mingw32-bin", and run gem install rdiscount, then my rails can't start. Now when I run ruby script/server, or rake gems:install, the following error will occur: rake aborted! Malformed version number string mingw32 (See full trace by r...

Is this mingw bug ?

Hi, I have been trying to execute this program on my migw ,through code::blocks, #include <string.h> #include <math.h> #include <stdio.h> #define N 100 int p[N]; int pr[N]; int cnt; void sieve() { int i,j; for(i=0;i<N;i++) pr[i]=1; pr[0]=pr[1]=0; for(i=2;i<N;i++) if(pr[i]) { p[cnt]=i; cnt++; ...

Can I reconstruct C++ source code from debug binaries?

I have a C++ application compiled in debug (using MinGW and Qt) but I've lost some major changes because someone in my team forgot to commit his changes in the source control manager and overwrote the source code with other changes. When I run the program in debug (in Qt Creator) I can set a break point in main and then see the source c...

Creating a SSH key with ssh-keygen does not create the .ssh folder

Hi, I am trying to create my public/private rsa key pair with msysgit I run this command: ssh-keygen -C "[email protected]" -t rsa Everything looks fine, I have the message Enter file in which to save the key (/c/Users/user/.ssh/id_rsa) Then I have the confirmation: Your public key has been saved in project.pub But I can't acce...

Windows C SHA256 Invalid Generation Issue

Hey there. I'm having a very strange problem with creating sha256 hashes. I made a simple C console program that takes a file path as an argument and uses the standalone sha256 code that can be found here. I compiled the program using MinGW 5.1.6 on Windows 7 x64. When testing the program on a file, the resultant hash is wrong. I made s...

Compile EXPAT to statically-linked .a on Windows

I am writing C program on Windows with MingW and want to use EXPAT XML library. I want to compile my program statically, so I need static .a library. Is there any way to compile EXPAT to .a static, independent library on Windows? ...

Ruby FFI on MinGW

I built a (very simple) library, which I can call just fine from another C++ program. But it won't work when I try to get Ruby FFI to link it. It gives FFI::NotFoundError, says it can't find the function exported in the DLL. Where might things have gone wrong? Do I need special treatment when I compile my DLL using g++? I am just bu...