PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

I Have a Problem~ (iPhone)

I copied helloworld project(sample).

so, I get a below error message

----------------------------------------------------
Building target “Simulator” of project “EDGELIB” with configuration “Debug” — (1 error)

duplicate symbol _main in /Project/EDGELIB/Library/Simulator/libedge.a(cevent.o) and /Project/EDGELIB/build/EDGELIB.build/Debug-iphonesimulator/Simulator.build/Objects-normal/i386/main-26D6EFA4.o

cd /Project/EDGELIB
setenv MACOSX_DEPLOYMENT_TARGET 10.5
setenv PATH
----------------------------------------------------

Image

please help me. What can i do for build process?

What's the problem?
Planet9Dave · 17 May 2009, 19:10 UTC
I'm not certain without access to your source code, but you should not have:
Code:

int main ( int argc, char * argv[] )

anywhere in your own code. libedge provides the main loop for you. You should just have a class derived from ClassEdge, and the closest to 'main' is Edge's hook to get a pointer to an instance of your class, something like mine:
Code:

ClassEdge *EdgeMain(EDGESTARTUP *data)
{
#if defined WIN32 && ! defined _WIN32_WCE
// just for debug purposes, turn this off eventually, or else go back and provide some kind of GUI pop-up messaging
AllocConsole();
freopen("conin$", "r", stdin);
freopen("conout$", "w", stdout);
freopen("conout$", "w", stderr);
#endif
printf("EdgeMain(): start-up data:\n\tcommand line: %s\n", data->commandline);
return ( new MainEdgeClass );
}
Hi,

I think you're using the default source files when creating a new project. Please remove those and replace them with your own code using the EDGELIB framework.
binarybard · 21 May 2009, 01:50 UTC — Thanks!
I didn't delete *.m file.

Thank you.