I'm trying to compile a simple GTk app, but when I compile, build fail due to warning in GTK source…
Compile log:
Compile
[Ada] main.adb
gdk-display.ads:361:80: (style) this line is too long
gdk-event.ads:290:80: (style) this line is too long
…
gprbuild: *** compilation phase failed
Anybody have solution ?
Thanks
You could:
Choose not to treat warnings as errors.
Fix the issues the compiler complains about.
You can adjust compiler flags on a per-file basis in project files, so you don't have to drop your zero-warnings policy for the rest of the project, just because you do it for selected files in GtkAda.
Related
I've been writing a mediocre game engine using SFML and OpenGL. Up until recently it has been building without difficulties, except for my own typos, bad code, etc. I'm building it as a static library, so (as I understand it, please correct me if wrong) after the actual compilation Codelite uses ar to stuff all the .o outputs into a single .a file. This seems to be where the issue is occuring.
/usr/bin/ar rcu ./Debug/libNDjinn.a #"NDjinn.txt" "GL" "sfml-graphics" "sfml-window" "sfml-audio" "sfml-network" "sfml-system"
/usr/bin/ar: `u' modifier ignored since `D' is the default (see `U')
/usr/bin/ar: GL: No such file or directory
make[1]: *** [NDjinn.mk:80: Debug/libNDjinn.a] Error 1
The rest of the build log is minimal and has no errors, only a warning about a switch statement not handling all cases, which was there when it was building correctly. I'm using clang++, but I have also tried g++ with no change.
I've seen some people having an issue where ar couldn't find the file marked with #. The solution in those cases was to disable that method of passing the input files, and have Codelite instead pass each file as a separate arg. I tried this as well, no luck.
I've verified that no demons have gone in and removed /usr/include/GL or indeed /usr/lib/x86_64-linux-gnu/libGL.so since the time it last worked.
Thank you
When I compile a project using cross compiler,I come across the following error:
internal compiler error: in decode_addr_const, at varasm.c:2632
Where can I find the varasm.c file?I searched the project directory and cross compiler directory,but I didn't find it.
Thanks for helpping,Light
The compiler maker has that file, and probably won't give it to you.
But as it seems to be an error in the compiler, you can either contact them / file a bug report, or try to avoid the error by changing your code a bit (which is a guessing game, as you don't know how you made it run into the error). Or use another compiler, if there are choices.
I have a __forceinline function that cannot be inlined when compiled as CLI (probably due to the specific restrictions to inlining that apply with .NET).
In debug, it is a warning and does not prevent me from building. But in release, it comes up as an error:
error C4714: function '...' marked as __forceinline not inlined
In the project configuration, Treat Warnings As Errors is set to No (/WX-), Treat Specific Warnings As Errors is empty (no value and no inherited value) and there is no /We option in the Command Line of the C/C++ section.
Thus, I don't understand why this warning comes up as an error.
And as it is an error it prevents me from building the project in release.
Do you have any clue on why this comes up as an error?
Any idea of how I could get rid of it, considering I cannot change the function nor its use (it comes from a library I'm using and I'd like not to alter)?
Thank you very much!
In system:
Fedora 21
Ruby 2.1.7
GCC 4.9.2
I follow the instructions for installing simstring but afer
$ruby extconf.rb
when trying to make and make install, I got an error:
cc1plus: some warnings being treated as errors
Makefile:217: recipe for target 'export_wrap.o' failed
make: *** [export_wrap.o] Error 1
And the entire log of this error is bellow
Error Log
I searched about this error but all of replies are about how to disable Werrors and configure with ignoring werrors.
Is there any solution?I think something not mentioned but i don't know what..
I searched about this error
That's not an error. It's a notification. It notifies that some warnings have been treated as errors.
I searched about this error but all of replies are about how to disable Werrors and configure with ignoring werrors. Is there any solution?
You answered your own question. If the source code of the program generates warnings, and if the compiler is asked to treat warnings as errors, then the compiler will refuse to compile the program. Complete list of possible solutions are:
Fix the source code to not generate warnings. This is a very good idea.
Stop asking the compiler to treat warnings as errors (this is the solution that you already found). You should still fix the code to not generate a warning.
Ask the compiler to ignore the warnings entirely. This is usually a bad idea unless you understand the warning and know what you're doing.
I'm trying to run the example "Scale_Space_Surface_Reconstruction_3" from CGAL library on CodeBlocks IDE on Ubuntu platform, as it would be nice
to have the IDE support for code completion and a more automatic configuration process.
I managed to successfully execute it by compiling it with cmake on the terminal window.
However, on CodeBlocks, after creating a new project and copying the code from the example, I get the following error:
/usr/local/include/CGAL/Scale_Space_Reconstruction_3/Scale_Space_Surface_Reconstruction_Impl_3.h:165:23: error: variable or field 'pca' declared void
Approximation pca( _nn[i]);
By looking inside the code, I found out that this is due to an undefined Macro CGAL_EIGEN3_ENABLED. As my experiment shows, if I define the macro at
pre-processing time, I do not get the same error. That is because, by defining the macro, the type definition Default::Get< wA,void>::type, becomes
Default::Get< wA, Weighted_PCA_approximation_3<Gt>>::type, and the compiler does not complain any more.
Unfortunately, as a deserved prize for messing with things I do not really understand, I get a segmentation fault at runtime.
How should I change the compiler options of codeBlocks to make the compilation succeed, and the executable run successfully?
I have the following include paths:
/usr/local/lib/CGAL/ /usr/local/include /usr/include /usr/include/eigen3.
I also included the following libraries:
libCGAL.so, libCGAL_Core.so, libCGAL_ImageIO.so, libgmp.so, libmpfr.so, libtbb.so, libtbbmalloc.so, libtbbmalloc_proxy.so