How to add specific flags to moc in a vs2010 project? - visual-studio-2010

I'm trying to resolve this bug and a workaround suggested was to pass -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED to moc.exe.
This question is related to mine. The difference is I want to add a MOC flag in a VS2010 project (VS add-in).
I've tried left click -> Qt Project Setting -> MocOptions and adding -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED
Note my problem occurs using boost 1.53.

The solution has been provided yesterday from here
We need to add -DBOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION to the moc options too.

What you've tried is actually the right solution. However, you need to rebuild your project in order to work around the bug. When DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED is set, it changes the precompilation of your Boost headers. As you stated, you are using boost in precompiled headers. You have to rebuild them as well to fix your problem.

Related

QtCreator doesn't find header files (.h) belonging to my project

I'm using QtCreator to develop a "plain" C++ based software (in particular, this one). By "plain" I mean my software is not using Qt libraries or any other Qt stuff appart from the IDE.
QtCreator version is 4.14.1.
Everything goes fine (building, running application, debugging, etc.) but the editor is reporting problems finding header files (i.e. .h files) belonging to my project, as shown in the screenshoot below:
Interesting to note that system headers (e.g. stdio.h) are correctly found.
So maybe I'm missing some piece of configuration in my project. First thing I thougth was the .includes added by QtCreator at project creation time (fiware-orion.includes in my case), which is like that:
src/lib/cache
src/lib/mongoBackend
src/lib/parseArgs
...
which are the places in which the header files are (e.g. src/lib/mongoBackend/MongoGlobal.h) so everything seems fine in that file...
Any idea or suggestion is really welcomed :)
I think I found the answer myself just after publishing the question (use to happen :)
Adding to the .includes file this line:
src/lib
solved the problem.
It makes sense... as my header names are like mongoBackend/MongoGlobal.h then
src/lib + mongoBackend/MongoGlobal.h = src/lib/mongoBackend/MongoGlobal.h

The breakpoint will not currently be hit. Unable to set requested breakpoint on target

Im working on Arduino Uno board recently im stuck with my code, i couldnt debug using print() in ArduinoIde.So i downloaded AtmelStudio 6.2 for debug purpose.
when i set the breakpoint and try to build .Im getting the warning
The breakpoint will not currently be hit. Unable to set requested breakpoint on target.The current selected deviceis unable to set breakpoints during runtime
please help me sort this issue
Following workarounds worked with the same problem using ATMega 168P on Atmel Studio 7 with Atmel-ICE.
1. Assembler
Insert the following assembler code where you want your breakpoint:
asm("break");
Please note, this is a really ugly solution and not suitable for all situations. It only works with DEBUGwire and makes your program stop in any case, even if no programmer is attached.
2. Create new project
Creating a new project at a different location helped as well. I copied all the required files to the new folder. The new location has a short path (C:\atmel\project...) and contains no spaces, no umlauts etc.
I had a similar problem, the difference was that I could only hit breakpoints in the original modules of my project (i.e. those already existent when I created the .cproj), any modules I added later wouldn't have the program stopped in breakpoints placed on them.
The solution (2) mentioned by #pafodie worked to solve this, but in the process I found a simpler way: just delete the .atsuo file. It will later be automatically recreated, and the problem disappears (at least until you add more modules). It seems AS6 caches something there that isn't updated when new files are added, or does it incorrectly.
I might've found a solution that works, for me at least! You need to disable compiler optimization. In Atmel Studio,
Hit Alt+F7 > ToolChain > Optimization {there are 2 Optimization
windows but only one fits the shoes} > Optimization level > None
I found it here, explained better than I did: https://www.microchip.com/webdoc/GUID-ECD8A826-B1DA-44FC-BE0B-5A53418A47BD/index.html?GUID-8FF26BD2-DBFF-48DD-91FB-8585D91A938D figure 5
If using external Makefile, make sure the -g (debug) flag is set in CFLAGS.
Otherwise, Atmel Studio would have no idea how the source files correspond to the compiled binary.

Frameworks are missing in Unity generated Xcode project

Some of the frameworks are missing when I generate Xcode project through Unity. What would be the reason? How can I solve this?
I mean manually I have added them in Build Phases to fix the error, but why are they missing?
They're missing because they are required when you use those APIs.
If you're coming from a language like Java this might seem strange, but with Objective-C (which is ultimately C) you need to let the compiler know where the APIs come from beyond just the header file import.
Unfortunately, Unity doesn't provide any support for specifying additional frameworks for your Xcode project to link to. However, if you can you should generate and modify your Xcode project once and then subsequently always have Unity update rather than override the project.

qtcreator does not always refresh my ui when i build

i noticed that many times i do some modification on a graphical interface created with Qtcreator this is not immediatly applied while building.
even if i call qmake does not work. I have sometimes to close QTcreator reopen it again and build.
Do you know if there is a way to force parsing the .ui file?
Cheers
Its been a while since I used QT but what I often found with problems similar as to what your asking. In the Projects>Build settings: Make shure that shadow-build is unchecked.

CMake and XCode - disable CMake ReRun and CMake PostBuild Rules default generation

I want to disable the additional dependency check generated for an XCode project (and possibly also the CMake cache update verification), since this increase very very much the entire build time (about three times in my case). With Visual C++ is sufficient to set the flag
SET(CMAKE_SUPPRESS_REGENERATION TRUE)
but in XCode it does not have any effect.
I was looking into a similar issue. You don't have enough details to help me understand if they are exactly related, but here's what I found:
Problem re-generating files using Qt, apparently hard to debug.
http://public.kitware.com/Bug/view.php?id=8833
This is the thread that started it all:
http://www.mail-archive.com/cmake#cmake.org/msg21149.html
Hope this answer helps!
-dan

Resources