Message: Re: Geant4.9.4.p4 Windows and DLLs Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Geant4.9.4.p4 Windows and DLLs 

Forum: Installation and Configuration
Re: None Geant4.9.4.p4 Windows and DLLs
Date: 01 Apr, 2011
From: Ben Morgan <Ben Morgan>

Hi Heather,

> I'm working with Geant4.9.4.p01 built via cygwin with VS 2008. I wanted
> to try out the shared libraries, and did so through the ./Configure
> script and just chose to build shared, no static. The resulting lib
> directory contains *.dll, *.a and *.lib. Does that mean I'm getting both
> the static version of the libraries as well as the dlls and import
> libraries? 

Just to confirm, you selected yes for the Do you want to build DLL (.dll) libraries? option in Configure? If you choose this you don't get any other options - though given the you have the *.{dll,lib,a} I think this was the chosen option.

With the DLL build, you do get all three libraries because the DLLs are generated from a .def that's created by examining the .a static libraries.

> Now that I have G4 built, I'm working directly in VC++, and
> trying to set up my build to link correctly to the shared libraries. I
> have set G4LIB_USE_DLL, but I do receive linking errors due to
> unresolved symbols such as in G4Allocator. I was looking back at G4's
> binmake.gmk to get some clues and I noticed:
> ifneq (,$(findstring WIN32-VC,$(G4SYSTEM)))
>   # Windows
>   WIN32TMP := $(patsubst -L%,$(LIB_PATH)%,$(LDFLAGS))
>   LDFLAGS  = $(patsubst /,$(PATH_DEL),$(WIN32TMP))
>   WIN32TMP2 := $(patsubst -L%,$(LIB_PATH)%,$(LDLIBS_PREFINAL))
>   WIN32TMP3 := $(patsubst -L%,$(LIB_PATH)%,$(LDLIBS1))
>   WIN32TMP4 := $(patsubst -L%,$(LIB_PATH)%,$(LDLIBS_KERNEL))
>   ifdef SHAREDLIBS
>     ifdef G4LIB_USE_DLL
>         LDLIBS = $(TARGETLIB) $(patsubst -l%,lib%.a,$(WIN32TMP3)) $(patsubst -l%,lib%.lib,$(WIN32TMP4))

I too have problems parsing Makefiles... All this is doing, I think, is transforming the links from -LPATH -lNAME style to MSVC style, and changing the Geant4 library names to the name of the import lib.

Could you post the linking errors you're seeing plus the actual link line that's used (do make CPPVERBOSE) please? That'll help to see what's going on.



 Add Message Add Message
to: "Re: Geant4.9.4.p4 Windows and DLLs"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews

[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]