I aware there are similar questions on here but the answers given are not helping me. So here's my questions specifically.
So Upgrading from 0.57.8 to 0.58.x seems to give me this issue:
ld: 32 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
My podfile already has solutions recommended on other questions:
I'm totally stuck right now :( p.s I'm using rn-dif-purge to upgrade
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == 'yoga'
# Workaround: react-native v0.52 bug issue #17274
# node_modules/react-native/ReactCommon/yoga/yoga/YGNodePrint.cpp:208:46: Implicit conversion loses integer
# precision: 'size_type' (aka 'unsigned long') to 'const uint32_t' (aka 'const unsigned int')
# https://github.com/facebook/react-native/issues/17274#issuecomment-356363557
target.build_configurations.each do |config|
config.build_settings['GCC_TREAT_WARNINGS_AS_ERRORS'] = 'NO'
config.build_settings['GCC_WARN_64_TO_32_BIT_CONVERSION'] = 'NO'
end
end
if target.name == 'react-native-google-maps'
target.build_configurations.each do |config|
config.build_settings['CLANG_ENABLE_MODULES'] = 'No'
end
end
if target.name == "React"
target.remove_from_project
end
end
end
target 'myCoolAppTests' do
inherit! :search_paths
# Pods for testing
end
Full output:
ld: warning: directory not found for option '-L/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/React'
duplicate symbol __ZN5folly7dynamic7destroyEv in:
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
duplicate symbol __ZNK5folly7dynamic4hashEv in:
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
duplicate symbol __ZNK5folly7dynamic4sizeEv in:
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
duplicate symbol __ZNK5folly7dynamic8typeNameEv in:
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
duplicate symbol __ZN5folly9TypeErrorD2Ev in:
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
duplicate symbol __ZN5folly9TypeErrorD1Ev in:
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
duplicate symbol __ZN5folly9TypeErrorD0Ev in:
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
duplicate symbol __ZN5folly9TypeErrorC2ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS_7dynamic4TypeESB_ in:
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
duplicate symbol __ZN5folly9TypeErrorC1ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS_7dynamic4TypeESB_ in:
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
duplicate symbol __ZN5folly7dynamic5eraseENSt3__111__wrap_iterIPKS0_EES5_ in:
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
duplicate symbol __ZN5folly7dynamicaSEOS0_ in:
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
duplicate symbol __ZNK5folly7dynamicltERKS0_ in:
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
duplicate symbol __ZNK5folly7dynamiceqERKS0_ in:
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
duplicate symbol __ZN5folly7dynamicaSERKS0_ in:
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
duplicate symbol __ZTVN5folly9TypeErrorE in:
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
duplicate symbol __ZTSN5folly9TypeErrorE in:
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
duplicate symbol __ZTIN5folly9TypeErrorE in:
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
duplicate symbol __ZN5folly7dynamic8TypeInfoIxE4typeE in:
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
duplicate symbol __ZN5folly7dynamic8TypeInfoIdE4typeE in:
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
duplicate symbol __ZN5folly7dynamic8TypeInfoIbE4typeE in:
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
duplicate symbol __ZN5folly7dynamic8TypeInfoINS0_10ObjectImplEE4typeE in:
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
duplicate symbol __ZN5folly7dynamic8TypeInfoINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEE4typeE in:
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
duplicate symbol __ZN5folly7dynamic8TypeInfoINSt3__16vectorIS0_NS2_9allocatorIS0_EEEEE4typeE in:
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
duplicate symbol __ZN5folly9TypeErrorC2ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS_7dynamic4TypeE in:
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
duplicate symbol __ZN5folly9TypeErrorC1ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS_7dynamic4TypeE in:
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
duplicate symbol __ZN5folly7dynamic8typeNameENS0_4TypeE in:
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
duplicate symbol __ZN5folly7dynamic8TypeInfoIxE4nameE in:
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
duplicate symbol __ZN5folly7dynamic8TypeInfoIdE4nameE in:
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
duplicate symbol __ZN5folly7dynamic8TypeInfoIbE4nameE in:
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
duplicate symbol __ZN5folly7dynamic8TypeInfoINS0_10ObjectImplEE4nameE in:
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
duplicate symbol __ZN5folly7dynamic8TypeInfoINSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEE4nameE in:
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
duplicate symbol __ZN5folly7dynamic8TypeInfoINSt3__16vectorIS0_NS2_9allocatorIS0_EEEEE4nameE in:
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/Folly/libFolly.a(dynamic.o)
/Users/user01/Library/Developer/Xcode/DerivedData/my-cool-app-efqysosplvdxlnghszhgchphxsac/Build/Products/Debug-iphonesimulator/libReact.a(dynamic.o)
ld: 32 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Assuming that the project is on Git, Rename the current folder (for example if it is "MyProject", change it to "MyProjectt"), then:
Commit all your changes!
Create a new project with that name react-native init MyProject --version=0.58.9
Copy the .git folder (note that it's hidden) - also copy all your .js files such as app.js and package.json
Install all your dependencies and bump up the react-native version too!
Run your Git client (for example GitHub desktop) - you see changes in iOS and android folder
Commit changes
Related
When building a shared library on AIX with xlc, you see this linker warning:
ld: 0711-224 WARNING: Duplicate symbol: __fe_def_env
To reproduce, use this source file fenvtest.c:
#include <fenv.h>
void exported_func() {
fenv_t f;
(void)fegetenv(&f);
}
Then run the following command:
$ xlc -G -o fenvtest.so -lm -Wl,-bexpfull fenvtest.c
ld: 0711-224 WARNING: Duplicate symbol: __fe_def_env
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
Generally the warning about __fe_def_env occurs when building a shared library and the linker option -bexpfull is used. See the linker documentation for more explanation of -bexpfull.
The symbol __fe_def_env is defined in /usr/include/fenv.h:
const fenv_t __fe_def_env = { FE_TONEAREST, 0, 0, 0, 0 };
so it is included in every object that includes fenv.h. For that reason, if when a shared object is built with -bexpfull or another option that exports __fe_def_env, this symbol will collide with the symbol of the same name in other files.
You can avoid the warning by:
Using -bexpall instead of -bexpfull
Customizing the export list to exclude __fe_def_env
That said, the warning is harmless and may be ignored.
The problem is as follows.
I am trying to add two simple .obj files to my project. I have added a header file and I can see that obj is valid as Ttime structure, which is a part of obj is working. However, whenever I try to execute any function I get this error:
Undefined symbols for architecture x86_64:
"_printRES", referenced from:
_main in main.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Error Screenshot
I'm currently working with Objection.h and an Open Source project called Linklyy, and I'm getting the following linker error:
ld: warning: ignoring file /Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection.framework/Objection, file was built for x86_64 which is not the architecture being linked (i386): /Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection.framework/Objection
duplicate symbol _OBJC_IVAR_$_JSObjectFactory._injector in:
/Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectFactory.o)
/Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectFactory.o)
duplicate symbol _OBJC_CLASS_$_JSObjectFactory in:
/Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectFactory.o)
/Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectFactory.o)
duplicate symbol _OBJC_METACLASS_$_JSObjectFactory in:
/Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectFactory.o)
/Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectFactory.o)
duplicate symbol _OBJC_CLASS_$_JSObjection in:
/Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjection.o)
/Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjection.o)
duplicate symbol _OBJC_METACLASS_$_JSObjection in:
/Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjection.o)
/Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjection.o)
duplicate symbol _OBJC_IVAR_$_JSObjectionBindingEntry._instance in:
/Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionBindingEntry.o)
/Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionBindingEntry.o)
duplicate symbol _OBJC_CLASS_$_JSObjectionBindingEntry in:
/Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionBindingEntry.o)
/Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionBindingEntry.o)
duplicate symbol _OBJC_METACLASS_$_JSObjectionBindingEntry in:
/Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionBindingEntry.o)
/Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionBindingEntry.o)
duplicate symbol _OBJC_IVAR_$_JSObjectionEntry.injector in:
/Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionEntry.o)
/Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionEntry.o)
duplicate symbol _OBJC_METACLASS_$_JSObjectionEntry in:
/Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionEntry.o)
/Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionEntry.o)
duplicate symbol _OBJC_CLASS_$_JSObjectionEntry in:
/Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionEntry.o)
/Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionEntry.o)
duplicate symbol _OBJC_IVAR_$___JSObjectionInjectorDefaultModule._injector in:
/Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionInjector.o)
/Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionInjector.o)
duplicate symbol _OBJC_IVAR_$_JSObjectionInjector._globalContext in:
/Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionInjector.o)
/Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionInjector.o)
duplicate symbol _OBJC_IVAR_$_JSObjectionInjector._context in:
/Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionInjector.o)
/Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionInjector.o)
duplicate symbol _OBJC_IVAR_$_JSObjectionInjector._modules in:
/Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionInjector.o)
/Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionInjector.o)
duplicate symbol _OBJC_IVAR_$_JSObjectionInjector._eagerSingletons in:
/Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionInjector.o)
/Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionInjector.o)
duplicate symbol _OBJC_CLASS_$___JSObjectionInjectorDefaultModule in:
/Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionInjector.o)
/Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionInjector.o)
duplicate symbol _OBJC_METACLASS_$___JSObjectionInjectorDefaultModule in:
/Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionInjector.o)
/Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionInjector.o)
duplicate symbol _OBJC_CLASS_$_JSObjectionInjector in:
/Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionInjector.o)
/Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionInjector.o)
duplicate symbol _OBJC_METACLASS_$_JSObjectionInjector in:
/Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionInjector.o)
/Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionInjector.o)
duplicate symbol _OBJC_IVAR_$_JSObjectionInjectorEntry._lifeCycle in:
/Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionInjectorEntry.o)
/Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionInjectorEntry.o)
duplicate symbol _OBJC_IVAR_$_JSObjectionInjectorEntry._classEntry in:
/Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionInjectorEntry.o)
/Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionInjectorEntry.o)
duplicate symbol _OBJC_IVAR_$_JSObjectionInjectorEntry._storageCache in:
/Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionInjectorEntry.o)
/Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionInjectorEntry.o)
duplicate symbol _OBJC_CLASS_$_JSObjectionInjectorEntry in:
/Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionInjectorEntry.o)
/Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionInjectorEntry.o)
duplicate symbol _OBJC_METACLASS_$_JSObjectionInjectorEntry in:
/Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionInjectorEntry.o)
/Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionInjectorEntry.o)
duplicate symbol _OBJC_IVAR_$___JSClassProvider._class in:
/Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionModule.o)
/Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionModule.o)
duplicate symbol _OBJC_IVAR_$_JSObjectionModule._bindings in:
/Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionModule.o)
/Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionModule.o)
duplicate symbol _OBJC_IVAR_$_JSObjectionModule._eagerSingletons in:
/Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionModule.o)
/Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionModule.o)
duplicate symbol _OBJC_CLASS_$___JSClassProvider in:
/Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionModule.o)
/Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionModule.o)
duplicate symbol _OBJC_METACLASS_$___JSClassProvider in:
/Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionModule.o)
/Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionModule.o)
duplicate symbol _OBJC_CLASS_$_JSObjectionModule in:
/Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionModule.o)
/Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionModule.o)
duplicate symbol _OBJC_METACLASS_$_JSObjectionModule in:
/Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionModule.o)
/Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionModule.o)
duplicate symbol _OBJC_IVAR_$_JSObjectionProviderEntry._provider in:
/Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionProviderEntry.o)
/Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionProviderEntry.o)
duplicate symbol _OBJC_IVAR_$_JSObjectionProviderEntry._lifeCycle in:
/Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionProviderEntry.o)
/Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionProviderEntry.o)
duplicate symbol _OBJC_IVAR_$_JSObjectionProviderEntry._storageCache in:
/Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionProviderEntry.o)
/Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionProviderEntry.o)
duplicate symbol _OBJC_IVAR_$_JSObjectionProviderEntry._block in:
/Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionProviderEntry.o)
/Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionProviderEntry.o)
duplicate symbol _OBJC_CLASS_$_JSObjectionProviderEntry in:
/Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionProviderEntry.o)
/Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionProviderEntry.o)
duplicate symbol _OBJC_METACLASS_$_JSObjectionProviderEntry in:
/Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionProviderEntry.o)
/Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionProviderEntry.o)
duplicate symbol _OBJC_METACLASS_$_JSObjectionRuntimePropertyReflector in:
/Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionRuntimePropertyReflector.o)
/Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionRuntimePropertyReflector.o)
duplicate symbol _OBJC_CLASS_$_JSObjectionRuntimePropertyReflector in:
/Users/devendrapatel/Sample-Project/Linklyy/iOS/Linklyy/Objection-iOS.framework/Objection-iOS(JSObjectionRuntimePropertyReflector.o)
/Users/devendrapatel/Library/Developer/Xcode/DerivedData/Linklyy-dwuyvbeuilhglaangpauxurclyhw/Build/Products/Debug-iphonesimulator/libPods.a(JSObjectionRuntimePropertyReflector.o)
ld: 40 duplicate symbols for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I see that the architecture should be changed based on the warning, but there is also a linker error present. Can anyone help me figure out the cause of the inker error? I'm sure that it is something related to Objection.h. Please, don't hesitate to ask for more information if necessary.
Check targets for the JSObjection. It's look like the JSObjection included in the App target and a Pods target at the same time. It is also possible that libJSObjection.a is linked with the Pods and with the main App.
Sundown a (formerly) popular Markdown editor includes an examples directory, and I want to play around with it on the command line, but I'm having difficulties.
I navigate to examples, I run gcc sundown.c -o sundown and it complains that I don't have markdown.h. So I dump the contents of the src directory and the html directory into the examples category, and run it.
I then get:
Undefined symbols for architecture x86_64:
"_bufgrow", referenced from:
_main in sundown-3bac08.o
"_bufnew", referenced from:
_main in sundown-3bac08.o
"_bufrelease", referenced from:
_main in sundown-3bac08.o
"_sd_markdown_free", referenced from:
_main in sundown-3bac08.o
"_sd_markdown_new", referenced from:
_main in sundown-3bac08.o
"_sd_markdown_render", referenced from:
_main in sundown-3bac08.o
"_sdhtml_renderer", referenced from:
_main in sundown-3bac08.o
What exactly am I doing wrong here? I feel like this should be relatively simple, I'm just at wits end trying to figure out what I'm doing wrong.
you tell gcc where to obtain #include files by adding the parameter:
'-Ipathtoincludes'
you tell gcc where to obtain the needed libraries by adding the parameters:
'-Lpathtoolibrary' and '-lshortlibraryname
note: the -l is lower case 'L'
The library path and library name parameters must be last in the gcc command line, as the linker looks at the linker parameters in the order listed on the command line
My code is identical to this question I asked earlier so there's no point in duplicating it here
This is the error I am getting:
Undefined symbols for architecture x86_64:
"_stdscr", referenced from:
_screen_init in screen.o
"_werase", referenced from:
_screen_init in screen.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I've had this error in the past and I feel like it has something to do with a duplicate function name or something, but I have no idea how to debug this.
EDIT:
After adding the libncurses.dylib file to my project, the errors discussed above have disappeared, but a new error has emerged when I call screen_init(); in my main.cpp:
// main.cpp
#include "screen.h"
int main(){
screen_init();
}
// new error
Undefined symbols for architecture x86_64:
"screen_init()", referenced from:
_main in main.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Pretty much the same error except now in my main. Is there another library I am missing? These errors are very mysterious and not very helpful.
I guess you need to add the library to your link phase, if you are going with XCode you should add it in project details:
choose project details
choose build phases tab
open link binary with libraries part
click the plus symbol
add libncurses.dylib to your project.