|
本人新手,刚刚开始接触CSR8670系列的东西。从IDE到编程方式各种不懂。这两天刚刚到了一块开发板,抱着先改个程序玩玩儿的心态,改了一小段代码,然后就受了无比大的打击。。
我在程序中用了ConnectionInitEx2这个函数,根据ADK中给出的API手册查出了头文件也加上了,编译也通过了,就是在链接的时候报了一个错误:
ld: Undefined symbols:
$_ConnectionInitEx2
没有符号链接,,,没有,,,没有,,,没有符号链接,,为啥呢,,,?
求各路大神解答。新手感激不尽!!!!
代码如下:
#include <connection.h>
#include <stdio.h>
#include <print.h>
#include <message_.h>
#include <boot.h>
#include "sink_debug.h"
#include "sink_private.h"
/* Single instance of the device state */
hsTaskData g_stTheSink;
extern void _init(void);
/*************************************************************************
NAME
app_handler
DESCRIPTION
This is the main message handler for the Sink Application. All
messages pass through this handler to the subsequent handlers.
RETURNS
VOID
*************************************************************************/
static void app_handler(Task task, MessageId id, Message message)
{
DEBUG(("app_handler [%s]\n", __TIME__));
return;
}
/*************************************************************************
NAME
app_handler
DESCRIPTION
Time critical initialisation
RETURNS
VOID
*************************************************************************/
void _init(void)
{
DEBUG(("_init [%s]\n", __TIME__));
g_stTheSink.task.handler = app_handler;
return;
}
/*************************************************************************
NAME
main
DESCRIPTION
The Sink Application starts here...
RETURNS
int
*************************************************************************/
int main(void)
{
uint16 usBootMode;
DEBUG(("Main [%s]\n", __TIME__));
usBootMode = BootGetMode();
switch (usBootMode)
{
#ifdef CVC_PRODTEST
case BOOTMODE_CVC_PRODTEST:
/*run the cvc prod test code and dont start the applicaiton */
cvcProductionTestEnter() ;
break ;
#endif
case BOOTMODE_DFU:
/*do nothing special for the DFU boot mode,
This mode expects to have the appropriate host interfface enabled
Don't start the application */
break ;
case BOOTMODE_DEFAULT:
case BOOTMODE_CUSTOM:
case BOOTMODE_USB_LOW_POWER:
case BOOTMODE_ALT_FSTAB:
default:
{
/*the above are application boot modes so kick of the app init routines*/
const msg_filter usMsgFilter = msg_group_acl;
uint16 usPdlNumberOfDevices = 1;
/* the number of paired devices can be restricted using pskey user 40,
a number between 1 and 8 is allowed
PsRetrieve(PSKEY_PAIRED_DEVICE_LIST_SIZE, &usPdlNumberOfDevices , sizeof(uint16));*/
DEBUG (("PDLSize[%d]\n" , usPdlNumberOfDevices));
/* Initialise the Connection Library with the options */
ConnectionInitEx2(&g_stTheSink.task, &usMsgFilter, usPdlNumberOfDevices );
}
break;
}
/* Start the message scheduler loop */
MessageLoop();
/* You never get here... */
return 0;
}
|
|