New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug, duplicate symbols #52

Closed
Wah0airo opened this Issue Apr 11, 2017 · 8 comments

Comments

Projects
None yet
2 participants
@Wah0airo
Copy link

Wah0airo commented Apr 11, 2017

I tried to include ofxPD in a Project but I became a linker error, 30 duplicate symbols. I tried to compile the examples, but was the same, again 30 duplicate symbols.
I found some similar posts, but I couldn't find any solutions. I looks like there is a problem with "g_list_all.h" . I follow the instructions from Readme file. The errors are lister below.
I'm working with OF 0.98 on OSX Sierra, Xcode 8.3, ofxPd was compiled with the following flags: -DHAVE_UNISTD_H -DUSEAPI_DUMMY -DPD -DLIBPD_EXTRA -DLIBPD_USE_STD_MUTEX -DHAVE_LIBDL
duplicate symbol glistreloadingabstraction in:
g_all_guis.o
g_array.o
duplicate symbol glistreloadingabstraction in:
g_all_guis.o
g_bang.o
duplicate symbol glistreloadingabstraction in:
g_all_guis.o
g_canvas.o
duplicate symbol glistreloadingabstraction in:
g_all_guis.o
g_clone.o
duplicate symbol glistreloadingabstraction in:
g_all_guis.o
g_editor.o
duplicate symbol glistreloadingabstraction in:
g_all_guis.o
g_graph.o
duplicate symbol glistreloadingabstraction in:
g_all_guis.o
g_guiconnect.o
duplicate symbol glistreloadingabstraction in:
g_all_guis.o
g_hdial.o
duplicate symbol glistreloadingabstraction in:
g_all_guis.o
g_hslider.o
duplicate symbol glistreloadingabstraction in:
g_all_guis.o
g_io.o
duplicate symbol glistreloadingabstraction in:
g_all_guis.o
g_mycanvas.o
duplicate symbol glistreloadingabstraction in:
g_all_guis.o
g_numbox.o
duplicate symbol glistreloadingabstraction in:
g_all_guis.o
g_readwrite.o
duplicate symbol glistreloadingabstraction in:
g_all_guis.o
g_rtext.o
duplicate symbol glistreloadingabstraction in:
g_all_guis.o
g_scalar.o
duplicate symbol glistreloadingabstraction in:
g_all_guis.o
g_template.o
duplicate symbol glistreloadingabstraction in:
g_all_guis.o
g_text.o
duplicate symbol glistreloadingabstraction in:
g_all_guis.o
g_toggle.o
duplicate symbol glistreloadingabstraction in:
g_all_guis.o
g_traversal.o
duplicate symbol glistreloadingabstraction in:
g_all_guis.o
g_vdial.o
duplicate symbol glistreloadingabstraction in:
g_all_guis.o
g_vslider.o
duplicate symbol glistreloadingabstraction in:
g_all_guis.o
g_vumeter.o
duplicate symbol glistreloadingabstraction in:
g_all_guis.o
m_binbuf.o
duplicate symbol glistreloadingabstraction in:
g_all_guis.o
m_pd.o
duplicate symbol glistreloadingabstraction in:
g_all_guis.o
s_inter.o
duplicate symbol glistreloadingabstraction in:
g_all_guis.o
s_loader.o
duplicate symbol glistreloadingabstraction in:
g_all_guis.o
x_array.o
duplicate symbol glistreloadingabstraction in:
g_all_guis.o
x_misc.o
duplicate symbol glistreloadingabstraction in:
g_all_guis.o
x_scalar.o
duplicate symbol glistreloadingabstraction in:
g_all_guis.o
x_text.o
ld: 30 duplicate symbols for architecture x86_64

@danomatika

This comment has been minimized.

Copy link
Owner

danomatika commented Apr 11, 2017

Did you use the ProjectGenerator?

EDIT: I'm not seeing any issues in building the pdExample project with an Xcode project generated by the PG.

@Wah0airo

This comment has been minimized.

Copy link

Wah0airo commented Apr 12, 2017

Yes, I used the Project Generator. I create a new example too with the PG only with an example of ofxPD,, the "duplicate symbols" still appears. The rest of Open Frameworks addons are working OK.

@danomatika

This comment has been minimized.

Copy link
Owner

danomatika commented Apr 13, 2017

I'm not seeing this issue with a fresh clone of ofxPd into a fresh download of OF 0.9.8. Both pdExample and an empty project using ofxPd build fine. I'm running macOS 10.12.4 and using Xcode 8.3.1.

@Wah0airo

This comment has been minimized.

Copy link

Wah0airo commented Apr 14, 2017

I found the problem. When you create a new Xcode project you are asked to do "Update to recommended settings".Attached is a Screenshot. If do that, than is going to appear these duplicate symbols, if not the code compile without problems. Maybe this point "Duplicate methods definition" is generating this problem. If you look at the OF Forum you can see that another People had similar problems.
settings

@danomatika

This comment has been minimized.

Copy link
Owner

danomatika commented Apr 14, 2017

Ok cool. In general, it's best not to update the project the PG generates.

@danomatika

This comment has been minimized.

Copy link
Owner

danomatika commented Apr 14, 2017

As a followup, can you set the following in an updated project to see if it builds?

  • Click on the project in the right-hand project tree
  • Select the debug build target in the TARGETS list
  • Click on the "Build Settings" tab
  • Search for "No Common Blocks"
  • Change the setting from "Yes" to "No"
@Wah0airo

This comment has been minimized.

Copy link

Wah0airo commented Apr 14, 2017

I changed the setting from "No common Blocks" in an updated project from "Yes" to "No", it builds.
Regards.

@danomatika

This comment has been minimized.

Copy link
Owner

danomatika commented Jul 11, 2017

"No common blocks" is now set via the "-fcommon" compiler flag in addon_config.mk.

@danomatika danomatika closed this Jul 11, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment