I'm trying to build a project with vitis using the library xuartps.h but I can't because of this error
code screenchot
I don't know why this happens. Could you help me please?
This is an include file. It gets literally copy-pasted on your sources. On top of that, the compiler could notify the error around the wrong line, but it could be before or after the one which is actually wrong.
Check your sources that include such header, you must miss a semicolon there, or another typo. You should not look into the header.
Related
I'm experimenting with using PlatformIO and the CLion IDE. I'm pretty new to C++ and writing for embedded hardware. I got PlatformIO working and my simple program compiles and runs but CLion highlights my PlatformIO dependencies as not being found.
I've seen it said that CLion looks where cmake looks, but CMakeLists.txt says
# !!! WARNING !!! AUTO-GENERATED FILE, PLEASE DO NOT MODIFY IT AND USE
# https://docs.platformio.org/page/projectconf/section_env_build.html#build-flags
That URL seems like a dead end in terms of helping me solve my problem.
Update:
I was playing a little bit more with CLion and PlatformIO and wanted to use the library manager as well.
The installed libraries are located in {PROJECT_DIR}/.pio/libdeps/
I was not able to detect all libraries automatically, but with the method described below, I could get rid of the CLion warninings by explicitly defining the dependencies in the CMakeListsUser.txt likes this
include_directories("${CMAKE_CURRENT_LIST_DIR}/.pio/libdeps/mkrwifi1010/Keyboard/src")
include_directories("${CMAKE_CURRENT_LIST_DIR}/.pio/libdeps/mkrwifi1010/WiFiNINA/src")
For the few dependencies I got, this is sufficient. But of course it is not ideal to add every dependency manually. So if somebody has a better solution, please share it.
Original Answer
I stumbled on a similar issue, but maybe this could help you or others.
In my case, I added the ArduinoLog library in the "lib" folder. Although I was able to compile my code, the import showed up as an error and I had no code completion.
As described in the XMakeList.txt, I was able to resolve this issue, by adding a "CMakeListsUser.txt" in the root project directory with the following content.
include_directories("${CMAKE_CURRENT_LIST_DIR}/lib")
After a rebuild and a restart I got no more errors and the code completion worked as expected. Maybe you can add the folder of your PlatformIO libraries there as well.
Seems like the best way to do it is to go to Tools->PlatformIO->Re-Init. New dependencies should stop showing up as missing.
It worked for me.
Source: https://community.platformio.org/t/clion-cant-find-lib-deps-library-headers/23929/2
I've been trying to build a micropython for esp32-camera and I keep getting errors during the make process when building some of the drivers in the mp/ports/esp32/modules directory. The error I get is a syntax error. For example there's a file named ntptime.py in this directory and it contains a single line:
../../esp8266/modules/ntptime.py
and that results in "SyntaxError: invalid syntax"
I've programmed python for a while, but am not familiar with this concept and don't understand how it can work, but maybe it can? I'm not familiar with doing that and since it's not working when I run make, maybe there's something setup-wise that I've missed or whatever. Can anyone shed some light on this practice and explain under what circumstances this works to direct make (or the python compiler) to resolve this statement by loading the source from the directory specified in that single line of code.
Duh, can't believe I missed this: there "files" are symbolic links; I should've remembered that, but alas, I'm getting older by the minute!
Still, it doesn't answer the question as to why they weren't being recognized during make but instead throwing a SyntaxError; but I'll leave that for another day.
I'm pretty sure this is a bug in the VB6 IDE but I haven't found any definitive reference to it before...
Sometimes when I've loaded a project which has some dependency issue (missing reference, etc.) the IDE will show an error like this:
("Compile error: Can't find project or library")
Note the text which it highlighted is a call to the UCase$ function which is essentially built into the language. There's no way its library is actually missing.
Is this a known bug? Is there any rhyme or reason to the text which is selected when this happens?
Update: The standard libraries which include things like UCase() are included so that is not the actual problem. The highlight really seems to be nonsensical.
VB can do some strange things, but... check both the content and order of your References. UCase$() isn't 'built into the language' in the way you might think -- it's not in the VB runtime, but in the VBA runtime, which must be included as a reference.
I'm working on a veins project at the moment and everything went fine till today.
I had the need to add a new module to the ' veins/src/veins/modules ' directory so I simply created a new folder and put some .ned files and relative header/source files in there. I got some errors after doing that but nothing special (I was probably doing something wrong and compiler didn't like it). I then decided to delete the folder and try again maybe the day after.
After doing so I re-run the same exact simulation and omnet/IDE started showing this, not being able to launch:
<!> Error: Cannot load library '../../src//libveins.so': ../../src//libveins.so: undefined symbol: _ZN8Flooding6finishEv
End.
Simulation terminated with exit code: 1
I've tryed a fresh clean and rebuilt the whole veins project but that didn't help.
I googled this error but couldn't find anything similiar to my case.
Thanks in advance for your help.
Best regards.
c++filt _ZN8Flooding6finishEv shows that the missing symbol is
Flooding::finish(). It seems that you have a deceleration of this
method but missing a corresponding implementation. I'd assume your
module was called Flooding and you did not delete all of it when
starting over.
Julian Heinovski
Running the same configuration on Windows showed that it was indeed Flooding::finish() not implemented (that's probably because it's automatically demangled on Windows). I just deleted the declaration and solved my little inattention.
I encountered a preprocessor or lexical error when I tried to build my project to an archive. This did not happen on the release nor debug configuration settings on the simulator.
The message is:
lexical and preprocessor issue: 'tidy.h' file not found
The 'tidy.h' is included by CTidy.h, which is part of TouchXML library.
I found 'tidy.h' in a subfolder of 'iPhoneSimulator5.1.sdk'. To my surprise, the file is absent in 'iPhoneOS5.1.sdk'
Is it OK for me to just copy the file to the iPhoneOS5.1.sdk?
Thanks
Try commenting out the:
#include "tidy.h"
... in CTidy.h, or alternatively comment out:
#include "CTidy.h"
That is, check to see whether the header file is really necessary.
If you find that it's not, either submit a patch to the TouchXML developers, or file a bug with them, or send them an email.
It is quite common for headers to be included unnecessarily. For example I could write some code that depends on "foo.h", then delete my code, or refactor it in such a way that it doesn't need the header anymore, yet forget to delete the header inclusion as well.