Riccardo Mottola | 15 May 01:13 2016
Picon

debugprocess declaration

Hi,

I want to add a call to DebugBreakProcess to a windows port of an 
application (simulate the sending of a signal.

I added the following:

#undef _WIN32_WINNT
#define _WIN32_WINNT 0x0501 // Minimal target is Windows XP

#include <windows.h>
#include <winbase.h>

yet still I get a missing declaration and a linking issue with 
DebugBreakProcess when I build

In winbase.h I see:

#if (_WIN32_WINNT >= 0x0501)
WINBASEAPI BOOL WINAPI DebugBreakProcess(HANDLE);

which looks exactly as what I need

As a quick hack, I just slapped the above declaration in my source file 
and it compiles, links and works.

Thus I have an issue the way I include and define the windows version I 
suppose, but where/how/why?

Riccardo
(Continue reading)

Samuel Clark | 12 May 18:58 2016
Picon

Issues with IFileDialog

Been running into issues while trying to get some native dialogs on Windows. I was able to get things to work fine using GetSaveFileName and GetOpenFileName, but the problem is that I also need to be able to select directories sometimes and don't want to use SHBrowseForFolder due to the dialog looking outdated. For this purpose I was switching over to the IFileDialog APIs, but have been getting errors while trying to compile the following.

[[win.cpp]]
#include <windows.h>
#include <shlobj.h>
#include <shlwapi.h>
#include <shobjidl.h>
#include <stdio.h>
int main(int argc, char** argv)
{
  CoInitialize(NULL);
  HRESULT hr = S_OK;
  IFileDialog* pfd = NULL;
  hr = CoCreateInstance(CLSID_FileOpenDialog, NULL, CLSCTX_INPROC_SERVER,, IID_PPV_ARGS(&pfd));
  if (SUCCEEDED(hr)) {
    hr = pfd->SetTitle(L"Select a File");
    hr = pfd->Show(NULL);
    if (SUCCEEDED(hr)) {
      printf("selected\n");
    } else {
      printf("nothing selected\n");
    }
  }
}

[[compilation output]]
i686-w64-mingw32-g++ -o win win.cpp -Wl,-subsystem,windows
win.cpp: In function 'int main(int, char**)':
win.cpp:19:13: error: invalid use of incomplete type 'IFileDialog {aka struct IFileDialog}'
     hr = pfd->SetTitle(L"Select a File");
             ^
In file included from /usr/i686-w64-mingw32/sys-root/mingw/include/shlobj.h:124:0,
                 from win.cpp:3:
/usr/i686-w64-mingw32/sys-root/mingw/include/shobjidl.h:672:19: note: forward declaration of 'IFileDialog {aka struct IFileDialog}'
 typedef interface IFileDialog IFileDialog;
                   ^
win.cpp:20:13: error: invalid use of incomplete type 'IFileDialog {aka struct IFileDialog}'
     hr = pfd->Show(NULL);
             ^
In file included from /usr/i686-w64-mingw32/sys-root/mingw/include/shlobj.h:124:0,
                 from win.cpp:3:
/usr/i686-w64-mingw32/sys-root/mingw/include/shobjidl.h:672:19: note: forward declaration of 'IFileDialog {aka struct IFileDialog}'
 typedef interface IFileDialog IFileDialog;
                   ^
In file included from /usr/i686-w64-mingw32/sys-root/mingw/include/objbase.h:14:0,
                 from /usr/i686-w64-mingw32/sys-root/mingw/include/ole2.h:17,
                 from /usr/i686-w64-mingw32/sys-root/mingw/include/wtypes.h:12,
                 from /usr/i686-w64-mingw32/sys-root/mingw/include/winscard.h:10,
                 from /usr/i686-w64-mingw32/sys-root/mingw/include/windows.h:97,
                 from win.cpp:1:
/usr/i686-w64-mingw32/sys-root/mingw/include/combaseapi.h: In instantiation of 'void** IID_PPV_ARGS_Helper(T**) [with T = IFileDialog]':
win.cpp:16:75:   required from here
/usr/i686-w64-mingw32/sys-root/mingw/include/combaseapi.h:79:5: error: invalid static_cast from type 'IFileDialog*' to type 'IUnknown*'
     static_cast<IUnknown *> (*pp);


This was compiled using the latest packages on Fedora 23, but I was having similar issues on Windows 10 running MSYS2. I was able to compile and run a larger test program in Visual Studio (also on Windows 10) that used the same APIs, so I'm not sure if there's just something I'm failing to pass into the compiler through the command line or if there's an issue in shlobj.h or shobjidl.h. If somebody could point me in the right direction or confirm/deny that there's an issue using these APIs when compiling with MinGW it would be greatly appreciated.

Thanks
------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
MinGW-users mailing list
MinGW-users@...

This list observes the Etiquette found at 
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:mingw-users-request@...?subject=unsubscribe
Lee Shallis | 11 May 10:44 2016
Picon

How do I grab a variable set via shell?

Here's my code snippet:

HEAD_PATH:=$(WKSDIR).git$(DIRSEP)logs$(DIRSEP)HEAD
$(info PATH=$(HEAD_PATH))
HEAD_SAFEP:=$(subst \,\\,$(HEAD_PATH))
$(info SAFEP=$(HEAD_SAFEP))
HEAD_COUNT_STR:=$(shell find /c " +" $(HEAD_PATH))
VARBEG:=%
VAREND:=%
$(info COUNT_STR=$(HEAD_COUNT_STR))
# % ignores case so we don't need to go out of our way to convert our path to
# uppercase however it only works in patsubst which ignores the ----------
# before the path so we get subst to remove the left over leaving the number we
# wanted
sh_let:=set /a
HEAD_COUNT:=$(subst ---------- ,,$(patsubst %:,,$(HEAD_COUNT_STR)))
$(info COUNT=$(HEAD_COUNT))
HEAD_NMONE_STR:=$(shell $(sh_let) math_result=$(HEAD_COUNT)-1)
HEAD_NMONE:=$(shell echo $(math_result))
$(info NMONE=$(HEAD_NMONE))
HEAD_LASTL:=$(shell more +$(HEAD_NMONE) $(HEAD_PATH))
$(info LASTL=$(HEAD_LASTL))

I also highlighted the key snippet, I eventually figured out how to perform arithmetic without extra programs being installed but I still have the issue of grabbing the result to confirm it worked correctly, does anyone have experience of this sort of thing?
------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
MinGW-users mailing list
MinGW-users@...

This list observes the Etiquette found at 
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:mingw-users-request@...?subject=unsubscribe
LI An-Bang | 7 May 05:21 2016

How to enable national language support (NLS) and install lanugage packge?

Hi, all,

I am a Chinese user of MinGW on Windows. I want MinGW to write out compiling messages in Chinese. 

After some search and analysis on Internet, I realized that I should enable MinGW's  national language support (NLS), and I also noticed that the released version has configured with "--disable-nls".

So, my question is, how can I enable national language (NLS) support  and install lanugage packge?

Thanks in advance.

------------------
LI AnBang
Physics Department, Central China Normal University, China
 
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
MinGW-users mailing list
MinGW-users@...

This list observes the Etiquette found at 
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:mingw-users-request@...?subject=unsubscribe
raynebc . | 29 Apr 23:47 2016
Picon

msys-regex missing from mingw-get

I'm finding that neither the GUI nor command line versions of mingw-get offer this library (just some documentation packages).  I was able to get it from MinGW's SourceForge page and it seemed to work.  Was there a reason mingw-get doesn't offer it?
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
MinGW-users mailing list
MinGW-users@...

This list observes the Etiquette found at 
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:mingw-users-request@...?subject=unsubscribe
Daniel Bastos | 27 Apr 23:34 2016

on cc1.exe freezes on windows10

I use mingw currently on two windows systems, a windows10 and a
windows8.  On windows8, I compile programs with no problems.  On
windows10, trying to compile the same programs often causes cc1.exe to
freeze.  (Also I notice a much longer period during compilation.)

Here's a lucky run, where cc1.exe froze just once.  It froze compiling
scan_in32.c.  I kill the process and restart.  I've been working like
this for a while; it's painful.

%make
gcc  -g -Wall -c qsort.c
gcc -g -Wall -c strerr.c
gcc -g -Wall -c scan_int32.c
Makefile:60: recipe for target 'scan_int32.o' failed
make: *** [scan_int32.o] Error 1
%make
gcc -g -Wall -c scan_int32.c
gcc -g -Wall -c sort.c
gcc -g -Wall -c list.c
ar cr sort.a sort.o scan_int32.o list.o
gcc -o qsort qsort.o strerr.o sort.a
gcc  -g -Wall -c msort.c
gcc -o msort msort.o strerr.o sort.a
gcc  -g -Wall -c isort.c
gcc -o isort isort.o strerr.o sort.a
gcc  -g -Wall -c binsearch.c
gcc -o binsearch binsearch.o strerr.o list.o scan_int32.o -lm
%

On windows8, I guarantee I only installed these.  (They're working
fine.)

libgmp-5.1.2-1-mingw32-dll-10.tar
libmpfr-3.1.2-2-mingw32-dll-4.tar
libintl-0.18.3.2-2-mingw32-dll-8.tar.xz
mingwrt-3.21.1-mingw32-dll.tar.xz
w32api-3.17-2-mingw32-dev.tar.lzma
mingwrt-3.21.1-mingw32-dev.tar.xz
binutils-2.25.1-1-mingw32-bin.tar.xz
libmpc-1.0.2-mingw32-dll-3.tar.xz
libquadmath-4.9.3-1-mingw32-dll-0.tar.xz
libiconv-1.14-3-mingw32-dll-2.tar
libgcc-4.9.3-1-mingw32-dll-1.tar.xz
libz-1.2.8-1-mingw32-dll-1.tar
gdb-7.6.1-1-mingw32-bin.tar.lzma
make-3.82.90-2-mingw32-cvs-20120902-bin.tar.lzma
gcc-4.9.3-1-mingw32-lic.tar.xz
gcc-core-4.9.3-1-mingw32-bin.tar.xz
mingw32-base-2013072200-mingw32-bin.meta

On windows10, I seem to have only 

  mingw32-base-2013072200-mingw32-bin.meta.

(I copied this string by hand from mingw-get.exe.)  This meta package
seems to include all the packages above, but I can't confirm this.

So, anyway, it seems to be something particularly related to windows10.
I'd love to get you guys' wisdom on this one.  I really appreciate it!

Thank you!

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
MinGW-users mailing list
MinGW-users@...

This list observes the Etiquette found at 
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:mingw-users-request@...?subject=unsubscribe

Kağan Tantan | 21 Apr 16:33 2016
Picon

is there a way to adding custom sections consecutively with mingw32-gcc linker ?

Hi,
In my source codes, i want to define some variable under different sections and these sections can be defined in different .c files. My desire, while i am compiling and linking source code, these sections will be added consecutively in memory with linker options command or compiler options command.
For example,
In section1, i defined two integer (var1, var2) and in section2, i also defined two integer variable(var3, var4).
After compiling, if var1's address is 00403000, var3's address should be 00403008.

Does any know of a way to do those things on windows with mingw linker? Thanks in advance! and sorry for my sloppy english.
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
MinGW-users mailing list
MinGW-users@...

This list observes the Etiquette found at 
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:mingw-users-request@...?subject=unsubscribe
S S | 20 Apr 22:23 2016
Picon

Maximum header file size in MinGW

Hi Folks,


I am getting an "Invalid argument" error when trying to compile a C++ program of mine using MinGW (mingw32-g++).

The problem seems to be created by one of my header which contains a fairly sizeable array of around 150,000 elements. The file size ends up being ~900KiB.

I chopped down at the array and when I get to a file size of 100KiB or around 18,000 elements the program then compiles. At 200KiB file size or around 36,000 element the error returns.


Is there a file or array size limitation in MinGW?


Sébastien

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
MinGW-users mailing list
MinGW-users@...

This list observes the Etiquette found at 
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:mingw-users-request@...?subject=unsubscribe
ralph engels | 17 Apr 00:19 2016
Picon

binutils-2.26 regression

Just a precautionary warning, the binutils-2.26 package should not be 
used since it has been discovered that it has several regressions that 
breaks builds. Stay with 2.25 untill these have been fixed.

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
MinGW-users mailing list
MinGW-users@...

This list observes the Etiquette found at 
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:mingw-users-request@...?subject=unsubscribe

Eli Zaretskii | 16 Apr 16:12 2016
Picon

MinGW GCC 5.3.0 doesn't work on Windows XP

I cannot compile any programs with this version of GCC on a Windows XP
SP3 machine: cc1.exe pops up an error dialog saying "The procedure
entry point strnlen could not be located in the dynamic link library
msvcrt.dll".

Does this mean MinGW no longer supports Windows XP?  I hope not.

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
MinGW-users mailing list
MinGW-users@...

This list observes the Etiquette found at 
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:mingw-users-request@...?subject=unsubscribe

Eli Zaretskii | 12 Apr 21:30 2016
Picon

Import libraries without DLL in GCC 5.3.0 distro

First, thanks for making GCC 5.3.0 available from the MinGW site.

I have a question: I see in gcc-core a few .dll.a import libraries
that don't seem to have the matching DLLs.  The ones I saw:
libatomic.dll.a, libvtv.dll.a, and libvtv_stubs.dll.a.  Can someone
explain what are those, and why aren't there DLLs to go with them?  Or
did I miss some tarball?

TIA

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
MinGW-users mailing list
MinGW-users@...

This list observes the Etiquette found at 
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:mingw-users-request@...?subject=unsubscribe


Gmane