-
Notifications
You must be signed in to change notification settings - Fork 132
Using only "myfile.h" file without a "myfile.c", slobed does not include when compiling. #1269
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
Please provide screendumps of the project setup (as working and as not working) and the compile command of sloeber.ino.cpp I ask that because your information is inconsistent. you sayy "they are contained in subfolder' but your sketch folder does not contain subfolders That being said. If you want a header file to be found it needs to be in the "include path".
|
Why is your remark hiden? |
It was hidden because I was still placing information and doing some tests and you were not supposed to read it. lol I am still struggling now with 2, sloeber is too cool to get back to Arduino IDE. Congrats for your job! I am gonna donate soon to support you. |
@jantje my isseus seems to be gone and I am sharing few notes on my learning since it might help somebody that hits here.
|
@jantje I would like to suggest to automatically add to the top of "Path & Symbols" anything that it is not pointed in the Arduino menu. It looks like Eclipse could see and properly find the references while compiler was expecting to add the include. It would be very helpful if slober make does look through folders within the Eclipse project and automatically addes the folder with .h, .c/.cpp files to the makefile. |
Yes, the CDT indexer does not look at the compile include path nor to the includes in your source file. That is for a very good reason.
Sloeber is build on top of CDT. "Path & Symbols" is a CDT thing so it doesn't know about arduino/sloeber so it cant sort based on.
That would be very un C/C++ like |
@jantje I am not sure about this issue now; I have a library which cames by default with Arduino IDE and I moved the library to my one, see the picture. The bluetooth one can't be seen at all while the others can be seen. Any clue on what I am doing wrong are very welcome! |
It is unclear to me what you are trying to do. |
Well, if I am not able to chew, then I have to slice it down in parts where I can learn. I am trying to make life easier by properly setting the Git as versioning tool. So far, Arduino IDE is a pain in the ass when you wanna deal with version. I worked for years in a company where for each module we had strict control of versions. I wanna apply the same concept for my personal projects.
I am struggling on 2. I don't want to use automatic version from the cloud, even if it has fixes. if so, I wanna test each of them for me before accepting them. My computer just crashed and I realized Arduino IDE does not have this control easily when you reinstall everything. For sloeber, I wanna setup each module (set of .h/.cpp files) under spefic versioning and install them directly by Git itself. The only bad part here is the manual setup of the Eclipse project, well, I am preparing also a template. The weird part is the "BLEDevice.h" file. Eclipse cant see neither in the esp32/hardware folder nor in the folder I copy. In my folder, I can see other libraries I manually copied but I can't see this one. If I manually add the absolute path to this lilbrary, it works but I should do the same for other libraries in the same folders and the other libraries are being recognized correctly. |
One of the big selling points of Sloeber
Nor do I. That is why a sloeber project points to a dedicated platform version and you can have multiple version of a platform.
At install time both Sloeber and arduino IDE install the latest version. For both you can change that to a older version (actually I'm not sure this is true for arduino avr). The difference is that
For my main project I've taken that route, However it is hard, I mean really hard (And I have been a version architect for many years) Add to that that if you want top use a github library you may need to fork it (and then keep it in sync) and add it to the private libraries one by one. You could use 2 github homes. As you can see it becomes a narrow path. |
I got your point and I am pretty much on the same page. The approach I am using is to use Git to control the version. I need to get used to the "Git team menu" in the Eclipse because I am using the client TortoiseGit on Windows, so, there is no "implicit communication" between git and sloeber, since I am doing the file management outside the Eclipse. For the version, yes, I am gonna have three projects on the Git. One is the main project itself, and the other two will be seem as libraries (one for Arduino vendor source code and other one is my libraries) and those latter two will be added as sub projects to the main project. I made some tests and it looks fine from the TortoiseGit/Windows explorer perspective where I can control each subproject, pull requests, etc. right now, I am struggling to make Sloeber just recognize the source code in the paths I am placing the code. I read #1268 and I have the feeling you are redoing the versioning control by proposing a new one; maybe the approach I am taking solves what you are doing. |
Redoing version control.. no way. I'm not smart enough for that rofl |
Oh I see what you are doing, hopefully it works! By the way, I realized what was missing. I have a folder with named BLE in my library folder however, it didn't have any BLE.h nor BLE.cpp file in there. Once I created dummies files named BLE.h and BLE.cpp without any content and included BLE.h in any of my files, they showed up and all source files were compiled. If possible, all header and source files pointed by that Arduino hardware/library folders could be compiled and let the combiner (I know it as linker) decide what symbols will be linked? P.s.: I followed your advice and had too much beers, time to sleep now! |
😆 I don't recall advising you to drink to much beers 🥼 |
I read somewhere else in other issue I guess, anyway, I accepted. lol |
I created a sketch from scratch and followed directions to add custom libraries.
I have also couple custom files specific for my project and they are contained in subfolder.
The project structure is as follow:
when I hit the verify button, the MySettings.h is not seen by a custom library file contained in the libraries folder. After reading issue #1249 I had an insight and I attempted creating a "MySettings.c" file and it worked like a charm but in the following compilation, libraries that uses my custom files are not seen by the compiler and those files have the couple .h/.cpp files.
Setup description:
The text was updated successfully, but these errors were encountered: