1

I am facing an issue while upgrading wolfssl to 4.4.0 in internal tool.

Any help/hints would be highly appreciated.

Below are the steps/process followed to do so -

wolfssl-4.4.0 code copied to tool/main project.

wolfssl-4.4.0 added as a project in the tool Solution/sln.

Required macros have been enabled in wolfssl-4.4.0 project.

Dir-Path for the output library is configured.

Newly added wolfssl-4.4.0 project compiled & lib is generated in the configured dir.

Now the startup project / main project "test tool" is configured for newly added wolfssl-4.4.0 - Include directory path is updated in Test tool.

The Required macros have been enabled in the Test tool.

On the start of the build compilation -

all the sub-projects compiled successfully.

Encounters compilation error the moment it starts "Test tool"/main project/startup project compilation.

Error is pointing to wolfssl file, error is -

wolfssl-4.4.0\wolfssl\wolfcrypt\asn.h(75) : error C2059: syntax error : 'string'

Error code & location seems to not be very useful to resolve it. Note - MVS2008 has been used to build test tool.

We have verified below mentioned possible missing configurations -

  1. All required macro.
  2. Include path for directory.
  3. Library path & generation.
  4. Availability of required files.
  5. configuration - comparison with existing library which is working well.

Please suggest anything which can help us to resolve mentioned error. Thanking You.

Nitin
  • 13
  • 4
  • 1
    This typically happens when there is a "extern "C"" declaration without a macro guard. For example if your application is being compiled as "C" code and you have it wrapped with an extern "C" this error is often thrown. Try wrapping it with: #ifdef __cplusplus extern "C" { #endif Example: https://github.com/wolfSSL/wolfssl/blob/master/wolfssl/crl.h#L33-L35 https://github.com/wolfSSL/wolfssl/blob/master/wolfssl/crl.h#L45-L47 – Kaleb Aug 14 '20 at 15:56
  • Thanks for your comment. Yes you are correct but in this case above mentioned protection is already available in code. its library conflict issue. multiple occurrences is found in included library. proper conflict resolution required while compiling main project. – Nitin Aug 14 '20 at 21:12
  • this: *wolfssl-4.4.0\wolfssl\wolfcrypt\asn.h(75) : error C2059: syntax error : 'string'* says there is a syntax error at line 75 in the header file: `asn.h` If that is a a prototype for a function call, then look in the source code for a call to that function. What is the contents of line 74, 75, 76? – user3629249 Aug 15 '20 at 02:59
  • Thanks for comment. 74-75-76 lines are part of enum - enum { ISSUER = 0, SUBJECT1 = 1, BEFORE = 0, AFTER = 1 }; – Nitin Aug 15 '20 at 11:30

0 Answers0