-
-
Notifications
You must be signed in to change notification settings - Fork 7k
file ".c" extension #4333
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
Comments
Ha, i had the same issue today. Not sure if the issue was caused by us or the compiler. However I noticed another error: If you rename the files the other is kept in the temporary directly for compiling and sometimes leftover. Saving fixes this, editing again breaks it again. I have no test for this though. |
@Testato, as Nicohood indicated, extern "C" is needed when mixing C and C++ (.ino files are compiled as C++). Google keywords are name mangling and calling conventions. So, this behaves as expected and I will close this ticket. If we misunderstood and the problem has another cause, feel free to leave a comment so we can reopen it. If you do, be sure to include the actual error message as well. @NicoHood, please open a new issue for that? I think I know what's going on and I recall seeing code to fix that for deleting files, but not for renaming apparently. I've been digging into that part of the code, so I can probably pick that one up. |
@NicoHood i can confirm the behavior. It is the first issue i ran into when i started using the ide a couple months ago. |
Only ".h+.cpp" extension used under a sketch folder work.
If you try to use a .c extension for a file the Arduino IDE print some error,
Try it whit this example, it do not work but if you change the test.c to test.cpp it will work
https://drive.google.com/open?id=0Bw27MYXTb2FXR0ZpZDVLSDh6cDA
The text was updated successfully, but these errors were encountered: