QtCreator issues tab is empty - xcode

I'm experiencing an issue with QTCreator. It doesn't parse compiler output and IssueTab is always empty, in spite of compiler output contains some. It seams that complier output is totally made to stdout and not to stderr (compile output is totally grey).
That happens if I use XCode Cmake generator. When I switch to Unix MakeFiles generator issues are shown normally, but I stacked to Xcode as project is really old and is written to support only XCode.
Search in google for some specific flags for Xcode generator hand't provided any useful response.
Thus I'm asking the Community.

A small hack: 1>&2. Now everything goes to stderr, and QtCreator tries to parse it
UPD: -quiet makes output more clean
How to make xcodebuild print compile errors and warnings to stderr?

Related

Suppressing warnings on OSX/Xcode

Is there a #pragma-like instruction to suppress warnings when building on OSX with Xcode?
I am trying to build my software on OSX with Xcode. The softwre depends on thr SQLite, which I downloaded as a source code and included in my project.
Unfortunately when I build from Xcode it produces a number of Ambigious expansion of macro MAX.
I was told that it is normal from SQLite people, but since that number is huge and it will continue growing I'd like to suppress it to make the log smaller.
I'm on Xcode 9.4 with clang, but I'd appreciate if that would be working on previous versions of Xcode (with possibly gcc).

Is it possible to prevent/stop xcodebuild from rebuilding everything

I am trying to compile my project twice in a row, just with one preprocessor defined for the second build. (this #define is only used in one source file)
However when i call xcodebuild for the second time it rebuild everything! Using LLVM Compiler 3.0. XCode 4.2
Do you mean pre-processor flag? Whats the difference between the two builds? Just asking because sometimes there are other ways to achieve the same result.
You need to give us some more details and examples of you command lines etc.
Ijust did a quick google and checked the Xcode doco, GCC_PREPROCESSORDEFINITIONS should be GCC_PREPROCESSOR_DEFINITIONS. Xcodebuild is simply ignoring your setting because it doesn't recognise it.

Segregate BUILD error/warning from compilation messages

I find it difficult sometimes to locate errors/warnings in large projects upon make-ing (gnu). How do I segregate the errors/warnings from the usual compilation messages when the error does not stop the build process from going any further? A wrapper shell script could pick and display whatever I want, but before fleshing out one I thought of asking about the alternatives.
Thanks.
In theory, make -s will suppress the "routine" output of the build process, leaving you with only the errors and warnings. Also in theory, make will stop as soon as it encounters an error.
If either of those is not true for the project(s) you're working with, that's probably due to poorly written makefiles. So fixing the makefiles is one alternative.
To help make sense of verbose builds, some simple highlighting as provided by colorgcc can go a long way. IDEs like eclipse or even emacs can also helpfully pick out the error messages in the build output.
Also, it might be helpful to note that warning and error messages are usually written to stderr, while everything else goes to stdout. So it might be useful to simply discard stdout like so: make >/dev/null.

Using nmake on OSX?

I'm porting an application to MacOS X - but the original developer's build system uses NMAKE, and ideally they'd like to keep it instead of switching to a new one.
I've managed to get NMAKE running under OSX using wine (built using MacPorts) and added Objective C support to the build files, and created a Unix-linked PE wrapper 'run.exe' which wine can load but uses POSIX to call back into things like gcc and ld, as is described on various places online as a means of escaping out of wine back into Unix.
However, I'm having a few specific issues. They're minor enough that I can get on with the port, but it does mean I need to run builds a few times sometimes, because of timing.
Basically, when wine.exe calls back into the shell and thus gcc, the link between child processes seems to be broken. gcc and ld will never return an error code even on failure, because they can't get the exit code from their spawned children. ar will actually print out it can't find its child and return immediately, causing problems when ld tries to link object files to libraries that are still being put together.
Has anyone else tried anything similar and seen the same problem, on OSX or elsewhere? Is there an obvious solution?
The Microsoft .NET Rotor (SSCLI) project includes source code, intended to be build on OSX and elsewhere. The Rotor source code includes the source code to NMake. So get Rotor working, then use it's Nmake. Even if you prefer to continue to use your Wine-based Nmake, you could probably learn from Rotor's use of Nmake on Unix, it's use of Gcc, etc.
If there is nothing that odd / inconsistent about the original developers build system, could you write an automatic conversion of their make files back into Unix make, and keep your builds 'native'?
(Builds being fraught enough anyway, without extra complications)

How do I disable Xcode static analysis (Clang) messages?

I'd like my Xcode project to go through a Build And Analyze step without generating any errors, warnings, or static analysis messages. A problem with this is that my project includes libraries that generate (possibly innocuous) warnings and static analysis messages.
I can't find a way to disable specific Clang warnings so that "my" code builds with zero issues. Is this possible?
I wasn't able to find any way to do this, and filed a bug against Clang. The team seems to want to add this functionality, but it's not there yet.
The bug is: http://llvm.org/bugs/show_bug.cgi?id=7296
Also, one can use a __clang_analyzer__ macro to ifdef out any code that one doesn't want Clang to process.
The Build and Analyze step is clang - thats the "analyze" part. It wouldn't make sense to analyze your code and not have clang tell you about issues it find. That's like going to a car wash and telling them not to touch the car.
From talking to the guy that wrote clang at WWDC, it is extremely unlikely that anything it identifies as an issue is actually not. If you think you have some examples of code that works fine but clang complains, please file a bugreport with example code so Apple can fix that.
You can disable some compiler warnings through the use of flags, but not all of them are an option.

Resources