Dynamic Languages (Node.JS, Python, PHP, C/C++, Webserver Agent)

cancel
Showing results for 
Search instead for 
Did you mean: 

C++ Agent Testing

New Poster

C++ Agent Testing

We have update the licesne to AppDynamics Any, and we are testing instrumentation of C++ apllication, but we are getting error pasted below, we are using the example shown in below link, but it seems something is wrong.

We are using test app for snakegame for this purpose on Linux using g++ complier.

 

https://docs.appdynamics.com/pages/viewpage.action?pageId=35457138

 

snakeGame.cpp: In function ‘int main()’:
snakeGame.cpp:276:41: error: too few arguments to function ‘void appd_config_init(appd_config*)’
appd_config* cfg = appd_config_init(); // appd_config_init() resets the configuration object and pass back an handle/pointer
^
In file included from snakeGame.cpp:8:0:
/opt/AppDynamics/appdynamics-sdk-native/sdk_lib/appdynamics.h:100:15: note: declared here
APPD_API void appd_config_init(struct appd_config* cfg);
^
snakeGame.cpp:277:43: error: ‘appd_config_set_app_name’ was not declared in this scope
appd_config_set_app_name(cfg, APP_NAME);
^
snakeGame.cpp:278:45: error: ‘appd_config_set_tier_name’ was not declared in this scope
appd_config_set_tier_name(cfg, TIER_NAME);
^
snakeGame.cpp:279:45: error: ‘appd_config_set_node_name’ was not declared in this scope
appd_config_set_node_name(cfg, NODE_NAME);
^
snakeGame.cpp:280:57: error: ‘appd_config_set_controller_host’ was not declared in this scope
appd_config_set_controller_host(cfg, CONTROLLER_HOST);
^
snakeGame.cpp:281:57: error: ‘appd_config_set_controller_port’ was not declared in this scope
appd_config_set_controller_port(cfg, CONTROLLER_PORT);
^
snakeGame.cpp:282:63: error: ‘appd_config_set_controller_account’ was not declared in this scope
appd_config_set_controller_account(cfg, CONTROLLER_ACCOUNT);
^
snakeGame.cpp:283:69: error: ‘appd_config_set_controller_access_key’ was not declared in this scope
appd_config_set_controller_access_key(cfg, CONTROLLER_ACCESS_KEY);
^
snakeGame.cpp:284:63: error: ‘appd_config_set_controller_use_ssl’ was not declared in this scope
appd_config_set_controller_use_ssl(cfg, CONTROLLER_USE_SSL);
^
snakeGame.cpp:286:33: error: cannot convert ‘appd_config**’ to ‘const appd_config*’ for argument ‘1’ to ‘int appd_sdk_init(const appd_config*)’
int initRC = appd_sdk_init(&cfg);
^
snakeGame.cpp:301:67: error: ‘nullptr’ was not declared in this scope
const appd_bt_handle btHandle = appd_bt_begin("Checkout", nullptr);
^
snakeGame.cpp:303:19: error: ‘Sleep’ was not declared in this scope
Sleep(1000);

C++ Agent Testing
2 REPLIES 2
New Poster

Re: C++ Agent Testing

Does anyone tested any c++ application ? Is it possible to share the source code and sdk configuration made ?


@Amanpreet.Bansal wrote:

We have update the licesne to AppDynamics Any, and we are testing instrumentation of C++ apllication, but we are getting error pasted below, we are using the example shown in below link, but it seems something is wrong.

We are using test app for snakegame for this purpose on Linux using g++ complier.

 

https://docs.appdynamics.com/pages/viewpage.action?pageId=35457138

 

snakeGame.cpp: In function ‘int main()’:
snakeGame.cpp:276:41: error: too few arguments to function ‘void appd_config_init(appd_config*)’
appd_config* cfg = appd_config_init(); // appd_config_init() resets the configuration object and pass back an handle/pointer
^
In file included from snakeGame.cpp:8:0:
/opt/AppDynamics/appdynamics-sdk-native/sdk_lib/appdynamics.h:100:15: note: declared here
APPD_API void appd_config_init(struct appd_config* cfg);
^
snakeGame.cpp:277:43: error: ‘appd_config_set_app_name’ was not declared in this scope
appd_config_set_app_name(cfg, APP_NAME);
^
snakeGame.cpp:278:45: error: ‘appd_config_set_tier_name’ was not declared in this scope
appd_config_set_tier_name(cfg, TIER_NAME);
^
snakeGame.cpp:279:45: error: ‘appd_config_set_node_name’ was not declared in this scope
appd_config_set_node_name(cfg, NODE_NAME);
^
snakeGame.cpp:280:57: error: ‘appd_config_set_controller_host’ was not declared in this scope
appd_config_set_controller_host(cfg, CONTROLLER_HOST);
^
snakeGame.cpp:281:57: error: ‘appd_config_set_controller_port’ was not declared in this scope
appd_config_set_controller_port(cfg, CONTROLLER_PORT);
^
snakeGame.cpp:282:63: error: ‘appd_config_set_controller_account’ was not declared in this scope
appd_config_set_controller_account(cfg, CONTROLLER_ACCOUNT);
^
snakeGame.cpp:283:69: error: ‘appd_config_set_controller_access_key’ was not declared in this scope
appd_config_set_controller_access_key(cfg, CONTROLLER_ACCESS_KEY);
^
snakeGame.cpp:284:63: error: ‘appd_config_set_controller_use_ssl’ was not declared in this scope
appd_config_set_controller_use_ssl(cfg, CONTROLLER_USE_SSL);
^
snakeGame.cpp:286:33: error: cannot convert ‘appd_config**’ to ‘const appd_config*’ for argument ‘1’ to ‘int appd_sdk_init(const appd_config*)’
int initRC = appd_sdk_init(&cfg);
^
snakeGame.cpp:301:67: error: ‘nullptr’ was not declared in this scope
const appd_bt_handle btHandle = appd_bt_begin("Checkout", nullptr);
^
snakeGame.cpp:303:19: error: ‘Sleep’ was not declared in this scope
Sleep(1000);


 

AppDynamics Team

Re: C++ Agent Testing

Hi Amapreet,

 

Seems like you are using an older version of SDK agent library and header and the application code follows the newer format of APIs.Hence the compilation error.

 

What is the SDK version that you are using?

 

Thanks,

Sajna Sreenivasan

 



Found something helpful? Click the Accept as Solution button to help others find answers faster.
Liked something? Click the Thumbs Up button.