| Message: Open Inventor won't link on Windows | Not Logged In (login) |
|
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: | Outline Depth: | Add message: |
|
to: |