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.
...
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...
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 -...
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...
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...
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
...
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 ...
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...
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 ? 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!
...
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...
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?
...
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?
...
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...
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++;
...
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...
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...
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...
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?
...
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...