Comments (16)
I think you might need to add -fsyntax-only
to your C/C++ flags. That should prevent the generation of object files but still do syntax checking. Could you repeat the steps above, but with -fsyntax-only
in your C/C++ flags?
from linter-gcc.
I just had an idea!!!! Try adding this option: -o /dev/null
. This will tell GCC to write the object file to /dev/null, which means it will simply get thrown away!
from linter-gcc.
Hello. Could you open the developer console (by pressing Ctrl+Shift+I
), copy the linter-gcc command, and paste it here?
from linter-gcc.
Here it is :
linter-gcc: /usr/bin/gcc -W -Wall -Wextra -pedantic -std=c++11 -c -fmax-errors=0 -I/home/grange_c/vox/include/ -I/home/grange_c/vox/include/lib/ -I/home/grange_c/vox/include/class/ -I/home/include/ -I/home/grange_c/include/ /home/grange_c/vox/src/main.cpp
from linter-gcc.
Ok. Could you try the following:
- Close Atom
- Delete the *.o files
- Edit your C/C++ compile flags so that
-c
is right at the start - Use linter-gcc normally, and see if any new *.o files are generated.
from linter-gcc.
Hi !
I tried the 4 steps, and yeah it's still making *.o files.
linter-gcc: /usr/bin/gcc -c -W -Wall -Wextra -pedantic -std=c++11 -fmax-errors=0 -I/home/grange_c/.froot/include/ -I/home/grange_c/vox/include/ -I/home/grange_c/vox/include/lib/ -I/home/grange_c/vox/include/class/ /home/grange_c/vox/src/main.cpp
By the way, i think the *.o files are generated only when i'm saving a *.cpp file without any GCC error.
Thanks for the help !
from linter-gcc.
Yeah it's wokring like that, but i don't like -fsyntax-only
, it's adding useless errors while working with libraries like opengl. >_>
But it's working fine, thanks !
from linter-gcc.
You say there are useless errors when working with opengl. I assume these are to do with certain functions being undefined. Is that correct? In that case you could simply link against the opengl library (with an option like -lgl
or something like that). But then again if you link you might get errors saying your main is undefined (if linting a source file that doesn't contain a main function).
from linter-gcc.
Brilliant ! It works fine !
Would be great if it was enable by default ^_^
from linter-gcc.
Yes I will add it to the default flags, and to the README in the next version.
from linter-gcc.
@hebaishi -o /dev/null
not working on windows with gcc 5.3.0, and solution for this ? It's generating .o files everywhere for every atom projects I open...
from linter-gcc.
I believe the default null device on Windows is NUL
. So try -o NUL
.
from linter-gcc.
@Ehekatl everything working for you?
from linter-gcc.
@hebaishi work like a charm, many thanks : )
from linter-gcc.
I have the same issue and both, -fsyntax-only
and -o /dev/null
worked for me (deleting it make a .o file instantly).
But I have a doubt about if -fsyntax-only
could generate conflict with -Wall
making it useless.
Can someone explain?
Thanks for the help ;)
from linter-gcc.
I have the same issue and both,
-fsyntax-only
and-o /dev/null
worked for me (deleting it make a .o file instantly).
But I have a doubt about if-fsyntax-only
could generate conflict with-Wall
making it useless.
Can someone explain?Thanks for the help ;)
I'd suggest you don't need the -fsyntax-only
if you're just discarding output with -o /dev/null
...
from linter-gcc.
Related Issues (20)
- Linter isn't showing issues (c/c++) HOT 2
- it stops working since the 1.34.0 atom update HOT 2
- Uncaught TypeError: _this.notificationEl.querySelector is not a function HOT 2
- linter-gcc doesn't work HOT 4
- consider this project dead if this issue is not removed (latest commit was on 2017 jan) HOT 3
- Uncaught TypeError: _this.notificationEl.querySelector is not a function HOT 2
- Uncaught TypeError: _this.notificationEl.querySelector is not a function HOT 2
- Uncaught TypeError: _this.notificationEl.querySelector is not a function HOT 1
- Uncaught TypeError: _this.notificationEl.querySelector is not a function HOT 1
- Uncaught TypeError: _this.notificationEl.querySelector is not a function HOT 1
- Uncaught TypeError: _this.notificationEl.querySelector is not a function HOT 1
- Uncaught TypeError: _this.notificationEl.querySelector is not a function HOT 1
- Object.dirname is deprecated.
- Uncaught TypeError: Cannot read property 'binary' of undefined
- Relative paths are relative to Atom's $PWD, not the project root
- string variables not highlighted
- Colors in the linter panel
- I cant install atom linter gcc.its shows"npm WARN deprecated [email protected]: No longer maintained - Use lodash probably npm ERR! Unexpected end of JSON input while parsing near '...MGZNbL9YcGBJl4MH4nrxH' npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\stark siv\.atom\.apm\_logs\2020-12-26T17_25_37_936Z-debug.log" A little help is appreciated,♥ HOT 2
- Just want my GCH address for open sea? HOT 1
- Cannot find module 'tempfile'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from linter-gcc.