Please forgive me if this is a duplicate post - I got a bounce for
the original post so not sure if it got here or not.
Newbie question re linker.
I decided it would be better to separate my code into various .cpp/.h
files instead of having everything in main.c.
To start with I moved just one function ( PresenterWindowEvHandler )
into presenter.h and presenter.cpp
It is declared in presenter.h as
pascal OSStatus PresenterWindowEvHandler(EventHandlerCallRef
callRef, EventRef event, void *userData);
and implemented in presenter.cpp, my main.c file has this line:
#include <presenter.h>
My app is a straightforward carbon app, in XCode 1.5
The whole app builds without any warnings or errors, and presenter.h
and presenter.cpp are both under 'sources' in the project window.
The problem is that when I run the app it immediately exists with
this error:
[Session started at 2005-10-28 17:54:59 +0100.]
ZeroLink: unknown symbol '_PresenterWindowEvHandler'
Not sure where to go from here with this, I have a confession to
make... in my day job I'm a Visual C++ developer for the dark
(Windows) side. In VC++ I don't need to do anything other than I've
done above.
Is it because main.c is a '.c' file and the new file is '.cpp' or is
there some other thing I need to do to get the code in my new files
linked into the final app?????
Thanks in advance for helping out a poor newbie.
-Kenny
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden