Preparing configuration for mixed 32 and 64 bit images (DLLs)

  • Thread starter Thread starter hector santos
  • Start date Start date
H

hector santos

Guest
I have two questions:

1) In my port to 64 bit, I have not removed any of the compiler defines in the configuration, such as "WIN32" and others. I don't think these should be removed, correct?

2) With my RPC client/server system and I pretty much concluded I can recompile a set of 64 bit RPC server images, EXEs, LIBs and DLLs and 32 bit RPC client images EXEs, LIBs and DLLs. With the exception of a few cases, the separation is such that I can keep the same installation folder. But there are few instances where the RPC Interface SDK/API DLL files (wcsrv.dll, wciphlpapi.dll) may need to be done into two sets of libs and dlls:

wcsrv.dll, wciphlpapi.dll (32 bit)
wcsrv64.dll, wciphlpapi64.dll (64 bit)

It sounds like a simple setup, but it actually more complicated than I thought in properly preparing this. When I changed the IDE the Linker default output

$(OutDir)$(TargetName)$(TargetExt)

to

$(OutDir)$(TargetName)$(PlatformArchitecture)$(TargetExt)


the IDE complained that the Linker output did not match other settings.

So I am wondering what would be the better way to handle this considering that an SDK would need to take into account 32 bit and 64 bit client development with different libaries and DLL linkages.

Right now, we document using a pragma:

#pragma comment (lib, "wcsrv.lib")

That would have to change to:


#ifdef _WIN64
# pragma comment (lib, "wcsrv64.lib")
# pragma comment (lib, "wciphlpapi64.lib")
#else
# pragma comment (lib, "wcsrv.lib ")
# pragma comment (lib, "wciphlpapi.lib")
#endif


Is this the best approach for a mix 32/64 bit compiling and SDK environment?

Thanks


Hector Santos, CTO Santronics Software, Inc. Santronics Software, Inc.

Continue reading...
 
Back
Top