Linking to RTCS problem (MQX 4.1, C++)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Linking to RTCS problem (MQX 4.1, C++)

Jump to solution
645 Views
michael_wahler
Contributor III

Hi everyone,

I would like to send and receive UDP (or TCP) packets with a C++ application. Since I have not found any other documentation for the networking API, I am copy-pasting parts of the HTTP server example to my C++ code.

The first problem I am running into is that the linker cannot find ipcfg_init_device. Since this symbol is defined in ipcfg.h, which is part of RTCS, I added rtcs.a in the C/C++ Build Settings->Tool Settings->ARM Ltd Windows GCC C++ Linker->Miscellaneous->Other objects. However, this did not help.

My questions are

  • What is the correct way of linking with RTCS?
  • Are there any good examples for simple TCP/UDP communication with MQX 4.1?

Kind regards

Michael

Labels (1)
Tags (5)
0 Kudos
1 Solution
430 Views
Martin_
NXP Employee
NXP Employee

For the linking RTCS from a C++ source code, make sure you put RTCS include files into extern "C" brackets. Example:

extern "C" {

#include "ipcfg.h"

....

...

}

View solution in original post

0 Kudos
2 Replies
431 Views
Martin_
NXP Employee
NXP Employee

For the linking RTCS from a C++ source code, make sure you put RTCS include files into extern "C" brackets. Example:

extern "C" {

#include "ipcfg.h"

....

...

}

0 Kudos
430 Views
michael_wahler
Contributor III

Thanks! This does the trick.

0 Kudos