Error lnk2019


#1

Hello all again.

I'm re-developing an old app. I compile it without modifying and it works fine. The problem is that when I try to use wm_atSendCommand, I get "error LNK2019: unresolved external symbol _wm_atSendCommand referenced in function _adl_main". I have included "wm_apm.h" library and still doesn't work. 

What i’m trying to do is this:

wm_atSendCommand(16,WM_AT_SEND_RSP_TO_EMBEDDED,“AT+IPR=9600\r”);

I have also tried wm_atSendCommandExt and I get the same message. I have tried several parameters and stays the same… I’ve even created a new proyect with new files with the same code.
Could anyone gime me a hand with this? Thank you very much in advance.


#2

I forgot to mention that i’m using a Wavecom Fastrack M1306B modem


#3

wm_atSendCommand( ) should be used only when you are using “Basic” model to develop your program. If you have chosen ADL model then you should use ADL APIs, e.g. adl_atCmdCreate( )


#4

So if I want to launch an existing AT command when the application is starting, should I create the command and then use a handler, or by just creating it with adl_atCmdCreate would be enough?


#5

Ok, I’ve found it, so I reply in case someone needs it. The code I was looking for is this:

adl_atCmdCreate(“AT+IPR=9600”, ADL_AT_PORT_TYPE(ADL_PORT_UART1, TRUE), (adl_atRspHandler_t)NULL, NULL);

Hope it helps.