Message: Open Inventor won't link on Windows Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Open Inventor won't link on Windows 

Forum: Visualization
Date: 31 Mar, 2009
From: Tom Roberts <Tom Roberts>

When building my program on Windows, I get this error: libG4OpenInventor.a(G4OpenInventorWin.o) : error LNK2019: unresolved external symbol "public: static class G4Win32 * __cdecl G4Win32::getInstance(void)" (?getInstance@G4Win32@@SAPAV1@XZ) referenced in function "private: virtual void __thiscall G4OpenInventorWin::Initialize(void)" (?Initialize@G4OpenInventorWin@@EAEXXZ)

This is Geant4.9.2.p01 on Windows Xp with Cygwin and VC++ express edition 9.0. The same program worked fine with the previous Geant4.9.1.p02. It also works fine on Mac OS X and Linux, using the current Geant4.9.2.p01. I do not know what changed. I do not use the Win32 user interface (though I build it in Geant4, in case I decide to use it).

Note that I am using Coin, and must edit G4OpeninventorWin.cc to comment out lines 54-55 (omit calls to RemoveDispatcher(...) and AddDispatcher(...)). The offending call above is one line earlier.

I have a workaround: copy G4Win32.cc into my program's src directory. This forces it into the link, and all is well -- Open Inventor comes up and works fine. So this looks like a library ordering issue. Again, I do not know what changed.

NOTE: there are also a number of error messages like "the macro max requires 2 arguments but only 1 given". I never noticed them before. This happens whenever G4Win32.hh is #included and then DBL_MAX is used (the culprit is that it includes windows.h which does #define max(A,B)...). I hope the result is OK (seems to work)....

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

1 Question: Re: Open Inventor won't link on Windows   (garnier - 06 Apr, 2009)
(_ More: Re: Open Inventor won't link on Windows   (Tom Roberts - 08 Apr, 2009)
 Add Message Add Message
to: "Open Inventor won't link on Windows"

 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 ]