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

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

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

ソリューションへジャンプ
811件の閲覧回数
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

ラベル(1)
タグ(5)
0 件の賞賛
返信
1 解決策
596件の閲覧回数
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 件の賞賛
返信
2 返答(返信)
597件の閲覧回数
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 件の賞賛
返信
596件の閲覧回数
michael_wahler
Contributor III

Thanks! This does the trick.

0 件の賞賛
返信