Undefined Reference

I’m using this code:

SIM900 Serial Debug 

This sketch is used to communicate with SIM900 with AT commands.

create on 2013/12/5, version: 0.1
by lawliet.zou(lawliet.zou@gmail.com)

#include <sim900_Suli.h>
#include <SoftwareSerial.h>
#include <Wire.h>
#include <Suli.h>

const int pin_tx = 7;
const int pin_rx = 8;

SoftwareSerial gprs(pin_tx,pin_rx);//TX,RX

void setup(){
  sim900_init(&gprs, -1, 9600);

void loop(){

But I keep getting an undefined reference to “suli_uart_init(void*, short, unsigned long)” in the .cpp file.

This is the relevant code from the .cpp

void  sim900_init(void * uart_device, int16 uart_num, uint32 baud)
    serialSIM900 = (SoftwareSerial*)uart_device;
    suli_uart_init(uart_device, uart_num, baud);

But I don’t know what is wrong, or what I need to change to make this work.

Where is the suli_uart_init function defined?

All I can find is

void suli_uart_init(void * uart_device, int16 uart_num, uint32 baud);

within the suli.h file.

Here are the three files, I don’t know if there is something I’m missing?

sim900_Suli.cpp (7.14 KB)

sim900_Suli.h (2.83 KB)

Suli.h (5.19 KB)

suli.cpp is missing, download it from github:


Thank you! It's working now!