From the error I am getting:
ld: duplicate symbol _main in /Users/wostler/Library/Developer/Xcode/DerivedData/UIPageViewControllerDemo-hjsgatcuhsxeokdnubifybpivzum/Build/Intermediates/UIPageViewControllerDemo.build/Debug-iphonesimulator/UIPageViewControllerDemo.build/Objects-normal/i386/fmdb.o and /Users/wostler/Library/Developer/Xcode/DerivedData/UIPageViewControllerDemo-hjsgatcuhsxeokdnubifybpivzum/Build/Intermediates/UIPageViewControllerDemo.build/Debug-iphonesimulator/UIPageViewControllerDemo.build/Objects-normal/i386/main.o for architecture i386
I can't figure out why this error is occurring. I simply changed some framework files in my project and now this error won't go away! It obviously says _main is being duplicated, but I dont know where, or why?
What is causing this?
You need to look at the main.m/.h and fmdb.m/.h files. What is most likely is that they are both importing something that defines _main, perhaps at a global level. Usually thats the sort of thing that generates this error for me.
You have two main
function in your code. Do a global search for main
and remove the one you don't want.
It happens when you add some other project's files to your project without remove the main
function.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With