Arduino IDE 可以用于开发普通的旧 C 程序吗? [英] Can the Arduino IDE be used to develop plain old C programs?

查看:35
本文介绍了Arduino IDE 可以用于开发普通的旧 C 程序吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个跨越多个文件的简单 Arduino 草图.h文件中有函数签名,C文件中有定义.

I have a simple Arduino sketch that spans several files. There is a function signature in an h file, and the definition in the C file.

如果我尝试编译(验证")草图,我会收到 C 文件中定义的函数的未定义引用"错误.将文件名从 *.c 更改为 *.cpp 可以解决问题,但我不想将该文件定义为 C++ 文件.是否可以在 Arduino 中编译普通的旧 C 文件?

If I attempt to compile ("Verify") the sketch, I get "undefined reference" errors to the function defined in a C file. Changing the file name from *.c to *.cpp resolves the issue, but I don't want to define the file as a C++ file. Is it possible to compile plain old C files in Arduino?

提前致谢.

推荐答案

Arduino IDE 非常有限,我的建议是:避免使用它.您可以在此处找到一些替代方案:http://arduino.cc/playground/Main/DevelopmentTools

The Arduino IDE is very limited, my advice: avoid it. You have some alternatives you can find here: http://arduino.cc/playground/Main/DevelopmentTools

  • 使用 Minibloq 图形编程环境为 Arduino 开发.
  • Arduino CMake 构建系统
  • 用于 Arduino 的 Ino 命令行工具包
  • 使用 AVR-Ada 为 Arduino 开发
  • 使用 Eclipse 为 Arduino 开发
  • 使用 Bitlash 为 Arduino 开发
  • 从命令行运行 Arduino
  • 使用 Cmake 构建
  • 使用 Scons 构建
  • 使用 build_arduino.py 构建
  • 与 Arduino 进行一次亲密的交谈
  • 在 XO 笔记本电脑(又名 100 美元的笔记本电脑)上运行 Arduino
  • Sharp Netwalker 中的 Arduino
  • OpenSolaris 上的 Arduino
  • 在代码块中使用 Arduino 库
  • 使用 Kdevelop 为 Arduino 开发
  • 在 Arduino IDE 中使用汇编语言源文件:在 Arduino 中汇编

这篇关于Arduino IDE 可以用于开发普通的旧 C 程序吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆