While I was trying to compile qt-quick application that embedded catkin project, I added a custom build step as below image shows.
The problem is that it has compile error as follow:
make: (no rule to make target 'cmake_check_build_system')
I think the Makefile automatically generated is overwritten repeatedly and results compilation error. How should I do? or What am I misunderstanding?
JB
I disabled qmake (as I did to Make(see the image above) and build the project using catkin_make only. Now the problem is basically gone.
Related
I have a workspace with multiple targets.
Each target has its own prefix.pch file.
Prefix-Header is entered in Build Settings and Precompile Prefix Header is set to YES.
The app compiles and runs fine when I run it on my device.
There are no errors when I just build the app.
But when I try to archive it, I get a compile error saying:
No such file or directory: '/Users/me/Library/Developer/Xcode/DerivedData/myApp-dcmvkatguqcxgjfyrqcunbsfuxcd/Build/Intermediates.noindex/ArchiveIntermediates/myAppTarget/PrecompiledHeaders/SharedPrecompiledHeaders/13524936819627194222/myAppTarget-Prefix.pch'
And indeed, when I open this folder on my hd, I can't see the pch-file. There are, however, similar files there:
myAppTarget-Prefix.pch.d
myAppTarget-Prefix.pch.dia
myAppTarget-Prefix.pch.gch
I tried everything I found on SO and elsewhere, but nothing helped.
I have Cocoapods installed and use them in this project, but I don't think that error is related to that (they seem to compile fine).
XCode 12.4
Seems like I figured it out.
The culprit was a totally unrelated build-setting.
In Other C Flags my settings differed in debug and release.
I had $(inherited) in both of them, but in the release setting I additionally had -isystem - which apparently is already included in $(inherited). That caused a multitude of errors that ended with the prefix.pch not being copied...
I keep getting the following error when running the following project:
when clicking on "Proceed" I get:
from which I don't know what should I do.
Here is the full manifest of the running project:
21:35:18 **** Incremental Build of configuration release for project OSPF ****
make MODE=release all
Node.cc
In file included from Node.cc:8:
In file included from ./Node.h:14:
./traffic_m.h:16:6: error: Version mismatch! Probably this file was generated by an earlier version of nedtool: 'make clean' should help.
# error Version mismatch! Probably this file was generated by an earlier version of nedtool: 'make clean' should help.
^
1 error generated.
make: *** [Makefile:105: out/clang-release//Node.o] Error 1
21:36:15 Build Finished (took 56s.271ms)
Should I change the version? If so, how to do that? My current omnet++
version is 5.4.1.
How to use make clean to fix up my work?
I don't know what "make clean" is nor I know how should I apply that. Would you help me with this please? It's my semester's final project....
Changing the version of OMNeT++ is not necessary.
make clean is an operation that removes C++ object files, final libraries or executables, and other files created during compilation.
What is important: make clean does not remove any of your source file.
To perform make clean just right click on your projekt in Project Explorer and select Clean local.
The problem occurred when I adding Nimble as a git submodule. I've fired an issue on Quick/Nimble, but the problem appears to be not likely a Nimble issue, it maybe rather an Xcode issue, thus I'm asking here.
I set up a simple project according to Nimble installation guid and it's on github now. Basically I created an xcworkspace and an xcodeproj (added to the workspace). Nimble is added as git submodule and subproject to the workspace. Then I added Nimble.framework to my test targets Build Phases and wrote some simple test code to see if Nimble was running.
And when I run the test, Xcode gave this error message:
2017-02-20 23:41:29.482 xctest[52165:616190] The bundle “MainProjTests” couldn’t be loaded because it is damaged or missing necessary resources. Try reinstalling the bundle.
2017-02-20 23:41:29.483 xctest[52165:616190] (dlopen_preflight(/Users/nandiin/Library/Developer/Xcode/DerivedData/NimbleIssue-fkhppktoktwpjodtarmzrjobszwv/Build/Products/Debug-iphonesimulator/MainProjTests.xctest/MainProjTests): Library not loaded: #rpath/libswiftSwiftOnoneSupport.dylib
Referenced from: /Users/nandiin/Library/Developer/Xcode/DerivedData/NimbleIssue-fkhppktoktwpjodtarmzrjobszwv/Build/Products/Debug-iphonesimulator/Nimble.framework/Nimble
Reason: image not found)
Program ended with exit code: 82
I've tried some solution I found for similar problems and they didn't work:
setting Embed Asset Packs In Product Bundle to YES (tried for both main target and test target)
setting Always Embed Swift Standard Libraries to YES (tried for both main target and test target)
The issue is the run path for the dynamic library:
libswiftSwiftOnoneSupport.dylib
If this is not included in the app bundle after building your app you'll want to add it by including it in the Copy Files Build Phase. Another possible problem could be that it's run path is not correctly set ( which you'll need to set if not already ), or fix the rpath with install_name_tool.
↳ Run-Path Dependent Libraries
In some of my projects I use some pre-build step(s) configured in the .pro file. So qmake will execute this step whenever it is activated.
Now in QtCreator, when I build (also when completely rebuilding the whole project), it doesn't always run qmake, since it tries to be clever and optimize this. It only runs it when the .pro file has been changed, causing several issues.
Also a common issue is, when you make a class inheriting from QObject after running qmake on that file, it will not notice it and hence not run moc on it. Such issues are solved by simply manually running qmake via the "Build" menu in QtCreator. But if I forget this I am sometimes confused by the compile errors I get because of this and this is really annoying.
(How) can I force QtCreator to do this step always when building a project?
I thought about adding qmake as a build step in the project configuration, but this seems to be a dirty hack to solve this problem.
Another dirty hack but a little more flexible: On Linux/Mac add "touch yourprojectfile.pro" as a build step or assign an external tool call to sth. like touch "*.pro" run in your current projects working directory. When the pro file is altered (which is mimicked by touch) qmake is executed. Not much cleaner but the external tool plus hotkey solution is more flexible than adding qmake into the buildsteps of each an every project.
Update:
I finally found a completely satisfactory solution for this.
In the pro file add:
qmakeforce.target = dummy
qmakeforce.commands = rm -f Makefile ##to force rerun of qmake
qmakeforce.depends = FORCE
PRE_TARGETDEPS += $$qmakeforce.target
QMAKE_EXTRA_TARGETS += qmakeforce
This deletes the generated Makefile an thus forces qmake to rerun for every build.
I think your best option is customize your QtCreator .This can be done by write a plugin for QtCreator ,or you can change the souce code of a plugin named Qt4ProjectManager ,then build it for yourself . This might be complex ,however, can be a solution.
What I've done is created a makefile that explicitly calls qmake. Of course, that means I have two makefiles, but in my project file, I have
MAKEFILE = makefile_qt
which means that the generated makefile will have that name.
So, for the makefile I manually created, I have:
default:
qmake;
${MAKE} -f makefile_qt;
Then, from QtCreator, I just call the regular make, which will default to makefile. Or you can leave the Qt-generated makefile as is, and just call make -f makefile to call your manually created one. I forget which has precedence, makefile or Makefile, and I'm not sure if it is always the same.
I'm using the following codes in my .pro file.
QMAKE_CLEAN += ./Makefile
This makes run qmake whenever executing clean.
I would like to change the folder name where my Xcode project is in. But when I do that I can't build my project anymore. It shows me 2 errors that says:
Apple LLVM compiler 3.0 error
file "project name-Prefix.pch" has been modified since the precompiled header was built
Any way to solve this?
Select Product > Clean from the Xcode menu.
Then try and build again by selecting Product > Build.
Your project should build without errors assuming that targets are correct.
Either you have replaced the code to some another machine. Try to commit the explicitly included import in the .PCH file. Compile it once on that specific machine. Now un-comment the those import lines and then compile the code again.
If you are trying to build project from terminal then
execute "$ xcodebuild clean " before execute the build command.
This will resolve the issue.