xcode - problem building active traget, get error message

for many of the example apps I am getting the follow error message.

why? how can i fix this?

thanks,

Linking /Application/of_preRelease_v0.06_xcode_FAT/apps/updReiceive/bin//openFrameworksDebug.app/Contents …

duplicate symbol _main in /Applications/of_preRelease_v0.06_xcode_FAT/apps/my/udpReceive/build/openFrameworks.build/Debug/openFrameworks.build/Objects-normal/i386/main-81274D42.o and /Applications/of_preRelease_v0.06_xcode_FAT/apps/my/udpReceive/build/openFrameworks.build/Debug/openFrameworks.build/Objects-normal/i386/main-F1DD098B.o

Command /Developer/usr/bin/g+±4.0 failed with exit code 1

Running custom shell script (1 error)

install_name_tool: can’t open file: /Applications/of_preRelease_v0.06_xcode_FAT/apps/my/udpReceive/bin//openFrameworksDebug.app/Contents/MacOS/openFrameworksDebug (No such file or directory)

Command /bin/sh failed with exit code 1

greetings!

here

duplicate symbol _main

the compiler is telling you that you have two “main” functions in this compiled app – can you check if you have accidently brought in a second main.cpp file somewhere, either via the addon example code or otherwise?

hope that helps,
zach

Hi Zach.

Ok i found the problem.

True there were many copies of main.cpp.

In just drag the addons from the finder in to the addons folder in xcode. and since some addons have example folder, each of them brought in a main.cpp.

thanks for the pointer.

stephan.

[quote author=“zach”]greetings!

here

duplicate symbol _main

the compiler is telling you that you have two “main” functions in this compiled app – can you check if you have accidently brought in a second main.cpp file somewhere, either via the addon example code or otherwise?

hope that helps,
zach[/quote]

Hey zach.
Had the same problem. Just wanted to say thank you for you hint about the main.cpp in an addon. :slight_smile:

greets from germany
Christian