Skip to content

Added matching extern C closing bracket - #4

Open
marcirsch wants to merge 1 commit into
boschsensortec:mainfrom
marcirsch:fix-missing-extern-c
Open

Added matching extern C closing bracket#4
marcirsch wants to merge 1 commit into
boschsensortec:mainfrom
marcirsch:fix-missing-extern-c

Conversation

@marcirsch

Copy link
Copy Markdown

Hey there! 👋

Problem

I wanted to use the bmi323 driver in a CPP project and got an unmatched bracket compiler error. Figured that it is because of the missing extern "C" { closing bracket from the end of the file.

.././drivers/bmi323/bmi323.h:54:1: note: 'extern "C"' linkage started here
   54 | extern "C" {
      | ^~~~~~~~~~
../src/SensorController.cpp:263:2: error: expected '}' at end of input
  263 | }
      |  ^
.././drivers/bmi323/bmi323.h:54:12: note: to match this '{'
   54 | extern "C" {
      |            ^

Solution

I have added the closing brackets to the end of the header files for both bmi3.h and bmi323.h which fixed the compiler errors. I guess the intention was to enclose all function declarations, but let me know if it should be moved. 🙂

Cheers

@marcirsch

Copy link
Copy Markdown
Author

@kegov @BST-Github-Admin Cannot add reviewers, so tagging you here

@kegov

kegov commented Feb 7, 2024

Copy link
Copy Markdown
Contributor

@marcirsch , thanks for bringing this to our attention. Let me check if we already have a newer version with this issue patched.

@marcirsch

Copy link
Copy Markdown
Author

@kegov Do you have any update on this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants