Message: Re: error: no matching function for call to G4SubtractionSolid::G4SubtractionSolid Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Warning Re: error: no matching function for call to G4SubtractionSolid::G4SubtractionSolid 

Forum: Geometry
Re: Question error: no matching function for call to G4SubtractionSolid::G4SubtractionSolid (han)
Date: 08 Jul, 2014
From: Michael H. Kelsey <Michael H. Kelsey>

On Tue, 08 Jul 2014 09:45:13 GMT, han wrote:
> Hi guys, i'making a solid by using the G4Subtraction method,however,when
> i run it,the error come out that called mo matching function call to
> &#65533;G4SubtractionSolid::G4SubtractionSolid,how can i deal with it?
[...]
>   //subtraction solid
>   G4SubtractionSolid*subtraction= 
>     new G4SubtractionSolid("subTubs-subfilm",subTubs,subfilm,zTrans);
[...]
> B4DetectorConstruction.cc: In member function &#65533;G4VPhysicalVolume* B4DetectorConstruction::DefineVolumes()&#65533;:
> ~/src/B4DetectorConstruction.cc:335:68: error: no matching function for call to &#65533;G4SubtractionSolid::G4SubtractionSolid(const char [16], G4Tubs*&, G4Sphere*&, G4ThreeVector&)&#65533;
>      new G4SubtractionSolid("subTubs-subfilm",subTubs,subfilm,zTrans);

See $G4INCLUDE/G4SubtractionSolid.hh, for the expected constructor arguments. You are missing the rotation matrix point (G4RotationMatrix*). If you don't want to do a rotation, you can pass a null pointer.

  -- Michael Kelsey

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: error: no matching function for call to G4SubtractionSolid::G4SubtractionSolid   (han - 14 Jul, 2014)
 Add Message Add Message
to: "Re: error: no matching function for call to G4SubtractionSolid::G4SubtractionSolid"

 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 ]