Monday, September 13, 2004

I builded the framework of CyberLink for C++ using Xcode, and copy the directory to the system framework directory. However I could not include the headers from other Xcode projects as follows.
>cd CyberLink/lib/macx/Xcode/build

>mv CyberLink.framework/ /System/Library/Frameworks/
........
Building target MediaGate with build style Development (optimization:level 0, debug-symbols:on) (1 error)
......../CyberLink/sample/media/server/macx/Xcode/MediaServer.h:10:34: cybergarage/upnp/UPnP.h: No such file or directory
In file included from ......../CyberLink/sample/media/server/macx/Xcode/MediaServer.mm:9:
Therefore, I builded the CyberLink on the console as the following, and installed the header and the library into /usr/local.
>cd CyberLink

>chmod a+x boostrap configure
>./boostrap
>./configure
>make
>mkdir /usr/local/include/cybergarage
>cp -r include/cybergarage /usr/local/include/cybergarage
>cp lib/unix/libclink.a /usr/local/lib/
Then I added the source codes of the CyberLink to a Cocoa project of Xcode, but the following errors occured because <id>is a reserved word of Objective-C.
Building target MediaGate with build style Development (optimization:level 0, debug-symbols:on) ? (11 errors)

In file included from /usr/local/include/cybergarage/upnp/Service.h:24,
from /usr/local/include/cybergarage/upnp/Device.h:27, from /usr/local/include/cybergarage/upnp/CyberLink.h:19,
from /Users/skonno/Development/CyberLink/sample/media/server/macx/Xcode/MediaServer.h:11,
from /Users/skonno/Development/CyberLink/sample/media/server/macx/Xcode/MediaServer.mm:9:
/usr/local/include/cybergarage/upnp/event/NotifyRequest.h: In member function `void CyberLink::NotifyRequest::setSID(const char*)':
/usr/local/include/cybergarage/upnp/event/NotifyRequest.h:87: error: undefined type `id', please import
/usr/local/include/cybergarage/upnp/event/NotifyRequest.h:87: error: parse error before `;' token
/usr/local/include/cybergarage/upnp/event/NotifyRequest.h:87: error: parse error before `;' token
Therefore, I checked the all header files of the CyberLink, and I could merge the following codes for the CyberLink to a Cocoa project of Xcode.
#import <Cocoa/Cocoa.h>

#include <objc/objc.h>
#include <cybergarage/upnp/MediaServer.h>

@interface MediaServer : NSObject
{
CyberLink::MediaServer *mserver;
}
- (id) init;
@end

#import "MediaServer.h"

using namespace std;
using namespace CyberLink;

@implementation MediaServer

- (id) init
{
[super init];
mediaServer = new MediaServer();
return self;
}

Comments:
What is the current status of this media server? I finally managed to get it to compile with the Xerces headers by fiddling around with the header search paths. Having done that it worked out fine (I just added the header paths to point to the xerces-2.6.0/src and it works out fine.
 
Good design!
[url=http://mnqxpuia.com/ytwu/xlty.html]My homepage[/url] | [url=http://yorlwenf.com/kzqd/acdm.html]Cool site[/url]
 
Good design!
My homepage | Please visit
 
Nice site!
http://mnqxpuia.com/ytwu/xlty.html | http://jpaagjfa.com/deaf/xxgg.html
 
Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?