Page 2 of 2

Re: Installing MinGW / gdb on Winodws

Posted: Sat Sep 08, 2012 9:22 am
by Fred
There is a bug in MinGW 4.6.1 oaidl.h:
http://permalink.gmane.org/gmane.comp.g ... ounce/2392
You can patch it like this:

Code: Select all

/* moved to top to avoid circular dependency with oleauto.h */
#ifndef COM_NO_WINDOWS_H
#include <windows.h>
#include <ole2.h>
#endif

#ifndef _OAIDL_H
#define _OAIDL_H
#if __GNUC__ >= 3
#pragma GCC system_header
#endif
/* causes here circular dependency with oleauto.h -> moved to top
#ifndef COM_NO_WINDOWS_H
#include <windows.h>
#include <ole2.h>
#endif
*/
#ifdef __cplusplus
extern "C" {
#endif
...
Regards,
Fred

Re: Installing MinGW / gdb on Winodws

Posted: Sat Apr 22, 2017 7:05 pm
by meirab100
i use win10 pro/64 bit + codelite 10.0.3 + boost 1.6.3 + mingw gcc/64.
after install and connect to mingw/gcc path, i try to build a simple program:

#include <iostream>
#include <string>
#include <boost/regex.hpp>
using namespace std;
using namespace boost;
int main() {
string s = "This is my simple sample text, really.";
regex re(",|:|-|\s+");
sregex_token_iterator my_iter(s.begin( ), s.end( ), re, -1);
sregex_token_iterator my_end;
while (my_iter != my_end)
cout << *my_iter++ << 'n';
return (EXIT_SUCCESS);
}

and the result i get is (it cannot find the place of: <iostream>):

C:\Windows\system32\cmd.exe /C C:/MinGW/bin/make.exe -j2 SHELL=cmd.exe -e -f Makefile
"----------Building project:[ cl_regex_1 - Debug ]----------"
make.exe[1]: Entering directory 'C:/schmidt_CODELITE/test1/cl_regex_1'
C:/MinGW/bin/gcc.exe -c "C:/schmidt_CODELITE/test1/cl_regex_1/main.c" -g -O0 -Wall -o ./Debug/main.c.o -IC:\boost_1_63_0_GCC -I. -I. -IC:\boost_1_63_0_GCC
C:/schmidt_CODELITE/test1/cl_regex_1/main.c:1:20: fatal error: iostream: No such file or directory
#include <iostream>
^
compilation terminated.
make.exe[1]: *** [cl_regex_1.mk:97: Debug/main.c.o] Error 1
make.exe[1]: Leaving directory 'C:/schmidt_CODELITE/test1/cl_regex_1'
make.exe: *** [Makefile:5: All] Error 2
====1 errors, 0 warnings====

what am i missing with codelite settings?

Re: Installing MinGW / gdb on Winodws

Posted: Sun Apr 23, 2017 11:55 am
by eranif
C:/MinGW/bin/gcc.exe -c "C:/schmidt_CODELITE/test1/cl_regex_1/main.c" -g -O0 -Wall -o ./Debug/main.c.o -IC:\boost_1_63_0_GCC -I. -I. -IC:\boost_1_63_0_GCC
Notice that you are writing C++ code in a .C file. You should rename main.c to main.cpp so it will get compiled with g++ and not gcc

Eran