Cannot get ECC to work on windows
See original GitHub issueSystem info:
Windows 10 64 bit
- Sublime Text version:
3.2 build 3200
- Clang version: <clang version 8.0.0 (tags/RELEASE_800/final) Target: x86_64-pc-windows-msvc Thread model: posix InstalledDir: C:\Program Files\LLVM\bin>
What happens:
I simply cannot get EasyClangComplete to work on my configuration. At the moment I am programming for a Cortex M3 microcontroller from ST.
EasyClangComplete does not autocomplete
I’ve been trying to configure ECC to work in windows 10 and I am programming a Cortex M microcontroller. I tried creating a simple structure and right below it I create a variable with the struct’s type and then try to autocomplete and nothing happens. At most I can get to do a full autocomplete with every single word IN THE FILE I’M CURRENTLY USING, it doesn’t even give me the correct autocomplete options at first, I have to scrool to get to them and it doesn’t even offer to autocomplete from any other files. I have created a configuration in the project settings:
{
"folders":
[
{
"path": "."
}
],
"settings":
{
"easy_clang_complete_verbose": true,
"ecc_use_libclang": true,
"clang_flags": [
"-std=c11", "-I/usr/include", "-IC:\\Program Files (x86)\\Atollic\\TrueSTUDIO for STM32 9.2.0\\ARMTools\\lib\\gcc\\arm-atollic-eabi\\6.3.1\\include", "-IInc"
],
"common_flasg": [
"C:\\Program Files (x86)\\Atollic\\TrueSTUDIO for STM32 9.2.0\\ARMTools\\lib\\gcc\\arm-atollic-eabi\\6.3.1\\include", "-IInc"
],
"file": ".clang_complete",
"verbose": true
}
}
The log file is as follows:
[ECC:INFO ]: Getting version from command: ` -v`
Traceback (most recent call last):
File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 627, in on_activated_async
callback.on_activated_async(v)
File "C:\Users\userName\AppData\Roaming\Sublime Text 3\Packages\EasyClangComplete\EasyClangComplete.py", line 274, in on_activated_async
settings = EasyClangComplete.settings_manager.settings_for_view(view)
File "C:\Users\userName\AppData\Roaming\Sublime Text 3\Packages\EasyClangComplete\plugin\settings\settings_manager.py", line 55, in settings_for_view
self.__init_for_view(view)
File "C:\Users\userName\AppData\Roaming\Sublime Text 3\Packages\EasyClangComplete\plugin\settings\settings_manager.py", line 103, in __init_for_view
self.__settings_dict[view_id].update_from_view(view)
File "C:\Users\userName\AppData\Roaming\Sublime Text 3\Packages\EasyClangComplete\plugin\settings\settings_storage.py", line 128, in update_from_view
self.__update_wildcard_values(view)
File "C:\Users\userName\AppData\Roaming\Sublime Text 3\Packages\EasyClangComplete\plugin\settings\settings_storage.py", line 327, in __update_wildcard_values
version_str = Tools.get_clang_version_str(self.clang_binary)
File "C:\Users\userName\AppData\Roaming\Sublime Text 3\Packages\EasyClangComplete\plugin\tools.py", line 733, in get_clang_version_str
if "Apple" in output_text:
TypeError: argument of type 'NoneType' is not iterable
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (3 by maintainers)
@acourt First try putting the ECC configuration into ECC’s configurations and not the project’s configurations.
For some reason it doesn’t work when I put it in the project configurations it doesn’t work. Don’t forget to turn on verbose to see if you get any output from ECC.
Go to preferences > Package Settings > EasyClangComplete > Settings
on the right side try putting something like this:
Also … “show_errors”: true, “verbose” : true,
After that open the console and see what ECC tells you.
OK. I just got it working. The problem is that it just didn’t matter if I added the include paths to the project file (.sublime-project) because it wasn’t reading them. I then tried to open the EasyClangComxplete configuration found in the preferences tab in sublime text and then ovewrote the common_flags configuration for the user. Then it started finding the files correctly and the autocomplete started working.
The issue now is that:
1 - I think that modifying the project file should be enough and I shouldn’t modify the configurations for ECC … I’ve seen maaaaany posts were it works for other people, so there must be something wrong on my end;
2 - Autocomplete for a struct works, but it gives me many options and jumps to an option about 20 lines below the first ones, and the first ones are the actual members of the struct … maybe another wrong configuration in my part;
3 - It gives me a warning that snprintf is implicitly declared, but I already added the correct include file and after some searching it says that it’s only defined for c99, and when I went to the configurations it apparently was configured for c11, so I changed it to c99 but it didn’t work, This one isn’t actually a problem, it’s just bothering me because I don’t want to see the warning sign on the left side.