I followed the instructions here to build the latest Qgis source code on windows 7 x64, but when i build the solution for the first time i encounter this error:
cannot open source file "qgsversion.h" qgis_core
identifier "QGSVERSION" is undefined qgis_core
in the source file qgis.cpp at the lines:
#ifndef QGSVERSION
#include "qgsversion.h"
#endif
and:
const char *Qgis::QGIS_DEV_VERSION = QGSVERSION;
The problem is the file qgsversion.h is not exists in the source code which i cloned it from the github.
I think it must be created after executing the CMake build file but not created.
Regards.
I have the same problem, I solved this by building the "version" project first. It will give an error indicating the problem.
As a workaround I created the qgsversion.h file in the build directory myself. There is only one row inside the file with #define QGSVERSION "3b7d2e3360"
This row and the correct version number is shown in the output window of visual studio when you try to build the "version" project (when rebuilding fails).
I hope this helps, by making qgsversion.h, I was able to build qgis_core.dll
Related
I'm trying to build qt project but I keep getting error about no existing header in moc object moc_SerialPortManager.cpp. I moved with bash to that directory and used cd cmd with the path written in mock object and it leads to the correct directory. Does anybody have a slightest idea how to resolve it? At this point it's quite big project so just please tell me what could I publish to make this easier for you?
I have it all on git https://github.com/Orpiczy/AcornScanner/compare/fronAndBackJoin if you wish to check it out
I'm using Mingw compiler 8.1.0 64-bit for c++ and Qt 6.2.0, I'm working on windows10
moc_SerialPortManager.cpp
#include <memory>
#include "../../../../../../source/controllers/LowLevelFunctionality/DeviceController/ProfilometerManager/SerialPortManager.hpp"
#include <QtCore/qbytearray.h> ...
logs
E:\Dokumenty\AiR_rok_4\S7\EngineeringThesis\AcornScanner\cm\cm-lib\build\windows\gcc\x64\debug.moc\moc_SerialPortManager.cpp:10: error: ../../../../../../source/controllers/LowLevelFunctionality/DeviceController/ProfilometerManager/SerialPortManager.hpp: No such file or directory
........\AcornScanner\cm\cm-lib\build\windows\gcc\x64\debug.moc\moc_SerialPortManager.cpp:10:10: fatal error: ../../../../../../source/controllers/LowLevelFunctionality/DeviceController/ProfilometerManager/SerialPortManager.hpp: No such file or directory
#include "../../../../../../source/controllers/LowLevelFunctionality/DeviceController/ProfilometerManager/SerialPortManager.hpp"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Note that the layout of your repository differs from your local filesystem:
.../debug/.moc/
vs.
.../debug.moc/
Therefore the relative path steps up one level too much and results in a non-existing path.
It is generally considered bad practice to put automatically generated files (i.e. moc files) under version control. I would assume if you remove the whole build directory and build again you will be fine.
I am trying my best to include FreeRTOS into a new Project on VS Code for Mac.
I have created a directory for my project, added a main.cpp, configure the default build task for C/C++ clang. I have also created the c_cpp_properties.json.
My project consists of three folders; 'src' containing my main.cpp, and 'FreeRTOS' containing all of the source files for FreeRTOS (include & portable folders), and 'Demo' containing a demo app built for the CORTEX_ATSAM3X_Atmel_Studio board (that comes with the FreeRTOS download).
In my main.cpp file, I have an empty main function, that I can build successfully. The minute I try to add #include <FreeRTOS.h> to main.cpp, I am given the error FreeRTOS.h file not found.
What is interesting, is the first time I try to build, it recognises FreeRTOS.h, and the error I see is that it cannot find a file included in the FreeRTOS.h. To remedy this, I add the specific subdirectory to c_cpp_properties. I rebuild and then it shows me another file it cannot locate. So I work again manually amending another subdirectory. After 5 or 6 times, suddenly it fails to find FreeRTOS.h. When I delete all of the includePath entries except "${workspaceFolder}/**" I cannot get back to my starting point.
I have spent the last two days stuck on this, reading forums, starting my process again and I still cannot see where I am going wrong.
Probably I run into the same issue.
The problem was FreeRTOSConfig.h contains this definition
#define CMSIS_device_header "stm32h7xx.h"
which is next used in freertos_os2.h header (only):
#include CMSIS_device_header
and that is where build gets confused. It is not the perfect solution but removing the CMSIS_device_header variable and specifying stm32h7xx.h header directly in freertos_os2.h file solved my problem.
I use PlatformIO with Visual Studio Code on Windows 10.
Now whenever I:
create a Project with a name X
close Visual Studio Code
delete the Project folder X
open Visual Studio Code
create a new Project with the same name X
I get an empty project with a main.cpp file as expected, but the IDE shows an error for the line:
#include <Arduino.h>
The Error says: "Include Error recognised. Update your includePath." (Translated)
However, if I try to build, it compiles just fine. Even uploading and running works.
This include error appears not only with Arduino.h but with all includes, even if the file is in the exact same location. And it appears in other files than just main.cpp as well.
Can you tell me why this happens? How can I reuse the project names of deleted projects? Or If I should not delete projects like this (delete the project folder), how else would I delete a project?
I tried this with multiple project names and different boards, always with the same result.
Things I tried so far:
I found a Folder .cache in the PIO directory. But unfortunately renaming it (after step 3) did not help: after restarting PIO it recreated the folder as expected but the error message is still here.
In the same location there is a file homestate.json that among other things contains the path to recently opened projects. I removed those entries without luck.
I am just starting out with VSCoode and PlatformIO so i can't tell you why all of what you are seeing is happening is happening.
I use VSCode v1.63.0 on Windows 10.
If you want to delete the old project name, reuse it or not, you can bring up the Command Palette under the View menu (Shift-Control-P for me) and search for Workspace: Remove Folder from Workspace...., it will only be listed if you have projects in the workspace. A list of projects will be displayed, selected which one to delete and click on it. There will not be a confirmation prompt.
i'm using the Rhapsody 7.6.1 For C++ with the visual Studio 2010
already installed and set as described on this page: http://www-01.ibm.com/support/docview.wss?uid=swg21511885
when trying to build my component i face these two errors:
enter image description here
can you help me please ?
To close this question for those who are following it, after few days of searching and working on this issue, i've noticed that the cause was a damaged ".exe" file whose role is to parse my project's Objects folder and create a text file "objs_files.lst" containing the name of all the generated object files of that folder:
/******objs_files.lst ******/
obj\Launcher.obj
obj\LauncherSimulationWin32.obj
obj\DistantFServer.obj
obj\HardwareDriversFactory.obj
...etc
/*********************************/
this file was not created since my "objectfilegenerator.exe" is damaged, so i've created a small c++ .exe to do that job ==> as a result both errors are solved.
I'm using git to track a C++ project in VS2010. I'm using ignore patterns found on stackoverflow, which usually do not exclude the *.opensdf file. Unfortunately, when trying to commit the file, I get the following error:
error: open("foo.opensdf"): Permission denied
error: unable to index file foo.opensdf
fatal: adding files failed
Why do I get this error and how can it be avoided? Since I'm quite a newbie with VS2010, what is the use of this file?
Thanks!
mort
*.opensdf is a temporary file opened only while .vcxproj/.sln is loaded to Visual Studio IDE. It should be added to your .gitignore file.
See the accepted answer on this question: What should be contained in a global source code control ignore pattern for Visual Studio 2010?