NightStrike | 1 Feb 2008 03:04
Picon

ATL Classes

Are the ATL classes part of mingw?

http://msdn2.microsoft.com/en-us/library/awt7k7f5(VS.80).aspx

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
MinGW-users mailing list
MinGW-users@...

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

Greg Chicares | 1 Feb 2008 03:13
Picon
Favicon

Re: ATL Classes

On 2008-02-01 02:04Z, NightStrike wrote:
> Are the ATL classes part of mingw?

http://article.gmane.org/gmane.comp.gnu.mingw.user/18483

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
MinGW-users mailing list
MinGW-users@...

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

NightStrike | 1 Feb 2008 03:16
Picon

Re: ATL Classes

On 1/31/08, Greg Chicares <gchicares@...> wrote:
> On 2008-02-01 02:04Z, NightStrike wrote:
> > Are the ATL classes part of mingw?
>
> http://article.gmane.org/gmane.comp.gnu.mingw.user/18483

>From that link: "Legally I believe you need to buy MSVC to use ATL so
there would not be much point in hacking it to work with GCC."

Is that not the case for the rest of the mingw headers?

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
MinGW-users mailing list
MinGW-users@...

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

Earnie Boyd | 1 Feb 2008 04:02
Picon

Re: ATL Classes


Quoting NightStrike <nightstrike@...>:

> On 1/31/08, Greg Chicares <gchicares@...> wrote:
>> On 2008-02-01 02:04Z, NightStrike wrote:
>> > Are the ATL classes part of mingw?
>>
>> http://article.gmane.org/gmane.comp.gnu.mingw.user/18483
>
>> From that link: "Legally I believe you need to buy MSVC to use ATL so
> there would not be much point in hacking it to work with GCC."
>

The real issue is that ATL is a set of C++ templates for the C++ COM.  
If you search you may find some open source versions that try to 
implement it.

> Is that not the case for the rest of the mingw headers?

Yes, it is not the case.

Earnie

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
MinGW-users mailing list
MinGW-users@...
(Continue reading)

Greg Chicares | 1 Feb 2008 04:09
Picon
Favicon

Re: ATL Classes

On 2008-02-01 02:16Z, NightStrike wrote:
> On 1/31/08, Greg Chicares <gchicares@...> wrote:
>> On 2008-02-01 02:04Z, NightStrike wrote:
>> > Are the ATL classes part of mingw?
>>
>> http://article.gmane.org/gmane.comp.gnu.mingw.user/18483
> 
>>From that link: "Legally I believe you need to buy MSVC to use ATL so
> there would not be much point in hacking it to work with GCC."
> 
> Is that not the case for the rest of the mingw headers?

The w32api headers assemble information exclusively from
published sources, most notably msdn. If it weren't
perfectly proper to do that without buying msvc, then I
can't imagine any proper way to compile a program that
uses the msw 32-bit api at all without buying msvc--you
couldn't even call LoadLibrary().

IOW, w32api is basically a collection of prototypes for
system calls: an interface to the operating system. But
AFAICT ATL is a C++ class library that's sold separately
from the OS, and you can write msw programs without it.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
MinGW-users mailing list
(Continue reading)

Dustin McCartney | 1 Feb 2008 06:21
Picon

Re: MSVC++ linking to MinGW compiled DLL

Thank you Earnie, JonY, and Greg!

I understand the name mangling issue...  I was really hoping someone 
would say "Oh yeah!...  To get the MinGW  GCC name mangling to be 
compatible as MSVC++, add linker option 
-Wl,--make_visual_c_compatible"...  Or something.  :P  My impression is 
that MinGW GCC can link to MSVC++ .DLL's (via pexports and/or reimp), 
but MSVC++ cannot link to MinGW .DLLs...  Does this seem accurate? 

If so, I think that the MinGW FAQ item "How can an MSVC program call a 
MinGW DLL, and vice versa?" 
(http://www.mingw.org/mingwfaq.shtml#faq-msvcdll) should be updated to 
reflect this.  This item gives instructions on how to get MSVC to use 
MinGW DLLs by creating a .DEF and then using MSVC's "lib.exe" tool...  
Which doesn't actually work.  At a minimum, it should mention that it 
can work under the following conditions:

   1. The calling convention must be __cdecl.  (Lib.exe limitation)
   2. Only C functions should be exported via 'extern "C"' because of
      C++ name mangling issues.

Again, thank you for your suggestions and those links...  Given that 
there doesn't seem to be an "easy" (linker/tool) solution, using the 
'extern "C"' method looks feasible and is likely what I'll do.  I see 
several additional benefits of employing that method as well.  ;-)

Best Regards,
Dustin

-------------------------------------------------------------------------
(Continue reading)

Tor Lillqvist | 1 Feb 2008 07:51
Picon
Picon
Favicon

Re: MSVC++ linking to MinGW compiled DLL

>  I understand the name mangling issue...  I was really hoping someone
>  would say "Oh yeah!...  To get the MinGW  GCC name mangling to be
>  compatible as MSVC++, add linker option
>  -Wl,--make_visual_c_compatible"...  Or something.

If you would have read the documentation, See
http://www.mingw.org/MinGWiki/index.php/MixingCompilers. You would
have learned that name mangling is just one part of the problem in
mixing C++ object code from different compilers. The name mangling
schemes are different *on purpose* because it wouldn't help if they
were identical, as all the other interesting details that make C++ so
more complex than C also are incompatible.

>  My impression is  that MinGW GCC [built code] can link to MSVC++ [built] .DLL's

Yes. As long as you talk about a pure C API. And as long as the API
contains no structs with bit fields, unless you use the -mms-bitfields
gcc option. Plus of course as long as the same calling convention are
used for the functions in caller and callee. Plus as long as either
both use the same C runtime, or the API contains no indirect
references to data (like indexes into tables) in the C runtime (like
file descriptors).

> (via pexports and/or reimp),

Or just simply looking up of symbols at run-time with GetProcAddress().

>  but MSVC++ [built code] cannot link to MinGW [built] .DLLs...  Does
> this seem accurate?

(Continue reading)

Brian Dessent | 1 Feb 2008 20:38
Favicon

Re: ATL Classes

Earnie Boyd wrote:

> If you search you may find some open source versions that try to
> implement it.

Microsoft also maintains WTL which is licensed under a free/open-source
license (CPL).  It is also a C++ template framework similar to MFC and
ATL.  However, I don't know if it uses VC++-specific extensions, or
whether it depends on VC++'s lax interpretations of the standard
compared to g++ (which tends to be quite strict, though less so in the
3.4 series than in the 4.x series.)

Brian

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
MinGW-users mailing list
MinGW-users@...

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

Brandon Sneed | 1 Feb 2008 20:43

Re: ATL Classes


On Feb 1, 2008, at 11:38 AM, Brian Dessent wrote:

> Earnie Boyd wrote:
>
>> If you search you may find some open source versions that try to
>> implement it.
>
> Microsoft also maintains WTL which is licensed under a free/open- 
> source
> license (CPL).  It is also a C++ template framework similar to MFC and
> ATL.  However, I don't know if it uses VC++-specific extensions, or
> whether it depends on VC++'s lax interpretations of the standard
> compared to g++ (which tends to be quite strict, though less so in the
> 3.4 series than in the 4.x series.)
>

It does depend on those things you mention.  Its also worth nothing  
that WTL extends ATL and is mostly useless without it.

Brandon Sneed

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
MinGW-users mailing list
MinGW-users@...

(Continue reading)

Eduardo Mendes | 1 Feb 2008 20:45
Picon
Favicon

Confused about mingw and gfortran-mingw working together

Hello
 
I have MinGw 5.3.1 installed on my Vista Machine without any updates and I want to install the last gfortran-mingw.  I have noticed that gfortran is installed in a different directory and comes with several mingw "utilities".
 
Questions:
 
a) Are those "utilities" compatible with 5.3.1?
b) Can I change the installation dir for gfortran to c:\mingw where mingw is located?
c) Off topic but related - There is an exe from www.equations .com that comes with gcc4.2.x.  Do I need mingw for that? 
 
Please help me to get a mingw environment with the latest version of g95, gfortran and gcc.  I must confess that I completely lost.
 
Many thanks
 
Ed
 

Express yourself instantly with MSN Messenger! MSN Messenger
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
MinGW-users mailing list
MinGW-users@...

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

Gmane