[missing-sync-palmos-dev-talk] Bridge Library Questions
Scott Gruby
sgruby at markspace.com
Mon Apr 17 09:23:47 PDT 2006
On Apr 17, 2006, at 8:58 AM, Mark Chung wrote:
> I tried building the sample conduit with the updated bridge library
> in XCode 2.2.1, and got an error (below). Missing Sync is not
> installed. I got a similar error building my conduit with the new
> library, though when I reverted back to the old library, it built
> successfully. I'm interested in trying the new library because I
> just got a bug report from a user who is running 10.3.9.
>
> Building target “SampleConduit” of project “SampleConduit” — (1 error)
> cd /Users/mchung/Desktop/SampleCode.1/SampleConduit
> /usr/bin/g++-4.0 -o /Users/mchung/Desktop/SampleCode.1/
> SampleConduit/build/Development/SampleConduit.plugin/Contents/MacOS/
> SampleConduit -L/Users/mchung/Desktop/SampleCode.1/SampleConduit/
> build/Development -L/Users/mchung/Desktop/SampleCode.1/
> SampleConduit -F/Users/mchung/Desktop/SampleCode.1/SampleConduit/
> build/Development -filelist /Users/mchung/Desktop/SampleCode.1/
> SampleConduit/build/SampleConduit.build/Development/
> SampleConduit.build/Objects-normal/ppc/SampleConduit.LinkFileList -
> framework Carbon -lMissingSyncBridge -arch ppc -bundle -mmacosx-
> version-min=10.3 -isysroot /Developer/SDKs/MacOSX10.3.9.sdk
> /usr/bin/ld: Undefined symbols:
> loadBridge()
> unloadBridge()
> collect2: ld returned 1 exit status
> /usr/bin/ld: Undefined symbols:
> loadBridge()
> unloadBridge()
> collect2: ld returned 1 exit status
> Build failed (1 error)
>
The bridge.h header file needs extern C wrappers for the functions.
I've updated the sample code with the new header file; hopefully
there aren't other things that I missed. The new bridge.h file is:
#include <Carbon/Carbon.h>
#include "SYNCMGR.H"
#include "UserMgr.h"
#ifdef __cplusplus
extern "C" {
#endif
bool loadBridge(void);
void unloadBridge(void);
#ifdef __cplusplus
}
#endif
// Since our conduit gets unloaded, the normal CFSTR is referencing
an object that can go away
#ifdef CFSTR
#undef CFSTR
#define CFSTR(x) ::CFStringCreateWithCString( kCFAllocatorDefault,
x, ::GetApplicationTextEncoding() )
#endif
--
Scott Gruby
Lead Engineer
Mark/Space, Inc.
<http://www.markspace.com/>
Please visit <http://www.markspace.com/support/> for assistance with
Mark/Space products.
More information about the missing-sync-palmos-dev-talk
mailing list