Hanzac Chen | 1 Apr 07:08 2005
Picon

Getopt and Argp

Hi,

I found that in the MingW libc, there's only two functions of option
parsing (getopt and getopt_long both implemented in mingwex).

and the getopt_long_only and argp are really useful when we want to
port some GNU tools, etc. So how about porting the getopt and argp
from GLibC?

Bye,
Hanzac

-------------------------------------------------------
This SF.net email is sponsored by Demarc:
A global provider of Threat Management Solutions.
Download our HomeAdmin security software for free today!
http://www.demarc.com/info/Sentarus/hamr30
_______________________________________________
MinGW-users mailing list
MinGW-users@...

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users

Keith MARSHALL | 1 Apr 12:18 2005

Re: [Mingw-users] MSYS_PREFIX_HACK

Earnie Boyd wrote:
>> 1) Variable `ac_default_prefix' is explicitly initialised,
>>    as `ac_default_prefix=/usr/local'
>>
>> 2) Variable `prefix' is explicitly initialised, as
>>    `prefix=NONE'
>>
>
> Relative paths are not converted so the value of prefix will be 
unchanged.
>
>> 3) Command line arguments are parsed; if `--prefix=value'
>>    is specified, then variable `prefix' is redefined, as
>>    `prefix=value'
>>
>> Then, when we get to the AC_OUTPUT phase, I see:
>>
>>   `test "x$prefix" = xNONE && prefix=$ac_default_prefix'
>
> So when prefix is set to /usr/local it is converted to the win32 path
> (E.G.: C:/MSYS/1.0/local).  I've used my change enough now to know that 
it
> works well.  I want to do a few more configure exercises before I upload 
a
> snapshot.

That seems pretty much what we want, for the purposes of configuring and
making autotool managed packages.  However, still playing devil's 
advocate,
my concern is not that this won't work -- I'm sure you've made it work
(Continue reading)

Christopher Nelson | 1 Apr 19:45 2005

RE: Re: GCC code generation bug


> >If you notice at
> >
> > 8000e25d:	f0 0f bc d2          	lock bsf %edx,%edx
> >
> > The instruction is generated using the same register as source and
> > destination.  However,
> >
> >      asm volatile("lock; bsfl %1, %0"
> >                    : "=r" (bit)
> > 		     : "rm" (_libkernel_portmap) );
> 
> Nothing about this asm statement prevents the same register being used
> for the source and destination.
> 
> >Obviously the code is incorrect since the %edx register is not
correctly
> >sourced afterwards.  (Meaning, on entry to that instruction %edx
> >contains the base address of the array, and afterwards its also
expected
> >to contain that value.  (Consider the lea on 8000e264).
> 
> No, the %edx register is used correctly.  The "lea" instruction is
part of
> the "port = (index<<5) + (bit);" statement in your code.  This
instruction
> adds %edx ("bit") to %eax ("index << 5") and stores the result in %ebx
> ("port").  After the "lea" instruction your code breaks from the loop
> and the value in %edx ("bit") is never used again.
> 
(Continue reading)

greg.reese | 2 Apr 06:30 2005
Picon
Picon

Compiler error with mem_fun

When using MinGW 3.2.0 I get a compiler error in the program below on the
line containing mem_fun. Both Borland Builder 6 and Comeau 4.3.3 compile the
program.

Any suggestions?

Thanks.

Greg Reese

--------------------------------------------------------------------------
#include <algorithm>
#include <functional>
#include <iostream>
#include <vector>

using namespace std;

class Experiment
{
   public:
   Experiment( int num_points = 0 );
   // num_points - number of data points in experiment

   void print() const;

   private:
   vector<float> data_;
};

(Continue reading)

Qin An | 2 Apr 07:55 2005
Picon

Re: a2dll errors means ?


>From: adah@...

>Can you successfully build it under a plain MinGW environment or MSYS? At
>least you must ensure "gcc -mno-cygwin" is used instead of "gcc" if Cygwin
>is used.

The gcc you mention above is the mingw's , isn't it? or the Cygwin's?
On windows, of course, which have been installed the MinGW, how to use the 
gcc of MinGW? what is its option of command ?

>Once the .o files in the .a file are all generated, it is easy to use "gcc
>-shared" to generate the .dll instead of the .a file.
>
How to generate the .o file ? But when I used the a2dll, it also created 
the .o files of the .a file. Yet, the .def file did not generate for me. I 
have no idea how I gain the .def file for generating the .dll ?

Could anybody give some advice to me ?

Thanks again.

- Qin An

_________________________________________________________________
与联机的朋友进行交流,请使用 MSN Messenger:  http://messenger.msn.com/cn  

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
(Continue reading)

Wesley Parish | 2 Apr 10:23 2005
Picon

mingw32-gcc and resource.h

I'm trying to learn the Win32 API using theForger's tutorial, and finding 
myself up against the wall with MinGW32-gcc and the resource file.

How does mingw32 handle resource files?  What syntax for the resource file 
declarations- ie, BEGIN [...some code...] END or { [...some code...] } ?  Do 
I need to declare a resource header file on the command line or in a makefile 
like so: [...] -I resource.h [...] ?

It's got me thoroughly baffled, and I haven't found any mention of it in the 
archives.

Thanks

Wesley Parish
--

-- 
Clinersterton beademung, with all of love - RIP James Blish
-----
Mau e ki, he aha te mea nui?
You ask, what is the most important thing?
Maku e ki, he tangata, he tangata, he tangata.
I reply, it is people, it is people, it is people.

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
MinGW-users mailing list
MinGW-users@...
(Continue reading)

Daniel Miller | 1 Apr 21:40 2005

CreateThread quirk under mingw 3.4.2

I'm trying to develop a basic multi-threaded Windows application.  In my 
current attempt, I call CreateThread in the WM_CREATE message handler.  The 
message handler doesn't do anything else (for now), and the thread function 
draws some graphics onscreen.

When I compiled using VC6 and /MT, this application runs fine.  However, 
when I compile with mingw g++ 3.4.2, the program compiles without warnings, 
but when I run it, the main window appears but I don't see any output from 
the thread function.  My thread function is:

VOID Thread (PVOID pvoid)
{
   //  If I don't have the fprintf statement inside the
   //  while loop, the function does not execute!!
   // unsigned loops = 0 ;
   // FILE *fd = fopen("\\dbg.txt", "wt") ;
   while (TRUE) {
      display_current_operation(hwnd);
      // fprintf(fd, "%u,", loops++) ;
   }
   // fclose(fd) ;
}

Interestingly, I found that if I include the file-printing operation which 
is currently commented out here, my graphics output *does* appear!!  Again, 
this was not needed with the VC6 build.

I'm assuming I need some switch that is equivalent to /MT under mingw??  
How do I do this??  Or is the issue something else entirely??

(Continue reading)

Wesley Parish | 2 Apr 10:29 2005
Picon

cross-compiling mingw32

Is there any manual on this so that someone can snap at me to RTFM?

I take it that I can in theory, cross-compile mingw32 to all and any platform 
gcc is already compiled on?

any pitfalls/pratfalls?

Thanks

Wesley Parish
-- 
Clinersterton beademung, with all of love - RIP James Blish
-----
Mau e ki, he aha te mea nui?
You ask, what is the most important thing?
Maku e ki, he tangata, he tangata, he tangata.
I reply, it is people, it is people, it is people.

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
MinGW-users mailing list
MinGW-users@...

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users

(Continue reading)

Qin An | 2 Apr 07:27 2005
Picon

Re: a2dll errors means ?


>From: adah@...

>Can you successfully build it under a plain MinGW environment or MSYS? At
>least you must ensure "gcc -mno-cygwin" is used instead of "gcc" if Cygwin
>is used.

The gcc you mention above is the mingw's , isn't it? or the Cygwin's?
On windows, of course, which have been installed the MinGW, how to use the 
gcc of MinGW? what is its option of command ?

>Once the .o files in the .a file are all generated, it is easy to use "gcc
>-shared" to generate the .dll instead of the .a file.
>
How to generate the .o file ? But when I used the a2dll, it also created 
the .o files of the .a file. Yet, the .def file did not generate for me. I 
have no idea how I gain the .def file for generating the .dll ?

Could anybody give some advice to me ?

Thanks again.

- Qin An

_________________________________________________________________
享用世界上最大的电子邮件系统— MSN Hotmail。  http://www.hotmail.com  

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
(Continue reading)

Greg Chicares | 2 Apr 16:22 2005
Picon
Picon

Re: mingw32-gcc and resource.h

On 2005-04-02 03:23 AM, Wesley Parish wrote:
> 
> How does mingw32 handle resource files?  What syntax for the resource file 
> declarations- ie, BEGIN [...some code...] END or { [...some code...] } ?

Any syntax documented on msdn is supposed to work.

> Do 
> I need to declare a resource header file on the command line or in a makefile 
> like so: [...] -I resource.h [...] ?

Include it in your '.rc' file.

> It's got me thoroughly baffled, and I haven't found any mention of it in the 
> archives.

A good keyword to search for is 'windres'.

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
MinGW-users mailing list
MinGW-users@...

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users

(Continue reading)


Gmane