How to compile .ino file as .cpp

General questions regarding the usage of CodeLite
QT-1
CodeLite Curious
Posts: 2
Joined: Fri Nov 10, 2017 6:49 pm
Genuine User: Yes
IDE Question: c++
Contact:

How to compile .ino file as .cpp

Post by QT-1 » Fri Nov 10, 2017 6:59 pm

Hi,

I am writing a simulator/debugger environment for arduino code.
I would like to set codelite so it will treat .ino files same as .cpp, in patricular, I would like the automatically generated makefile be generated for .ino files.

What should I do?

Thanks
Baruch

User avatar
eranif
CodeLite Plugin
Posts: 5934
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: How to compile .ino file as .cpp

Post by eranif » Fri Nov 10, 2017 7:45 pm

Hi Baruch!
You should be able to start from:
Settings->Build settings->Compilers tab->YOUR COMPILER->File Types tab

Add ino as a known type and create the build pattern (or copy one from the .cpp/.c)
You can also add .ino from settings->colours and fonts->customize->File extensions (its already there, cause it colours InnoSetup files)

Eran
Make sure you have read the HOW TO POST thread

QT-1
CodeLite Curious
Posts: 2
Joined: Fri Nov 10, 2017 6:49 pm
Genuine User: Yes
IDE Question: c++
Contact:

Re: How to compile .ino file as .cpp

Post by QT-1 » Sun Nov 12, 2017 6:13 pm

Hi Eran,

I followed your instructions and also added

Code: Select all

-xc++
option.
It now works like a charm.

Thanks!

Post Reply