public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Common dll for both 32 and 64 OS
@ 2011-08-25 10:33 Rama
  2011-08-25 10:44 ` Andrew Haley
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Rama @ 2011-08-25 10:33 UTC (permalink / raw)
  To: gcc-help

Hello,

I have a requirement to generate a dll which can run on both 32 bit
and 64 bit Windows OS.

Is there any option/way  in gcc to do this?

Thanks,
Rama.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Common dll for both 32 and 64 OS
  2011-08-25 10:33 Common dll for both 32 and 64 OS Rama
@ 2011-08-25 10:44 ` Andrew Haley
  2011-08-25 10:49 ` Sisyphus
  2011-08-25 10:50 ` David Brown
  2 siblings, 0 replies; 5+ messages in thread
From: Andrew Haley @ 2011-08-25 10:44 UTC (permalink / raw)
  To: gcc-help

On 08/25/2011 11:33 AM, Rama wrote:
> 
> I have a requirement to generate a dll which can run on both 32 bit
> and 64 bit Windows OS.
> 
> Is there any option/way  in gcc to do this?

No.

Andrew.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Common dll for both 32 and 64 OS
  2011-08-25 10:33 Common dll for both 32 and 64 OS Rama
  2011-08-25 10:44 ` Andrew Haley
@ 2011-08-25 10:49 ` Sisyphus
  2011-08-25 10:50 ` David Brown
  2 siblings, 0 replies; 5+ messages in thread
From: Sisyphus @ 2011-08-25 10:49 UTC (permalink / raw)
  To: Rama, gcc-help


----- Original Message ----- 
From: "Rama" <rama.pelluri@gmail.com>
To: <gcc-help@gcc.gnu.org>
Sent: Thursday, August 25, 2011 8:33 PM
Subject: Common dll for both 32 and 64 OS


> Hello,
>
> I have a requirement to generate a dll which can run on both 32 bit
> and 64 bit Windows OS.
>
> Is there any option/way  in gcc to do this?

Just build your dll with a 32-bit build of gcc, and it will run on 64-bit 
Windows OS (unless the app that tries to load that dll on the 64-bit OS was 
built as a 64-bit app.)

That is, 32-bit apps/dlls will run on both 32-bit and 64-bit Windows OS.

Cheers,
Rob 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Common dll for both 32 and 64 OS
  2011-08-25 10:33 Common dll for both 32 and 64 OS Rama
  2011-08-25 10:44 ` Andrew Haley
  2011-08-25 10:49 ` Sisyphus
@ 2011-08-25 10:50 ` David Brown
  2011-08-25 11:16   ` Sisyphus
  2 siblings, 1 reply; 5+ messages in thread
From: David Brown @ 2011-08-25 10:50 UTC (permalink / raw)
  To: gcc-help

On 25/08/2011 12:33, Rama wrote:
> Hello,
>
> I have a requirement to generate a dll which can run on both 32 bit
> and 64 bit Windows OS.
>
> Is there any option/way  in gcc to do this?
>

Can't you just use a 32-bit DLL?  Then both 32-bit and 64-bit apps can 
access it.  If the same file has to work on two platforms, you have to 
code for the lowest common denominator.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Common dll for both 32 and 64 OS
  2011-08-25 10:50 ` David Brown
@ 2011-08-25 11:16   ` Sisyphus
  0 siblings, 0 replies; 5+ messages in thread
From: Sisyphus @ 2011-08-25 11:16 UTC (permalink / raw)
  To: gcc-help, David Brown


----- Original Message ----- 
From: "David Brown"

> Can't you just use a 32-bit DLL?  Then both 32-bit and 64-bit apps can 
> access it.

If by "64-bit apps" you mean apps that were built using a 64-bit compiler, 
then they cannot access a 32-bit dll (unless I'm mistaken ... which has been 
known to happen).

But if by "64-bit apps" you mean apps built by a 32-bit compiler but running 
on a 64-bit Windows OS, then we're in agreement.

Cheers,
Rob 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-08-25 11:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-25 10:33 Common dll for both 32 and 64 OS Rama
2011-08-25 10:44 ` Andrew Haley
2011-08-25 10:49 ` Sisyphus
2011-08-25 10:50 ` David Brown
2011-08-25 11:16   ` Sisyphus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).