"Anil Vedururu" <[EMAIL PROTECTED]> wrote in message news:77280@palm-dev-forum... > > When I create multiple targets in a C++ project, the second target on 'Make' > gives a linker error. > "Link Error : __RuntimeModule__: '__Startup__' referenced from > '__DummyStartup__' is undefined." > How do I rectify this?? > > This Link Error does not come if I create multiple targets in a C project. > > In the second target of both the projects I have very minimal code. Infact, > just the __Startup__ function.
Then your problem is name mangling. You need to declare __Startup__ as extern "C", since C++ compilation normally causes the function names to be altered to include information on the parameter types. You can see the mangling work when you use the "disassemble" command on the file. Using extern "C" in front of the function tells the compiler to use the C naming convention and not to add in the parameter info. > As an aside, in the C project, if I enable the Activate C++ compiler setting > (C/C++ Language settings group) > of the second target and 'Make' the second target, I get the same Link error > in this project too. > some light on this please!! "Activate C++" really means "Force C++ Compilation". It makes the compiler treat .c files as if they were .cpp. A .cpp file is always built as C++. -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
