Skip to content
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

Compiling .INO files? #5

Open
byroncoetsee opened this issue Sep 5, 2017 · 3 comments
Open

Compiling .INO files? #5

byroncoetsee opened this issue Sep 5, 2017 · 3 comments

Comments

@byroncoetsee
Copy link

Hey there,

Firstly, thank you so much for this! It's super handy...

Is there a way to compile .ino files? Instead of having to split them up into .h. and .cpp?

Thanks again!

@nrobinson2000
Copy link
Owner

nrobinson2000 commented Sep 5, 2017

I think there is, and it may be possible with gcc's -x language option to force it to treat the file as c++. Looking into it now.

@byroncoetsee
Copy link
Author

As I got the email notification, I managed to use a work around... I basically changed my .ino file to suit your requirement of main.cpp. Moved some of the functions around to suit C++ style "it must be declared before you can use it" and hey, it works... So all good for now :)

But would still be amazing to compile .ino since that's what the web IDE starts you on.

@nrobinson2000
Copy link
Owner

Moved some of the functions around to suit C++ style "it must be declared before you can use it" and hey, it works... So all good for now :)

You can prototype your functions at the top to get around this.

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

No branches or pull requests

2 participants