Updating SNMP for v3.x Project

Discussion to talk about software related topics only.
Post Reply
SeeCwriter
Posts: 556
Joined: Mon May 12, 2008 10:55 am

Updating SNMP for v3.x Project

Post by SeeCwriter » Thu Nov 17, 2022 2:01 pm

I'm upgrading SNMP used in projects built with v2.x tools to work in projects built with v3.x tools. The SNMP files are C files. During compilation header file <file/udefs.h> is included, which throws an error:

C:/nburn/nbrtos/include/file/udefs.h:35:8: error: expected identifier or '(' before string constant
extern "C++"

The error is caused by statement "extern "C++" at the top of the file, line 35:

Code: Select all

#ifndef NB_BARE_METAL
extern "C++"
{
#include <nbrtos.h>
}
#endif
The same file in the v2.x tools only has this statement at the top of the file:

Code: Select all

#ifdef __cplusplus
extern "C" {
#endif
Would this change to the v3.x file work:

Code: Select all

#if !defined( NB_BARE_METAL ) && !defined( __cplusplus )
extern "C++"
{
#include <nbrtos.h>
}
#endif

SeeCwriter
Posts: 556
Joined: Mon May 12, 2008 10:55 am

Re: Updating SNMP for v3.x Project

Post by SeeCwriter » Thu Nov 17, 2022 2:20 pm

Actually, my idea is not going to work. What do you suggest?

User avatar
TomNB
Posts: 471
Joined: Tue May 10, 2016 8:22 am

Re: Updating SNMP for v3.x Project

Post by TomNB » Fri Nov 18, 2022 11:39 am

Who's SNMP package are you using?

SeeCwriter
Posts: 556
Joined: Mon May 12, 2008 10:55 am

Re: Updating SNMP for v3.x Project

Post by SeeCwriter » Fri Nov 18, 2022 1:40 pm

DMH Software.

User avatar
TomNB
Posts: 471
Joined: Tue May 10, 2016 8:22 am

Re: Updating SNMP for v3.x Project

Post by TomNB » Fri Nov 18, 2022 3:22 pm

The do have a port to our 3.x platform. However, we do not have their code or do the integration here. Have you tried contacting them? I have not seen extern commands like that before.

SeeCwriter
Posts: 556
Joined: Mon May 12, 2008 10:55 am

Re: Updating SNMP for v3.x Project

Post by SeeCwriter » Sat Nov 19, 2022 9:34 pm

I'm not sure what you mean when you say "I have not seen extern commands like that before." They are in your file. undef.h is not a DMH file.
The DMH implementation of SNMP saves configuration data to the module's flash memory. So it includes the headers for being able to use the fs_ functions.
I've contacted DMH about this and they are looking into it also.

User avatar
pbreed
Posts: 1055
Joined: Thu Apr 24, 2008 3:58 pm

Re: Updating SNMP for v3.x Project

Post by pbreed » Mon Nov 21, 2022 4:38 am

udef.h is not one of ours...

Post Reply