How can we use ofxGuiExtended together with ofxGui? name spaces?

#1

When adding ofxGuiExtended it has some conflicts with ofxGui,
so I am asking if there’s something I can do to include both addons maybe only in differents classes…
I don’t know if it’s possible doing something like name spaces or not… Any tip around?

#2

@frauzufall is the one that can give you an answer.
Cheers!

#3

Thanks. hey @frauzufall,

Both addons are sharing names for ofxGuiGroup. Just adding both into PG I get this errors (duplicate symbol), even if ofxGuiExtended.h is not added to the ofApp.h. (if ofxGui.h is already there)
Then even if I would try to use ofxGuiExtended in another class (and ofxGui in another), it can’t build fine.

Should be possible to rename this duplicated names in one of both addons?
Maybe some ‘namespace things’ can solve this?

Error:duplicate symbol __ZN11ofxGuiGroup8minimizeEv in:
Error:  /Users/myUser/Library/Developer/Xcode/DerivedData/TESTINGguis-dpotgxskkntbkiepzhtpqjizmyiv/Build/Intermediates.noindex/TESTINGguis.build/Release/TESTINGguis.build/Objects-normal/x86_64/ofxGuiGroup-614ED7191DDF1692.o
Error:  /Users/myUser/Library/Developer/Xcode/DerivedData/TESTINGguis-dpotgxskkntbkiepzhtpqjizmyiv/Build/Intermediates.noindex/TESTINGguis.build/Release/TESTINGguis.build/Objects-normal/x86_64/ofxGuiGroup-C125C9E22121E6CD.o
Error:duplicate symbol __ZN11ofxGuiGroupC2Ev in:
Error:  /Users/myUser/Library/Developer/Xcode/DerivedData/TESTINGguis-dpotgxskkntbkiepzhtpqjizmyiv/Build/Intermediates.noindex/TESTINGguis.build/Release/TESTINGguis.build/Objects-normal/x86_64/ofxGuiGroup-614ED7191DDF1692.o
Error:  /Users/myUser/Library/Developer/Xcode/DerivedData/TESTINGguis-dpotgxskkntbkiepzhtpqjizmyiv/Build/Intermediates.noindex/TESTINGguis.build/Release/TESTINGguis.build/Objects-normal/x86_64/ofxGuiGroup-C125C9E22121E6CD.o
Error:duplicate symbol __ZTV11ofxGuiGroup in:
Error:  /Users/myUser/Library/Developer/Xcode/DerivedData/TESTINGguis-dpotgxskkntbkiepzhtpqjizmyiv/Build/Intermediates.noindex/TESTINGguis.build/Release/TESTINGguis.build/Objects-normal/x86_64/ofxGuiGroup-614ED7191DDF1692.o
Error:  /Users/myUser/Library/Developer/Xcode/DerivedData/TESTINGguis-dpotgxskkntbkiepzhtpqjizmyiv/Build/Intermediates.noindex/TESTINGguis.build/Release/TESTINGguis.build/Objects-normal/x86_64/ofxGuiGroup-C125C9E22121E6CD.o
Error:duplicate symbol __ZTS11ofxGuiGroup in:
Error:  /Users/myUser/Library/Developer/Xcode/DerivedData/TESTINGguis-dpotgxskkntbkiepzhtpqjizmyiv/Build/Intermediates.noindex/TESTINGguis.build/Release/TESTINGguis.build/Objects-normal/x86_64/ofxGuiGroup-614ED7191DDF1692.o
Error:  /Users/myUser/Library/Developer/Xcode/DerivedData/TESTINGguis-dpotgxskkntbkiepzhtpqjizmyiv/Build/Intermediates.noindex/TESTINGguis.build/Release/TESTINGguis.build/Objects-normal/x86_64/ofxGuiGroup-C125C9E22121E6CD.o
Error:duplicate symbol __ZTI11ofxGuiGroup in:
Error:  /Users/myUser/Library/Developer/Xcode/DerivedData/TESTINGguis-dpotgxskkntbkiepzhtpqjizmyiv/Build/Intermediates.noindex/TESTINGguis.build/Release/TESTINGguis.build/Objects-normal/x86_64/ofxGuiGroup-614ED7191DDF1692.o
Error:  /Users/myUser/Library/Developer/Xcode/DerivedData/TESTINGguis-dpotgxskkntbkiepzhtpqjizmyiv/Build/Intermediates.noindex/TESTINGguis.build/Release/TESTINGguis.build/Objects-normal/x86_64/ofxGuiGroup-C125C9E22121E6CD.o
Error:duplicate symbol __ZN11ofxGuiGroupC2ERK16ofParameterGroupRKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEff in:
Error:  /Users/myUser/Library/Developer/Xcode/DerivedData/TESTINGguis-dpotgxskkntbkiepzhtpqjizmyiv/Build/Intermediates.noindex/TESTINGguis.build/Release/TESTINGguis.build/Objects-normal/x86_64/ofxGuiGroup-614ED7191DDF1692.o
Error:  /Users/myUser/Library/Developer/Xcode/DerivedData/TESTINGguis-dpotgxskkntbkiepzhtpqjizmyiv/Build/Intermediates.noindex/TESTINGguis.build/Release/TESTINGguis.build/Objects-normal/x86_64/ofxGuiGroup-C125C9E22121E6CD.o
Note:ld: 11 duplicate symbols for architecture x86_64
Error:linker command failed with exit code 1 (use -v to see invocation)
#4

hey @frauzufall, I made a fork of your addon with some renaming to avoid duplicated names conflicts with ofxGui.
I found this helpful because when using some addons that include ofxGui to debug parameters that can be annoying.

This is a modified version to avoid conflicts with duplicated names (ofxGuiGroup) when use the addon together with the official ofxGui. ofxGuiGroup is renamed to ofxGuiGroup2.

You can have both ofxGuiExtended & ofxGuiExtended2 into /addons folders to make compatible with older projects…

Then you must include ofxGuiExtended2.h as usual and to use ofxGuiGroup2 class. The use of this addon it’s only recommended when you need to use the OF ofxGui in the same project.