Skip to content

Fix extern "C" prototype generation #128

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 25, 2016
Merged

Conversation

facchinm
Copy link
Member

Adds extern "C" as function modifier
Probably needs some testing for regressions (although the unit test are all passing)
Fixes #126
@igrr
arduino-builder-pr128.zip

@igrr
Copy link

igrr commented Mar 16, 2016

Thanks! Is there a way to get an OS X binary of arduino-builder for this pull request, or should I build from source?

@facchinm
Copy link
Member Author

I'm adding the build for all OS right now 😄

@leodesigner
Copy link

leodesigner commented Oct 6, 2016

Hi,
The extern declaration like this is still not working:

extern "C" { 
  void test() {}
}
sketch_oct06a:12: error: previous declaration of 'void test()' with 'C++' linkage
   void test() {}
      ^
sketch_oct06a:12: error: conflicts with new declaration with 'C' linkage
   void test() {}
             ^
exit status 1
previous declaration of 'void test()' with 'C++' linkage

It used to work before in arduino version before 1.6.9

@facchinm
Copy link
Member Author

facchinm commented Oct 6, 2016

Hi @leodesigner , the declaration spanning 2 lines is triggering the bug (again). I'm reopening the relevant bug. Thanks for reporting

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.

3 participants