Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / October 2007

Tip: Looking for answers? Try searching our database.

How to statically linking 2 files for 32 bit and 64 bit in VC++ 2005

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
pranab.salian@gmail.com - 25 Oct 2007 23:07 GMT
I am trying to statically link a xyz.lib file to my 32-bit VC++ 2005
MFC app in order to use a .sys file.

I have two xyz.lib files, one for win32 and one for amd64.

I know I should add the .lib file to ['Property Pages' > 'Linker' >
'Input' > 'Additional Dependencies']

But which file do I add, how do I add both files, and how do I ensure
the 32-bit app can use the linked .sys on 32-bit as well as 64-bit?

Thanks!
Gigasoft - 26 Oct 2007 00:19 GMT
Hi,

Just use the 32 bit lib, your app will run on 64 bit via WOW64.

64 bit development would involve setting up a new cpu platform, which has
it's own copy of build configuration settings.  Requiring potential porting
all your code to compile as 64 bit.  Which then won't run on 32 bit.

You generally can't mismatch 32 and 64 bit binaries within an app.

best regards,

Robert Dede
Gigasoft, Inc.
www.gigasoft.com

>I am trying to statically link a xyz.lib file to my 32-bit VC++ 2005
> MFC app in order to use a .sys file.
[quoted text clipped - 8 lines]
>
> Thanks!
Ben Voigt [C++ MVP] - 26 Oct 2007 18:36 GMT
>I am trying to statically link a xyz.lib file to my 32-bit VC++ 2005
> MFC app in order to use a .sys file.
[quoted text clipped - 6 lines]
> But which file do I add, how do I add both files, and how do I ensure
> the 32-bit app can use the linked .sys on 32-bit as well as 64-bit?

By .sys, do you mean a driver?  You cannot have 32-bit drivers on 64-bit
Windows.  The .sys needs to match Windows, the .lib needs to match your
application.  If they are well-designed they will automatically handle the
case of a 32-bit .lib with a 64-bit .sys.

> Thanks!

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.