Message: Re: Error making example N01, Cannot open CLHEP.lib Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Error making example N01, Cannot open CLHEP.lib 

Forum: Documentation and Examples
Re: None Error making example N01, Cannot open CLHEP.lib
Date: 30 Jan, 2009
From: Paul Nicholas Colin Gloster <Paul Nicholas Colin Gloster>

On Fri, 30 Jan 2009, jdswado@yahoo.com wrote:

|------------------------------------------------------------------------|
|"I'm trying [..] exampleN01 but when I do I continously get the         |
|following error: LINK: fatal error LNK1181: cannot open input file      |
|'CLHEP.lib'                                                             |
|                                                                        |
|Here's the error in context:                                            |
|                                                                        |
|Open a new Cygwin Window:                                               |
|                                                                        |
|Setting environment for using Microsoft Visual Studio 2005 x86 tools.   |
|                                                                        |
|[..]                                                                    |
|CLHEP_LIB_DIR=c:/CLHEP/lib On this machine the CLHEP_LIB=CLHEP.lib [..] |
|[..]                                                                    |
|                                                                        |
|Ryan Manger@nola ~ $ make Making dependency for file exampleN01.cc ...  |
|Making dependency for file src/ExN01PrimaryGeneratorAction.cc ... Making|
|dependency for file src/ExN01PhysicsList.cc ... Making dependency for   |
|file src/ExN01PhysicsList.cc ... Making dependency for file             |
|src/ExN01DetectorConstruction.cc ... Compiling                          |
|ExN01DetectorConstruction.cc ... ExN01DetectorConstruction.cc Compiling |
|ExN01PhysicsList.cc ... ExN01PhysicsList.cc Compiling                   |
|ExN01PrimaryGeneratorAction.cc ... ExN01PrimaryGeneratorAction.cc       |
|Creating/replacing object files in                                      |
|c:/g4work/tmp/WIN32-VC/exampleN01/libexampleN01.a ... Microsoft <R>     |
|Library Manager Version 8.00.50727.762 Copyright <C> Microsoft          |
|Corporation. All rights reserved.                                       |
|                                                                        |
|Compiling exampleN01.cc ... exampleN01.cc Using granular libraries ...  |
|Linking exampleN01 ... LINK: fatal error LNK1181: cannot open input file|
|'CLHEP.lib' make: ***[c:/g4work/bin/WIN32-VC/exampleN01] Error 2        |
|                                                                        |
|Ryan Manger@nola ~ $                                                    |
|                                                                        |
|[..] I've checked the forums and searched                               |
|online and there seems to be some connection possible to Microsoft SDK  |
|but I can't get any clear answers about how to fix this. If anyone has  |
|any ideas please let me know and many thanks."                          |
|------------------------------------------------------------------------|

I do not use Geant with that operating system so this advice is not as
specific as you might like, but it should still help.

Unfortunately (even on other operating systems), the location of CLHEP
is not automatically fully accounted for by Geant4 make files, despite
what you might reasonably conclude from some of the messages from
env.sh  .

Verify in which directory the CLHEP library is really installed in
(what  env.sh  reported is probably correct, so look in  C:\CLHEP\lib
first) and verify a correct filename thereof (e.g. maybe  CLHEP.lib
). If  CLHEP.lib  does not exist, then change the value of  CLHEP_LIB
to a filename which really does exist.

To finish, you have two options...

(1) a quick and nasty solution is to copy this file (e.g. maybe
CLHEP.lib  ) to one of the directories in which intermediate files 
are being linked (e.g. maybe  C:\G4work\tmp\WIN32-VC\exampleN01  ) and
try invoking  make  again;

or

(2) find out how to inform the linker of the location of the file
(e.g. maybe  CLHEP.lib  ). The compiler may have an option related to
directories for object files or libraries which might help with this.

Good luck,
Colin Paul Gloster

 Add Message Add Message
to: "Re: Error making example N01, Cannot open CLHEP.lib"

 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 ]