Building static configuration in VS 2012
Posted: Thu Aug 01, 2013 11:24
Ran into unexpected problems with building 0.8.2 in VS 2012. Dynamic configuration is built okay, and the sample framework runs fine. Dynamic configuration with static dependencies - okay, sample framework runs fine. However, building static configuration runs into very strange problems.
First of all, the build log for "CEGUIBase-0_Static" reads the following:
It does build, yes, however, when building "CEGUISampleFrameWork-0.8_Static" gives an error:
The functions it can't find are all defined in FormattingSetting.cpp, which in the previous step reports to contain no new public symbols, thus it seems like it just doesn't get linked into the library. And I have absolutely no idea as to how to resolve this issue. Has anyone else experienced that?
First of all, the build log for "CEGUIBase-0_Static" reads the following:
Code: Select all
2>FormattingSetting.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
2>WindowFactory.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
2>Rect.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
2>EventArgs.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
2>Base.obj : warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library
2> CEGUIBase-0_Static.vcxproj -> G:\cegui\cegui-0.8.2\build\lib\CEGUIBase-0_Static.lib
========== Rebuild All: 2 succeeded, 0 failed, 0 skipped ==========
It does build, yes, however, when building "CEGUISampleFrameWork-0.8_Static" gives an error:
Code: Select all
2>CEGUIBase-0_Static.lib(WidgetLookFeel.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall CEGUI::FormattingSetting<enum CEGUI::VerticalFormatting>::writeXMLTagToStream(class CEGUI::XMLSerializer &)const " (?writeXMLTagToStream@?$FormattingSetting@W4VerticalFormatting@CEGUI@@@CEGUI@@UBEXAAVXMLSerializer@2@@Z)
2>CEGUIBase-0_Static.lib(ImageryComponent.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall CEGUI::FormattingSetting<enum CEGUI::VerticalFormatting>::writeXMLTagToStream(class CEGUI::XMLSerializer &)const " (?writeXMLTagToStream@?$FormattingSetting@W4VerticalFormatting@CEGUI@@@CEGUI@@UBEXAAVXMLSerializer@2@@Z)
2>CEGUIBase-0_Static.lib(FrameComponent.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall CEGUI::FormattingSetting<enum CEGUI::VerticalFormatting>::writeXMLTagToStream(class CEGUI::XMLSerializer &)const " (?writeXMLTagToStream@?$FormattingSetting@W4VerticalFormatting@CEGUI@@@CEGUI@@UBEXAAVXMLSerializer@2@@Z)
2>CEGUIBase-0_Static.lib(ImagerySection.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall CEGUI::FormattingSetting<enum CEGUI::VerticalFormatting>::writeXMLTagToStream(class CEGUI::XMLSerializer &)const " (?writeXMLTagToStream@?$FormattingSetting@W4VerticalFormatting@CEGUI@@@CEGUI@@UBEXAAVXMLSerializer@2@@Z)
2>CEGUIBase-0_Static.lib(WidgetLookFeel.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall CEGUI::FormattingSetting<enum CEGUI::VerticalFormatting>::writeXMLAttributesToStream(class CEGUI::XMLSerializer &)const " (?writeXMLAttributesToStream@?$FormattingSetting@W4VerticalFormatting@CEGUI@@@CEGUI@@UBEXAAVXMLSerializer@2@@Z)
2>CEGUIBase-0_Static.lib(ImageryComponent.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall CEGUI::FormattingSetting<enum CEGUI::VerticalFormatting>::writeXMLAttributesToStream(class CEGUI::XMLSerializer &)const " (?writeXMLAttributesToStream@?$FormattingSetting@W4VerticalFormatting@CEGUI@@@CEGUI@@UBEXAAVXMLSerializer@2@@Z)
2>CEGUIBase-0_Static.lib(FrameComponent.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall CEGUI::FormattingSetting<enum CEGUI::VerticalFormatting>::writeXMLAttributesToStream(class CEGUI::XMLSerializer &)const " (?writeXMLAttributesToStream@?$FormattingSetting@W4VerticalFormatting@CEGUI@@@CEGUI@@UBEXAAVXMLSerializer@2@@Z)
2>CEGUIBase-0_Static.lib(ImagerySection.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall CEGUI::FormattingSetting<enum CEGUI::VerticalFormatting>::writeXMLAttributesToStream(class CEGUI::XMLSerializer &)const " (?writeXMLAttributesToStream@?$FormattingSetting@W4VerticalFormatting@CEGUI@@@CEGUI@@UBEXAAVXMLSerializer@2@@Z)
2>CEGUIBase-0_Static.lib(WidgetLookFeel.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall CEGUI::FormattingSetting<enum CEGUI::HorizontalFormatting>::writeXMLTagToStream(class CEGUI::XMLSerializer &)const " (?writeXMLTagToStream@?$FormattingSetting@W4HorizontalFormatting@CEGUI@@@CEGUI@@UBEXAAVXMLSerializer@2@@Z)
2>CEGUIBase-0_Static.lib(ImageryComponent.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall CEGUI::FormattingSetting<enum CEGUI::HorizontalFormatting>::writeXMLTagToStream(class CEGUI::XMLSerializer &)const " (?writeXMLTagToStream@?$FormattingSetting@W4HorizontalFormatting@CEGUI@@@CEGUI@@UBEXAAVXMLSerializer@2@@Z)
2>CEGUIBase-0_Static.lib(FrameComponent.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall CEGUI::FormattingSetting<enum CEGUI::HorizontalFormatting>::writeXMLTagToStream(class CEGUI::XMLSerializer &)const " (?writeXMLTagToStream@?$FormattingSetting@W4HorizontalFormatting@CEGUI@@@CEGUI@@UBEXAAVXMLSerializer@2@@Z)
2>CEGUIBase-0_Static.lib(ImagerySection.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall CEGUI::FormattingSetting<enum CEGUI::HorizontalFormatting>::writeXMLTagToStream(class CEGUI::XMLSerializer &)const " (?writeXMLTagToStream@?$FormattingSetting@W4HorizontalFormatting@CEGUI@@@CEGUI@@UBEXAAVXMLSerializer@2@@Z)
2>CEGUIBase-0_Static.lib(WidgetLookFeel.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall CEGUI::FormattingSetting<enum CEGUI::HorizontalFormatting>::writeXMLAttributesToStream(class CEGUI::XMLSerializer &)const " (?writeXMLAttributesToStream@?$FormattingSetting@W4HorizontalFormatting@CEGUI@@@CEGUI@@UBEXAAVXMLSerializer@2@@Z)
2>CEGUIBase-0_Static.lib(ImageryComponent.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall CEGUI::FormattingSetting<enum CEGUI::HorizontalFormatting>::writeXMLAttributesToStream(class CEGUI::XMLSerializer &)const " (?writeXMLAttributesToStream@?$FormattingSetting@W4HorizontalFormatting@CEGUI@@@CEGUI@@UBEXAAVXMLSerializer@2@@Z)
2>CEGUIBase-0_Static.lib(FrameComponent.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall CEGUI::FormattingSetting<enum CEGUI::HorizontalFormatting>::writeXMLAttributesToStream(class CEGUI::XMLSerializer &)const " (?writeXMLAttributesToStream@?$FormattingSetting@W4HorizontalFormatting@CEGUI@@@CEGUI@@UBEXAAVXMLSerializer@2@@Z)
2>CEGUIBase-0_Static.lib(ImagerySection.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall CEGUI::FormattingSetting<enum CEGUI::HorizontalFormatting>::writeXMLAttributesToStream(class CEGUI::XMLSerializer &)const " (?writeXMLAttributesToStream@?$FormattingSetting@W4HorizontalFormatting@CEGUI@@@CEGUI@@UBEXAAVXMLSerializer@2@@Z)
2>CEGUIBase-0_Static.lib(TextComponent.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall CEGUI::FormattingSetting<enum CEGUI::VerticalTextFormatting>::writeXMLTagToStream(class CEGUI::XMLSerializer &)const " (?writeXMLTagToStream@?$FormattingSetting@W4VerticalTextFormatting@CEGUI@@@CEGUI@@UBEXAAVXMLSerializer@2@@Z)
2>CEGUIBase-0_Static.lib(TextComponent.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall CEGUI::FormattingSetting<enum CEGUI::VerticalTextFormatting>::writeXMLAttributesToStream(class CEGUI::XMLSerializer &)const " (?writeXMLAttributesToStream@?$FormattingSetting@W4VerticalTextFormatting@CEGUI@@@CEGUI@@UBEXAAVXMLSerializer@2@@Z)
2>CEGUIBase-0_Static.lib(TextComponent.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall CEGUI::FormattingSetting<enum CEGUI::HorizontalTextFormatting>::writeXMLTagToStream(class CEGUI::XMLSerializer &)const " (?writeXMLTagToStream@?$FormattingSetting@W4HorizontalTextFormatting@CEGUI@@@CEGUI@@UBEXAAVXMLSerializer@2@@Z)
2>CEGUIBase-0_Static.lib(TextComponent.obj) : error LNK2001: unresolved external symbol "public: virtual void __thiscall CEGUI::FormattingSetting<enum CEGUI::HorizontalTextFormatting>::writeXMLAttributesToStream(class CEGUI::XMLSerializer &)const " (?writeXMLAttributesToStream@?$FormattingSetting@W4HorizontalTextFormatting@CEGUI@@@CEGUI@@UBEXAAVXMLSerializer@2@@Z)
2>G:\cegui\cegui-0.8.2\build\bin\CEGUISampleFramework-0.8_Static.exe : fatal error LNK1120: 8 unresolved externals
========== Build: 1 succeeded, 1 failed, 5 up-to-date, 0 skipped ==========
The functions it can't find are all defined in FormattingSetting.cpp, which in the previous step reports to contain no new public symbols, thus it seems like it just doesn't get linked into the library. And I have absolutely no idea as to how to resolve this issue. Has anyone else experienced that?