I can’t see what I’m doing wrong. I’m trying to create some properties in a class (as I did before) but this time I’m getting the error «class Foo has no member named MyProp»
The header is:
#ifndef P_H
#define P_H
#include <QObject>
class P : public QObject
{
Q_OBJECT
Q_PROPERTY(int Prop READ getProp WRITE setProp)
public:
explicit P(QObject *parent = 0);
int getProp() const;
void setProp(int nP);
private:
int m_p;
};
#endif // P_H
and the cpp file is:
#include "p.h"
P::P(QObject *parent) :
QObject(parent)
{
}
int P::getProp() const
{
return m_p;
}
void P::setProp(int nP)
{
m_p = nP;
}
But when I try to use foobar.P I got the error class P has no member named P. I’ve been reading Qt documentation and I can’t see any difference. Does anyone see what I’m doing wrong?
I’m using Qt Creator 2.4.1 and Qt 4.8.
[… Edit …]
Here is how I’m trying to use it:
#include "p.h"
int main(int argc, char *argv[])
{
P c;
c.Prop = 2;
return 0;
}
This is the simplest example I could think of and I got the same error.
Thanks in advance.
-
Partition Wizard
-
Partition Manager
- Solved: File Not Found or No Read Permission Error
Solved: File Not Found or No Read Permission Error [Partition Manager]
By Alin | Follow |
Last Updated February 01, 2023
Some users reported that they encountered the “file not found or no read permission” error when trying to create a compressed (zipped) folder on Windows 10. Why does this error occur? How to fix this issue? This post of MiniTool Partition Wizard will give you answers.
Since upgrading to Windows 10, I have not been able to create a zipped folder using the explorer options «Send to >» «Compressed (zipped) folder». The error given is «File not found or no read permission».
—from Microsoft Community
When you get the error, you will get the detailed error message saying as follows:
Compressed (zipped) Folders Error
File not found or no read permission.
There are several possible causes of file not found or no read permission zip error. For instance, your user account does not have sufficient permission for this operation. Besides, it’s possible that one of the files in that folder is locked by a program. If you don’t have write permissions to create a compressed folder or read permissions, you may get the file not found or no read permission error.
When you face the “file not found or no read permission while zipping” error, the first thing you can do is to reboot your PC. If there are any minor issues on your computer, a quick reboot can solve the issues easily. After rebooting, if the error still exists, you can refer to the following methods below.
Method 1. Create a New User Account
You can try fixing the “file not found or no read permission while zipping” error by creating a new user account. Follow the detailed steps below.
Step 1. Go to Settings > Accounts > Family & other users. Then click Add someone else to this PC under the Other users section.
Step 2. In the prompted window, click I don’t have this person’s sign-in information.
Step 3. Then click Add a user without a Microsoft account in the next window.
Step 4. Then you can follow the on-screen wizard to complete the new user account creation. Once done, click Change account type to set your account to administrator type
Step 5. Sign in to the newly created user account and check if the error disappears.
Method 2. Change the Permissions
To get rid of the file not found or no read permission zip error, you can follow the steps below to get special permissions to the contents of the ZIP file.
Step 1. Right-click the folder or file that you want to compress and select Properties.
Step 2. In the pop-up window, click the Security tab. Then click the Advanced button.
Step 3. In the next window, click Disable inheritance. Then select Remove all inherited permissions from this object. Then click Add to add permissions.
Step 4. In the pop-up window, click Select a principal.
Step 5. Then type administrator in the Enter the object name to select box. Click Check Names to add the administrator account. Click OK.
Step 6. Then select Show advanced permissions and check Full control. Click OK.
Step 7. Then click Apply and OK sequentially. Then you can check if the issue is solved.
If you already have a ZIP folder, you can refer to the above steps to change the zip folder permissions.
Method 3. Use Third-party Software
Besides, you can use third-party compression software (e.g., 7-Zip and WinRAR) to compress your folders or files. You can choose one as you like.
Wrapping Things Up
In this post, we have learned several fixes to the file not found or no read permission error. You can feel free to have a try on them. Having any suggestions or better ideas? You can tell us in the comment zone below.
About The Author
Position:
Alin is a new member of MiniTool. Her articles are mainly about disk & partition management, data recovery, and hard disk issues. She is enthusiastic about acquiring computer knowledge and helping users to solve problems with computers. To provide more useful and professional solutions, she will keep learning and know more computer knowledge.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement. We’ll occasionally send you account related emails.
Already on GitHub?
Sign in
to your account
Open
orichienal opened this issue
Jul 14, 2019
· 33 comments
Comments
hi Guys
The new Ethernet 2.0 library is very different from the old one.
Unfortunately, some functions have been lost.
I have to use Ethernet2.0 and also ICMPPing from BlakeFoster.
So far, he has not responded and in the Arduino forum, no one could help me.
But I am not alone with this problem.
I hope someone can spread a solution or approach that makes it possible to ping from an Arduino.
Here are the error messages:
C:arduino-1.8.8portablesketchbooklibrariesicmp_pingICMPPing.cpp: In member function 'Status ICMPPing::sendEchoRequest(const IPAddress&, const ICMPEcho&)':
C:arduino-1.8.8portablesketchbooklibrariesicmp_pingICMPPing.cpp:184:11: error: 'class W5100Class' has no member named 'send_data_processing'
W5100.send_data_processing(_socket, serialized, sizeof(ICMPEcho));
^
C:arduino-1.8.8portablesketchbooklibrariesicmp_pingICMPPing.cpp: In member function 'void ICMPPing::receiveEchoReply(const ICMPEcho&, const IPAddress&, ICMPEchoReply&)':
C:arduino-1.8.8portablesketchbooklibrariesicmp_pingICMPPing.cpp:207:19: error: 'class W5100Class' has no member named 'getRXReceivedSize'
if (W5100.getRXReceivedSize(_socket) < 1)
^
C:arduino-1.8.8portablesketchbooklibrariesicmp_pingICMPPing.cpp:219:9: error: 'class W5100Class' has no member named 'read_data'
W5100.read_data(_socket, (uint16_t) buffer, ipHeader, sizeof(ipHeader));
^
C:arduino-1.8.8portablesketchbooklibrariesicmp_pingICMPPing.cpp:229:9: error: 'class W5100Class' has no member named 'read_data'
W5100.read_data(_socket, (uint16_t) buffer, serialized, dataLen);
Thank you very much in advance.
orichienal
orichienal
changed the title
icmpPing
icmpPing missing member(functions)
Jul 14, 2019
i opened some time ago an issue at https://github.com/BlakeFoster/Arduino-Ping
But I think the owner will not be able to help me in a short time
I decided to help myself and that’s why I’m looking for help here
I was hoping someone could help me understand the new functions and use them the way they did the old ones
these are the old functions and now i want to use some of the new functions to do the same
send_data_processing
getRXReceivedSize
read_data
and i hope someone could help me, i am not the only one who want to ping from arduino.
I’ve looked into this, and found that the way the Ethernet library is currently structured makes it impossible to extend to use additional protocols such as ICMP ping.
I can try to fix this, but there’s a philosophical debate to be had first: is the EthernetClass class meant to be used by user-supplied classes, and should you be able to extend the library in that way, or is it meant to be closed to that sort of thing.
Both have their advantages — opening it up to extensibility has the obvious advantage of making things like an additional ICMPPing library possible again, but introduces the burden of keeping a much larger API surface stable.
The concrete issue:
The ICMPPing library used to use functions such as send_data_processing. This function is now superseded by the static function write_data, which is not reachable from outside.
Now there is a function called EthernetClass::socketBufferData which is a thin wrapper around write_data, but that function is declared private. The EthernetUDP class calls this function, and it can do so because it is declared a friend of EthernetClass. This illustrates the current pattern in the library: implement supporting functions for each protocol directly in the EthernetClass class as private, declare any protocol implementation as a friend.
Two possible solutions, depending on the philosophy we want to have:
- Make it possible to use some formerly ‘internal’ functions in the Ethernet class and use its functionality, without having to declare a friend (cleaning these up to provide a clean API)
- Integrate support for ICMP into the Ethernet library, the way this is done for TCP and UDP: by adding the necessary supporting functions into the EthernetClass class, declaring EthernetICMP a friend of the ethernet class, and implementing an EthernetICMP.cpp
Either way, I’m willing to put in the work.
I have a slight preference for option 2, since I think ICMP support should be an integral part of any Ethernet library.
Any thoughts?
- Edited: inheritance not playing a role here.
I’m interested too in this. By now i’ve added the missing functions in w5100.h/cpp for have the icmp back working…
I’m also interested in this, it should work again, let’s implement the best solution. When it will be available?
When it will be available?
When you have done the work 🙄
I didn’t do anything of this work, but as soon as it is not working and nothing is intended to be corrected it should be delete it and do not keep the script on github not functionally. Maybe somebody else will do another script working. Or do you think that github is a place of non-working scripts?
I can try to integrate the ping function directly in the library (as proposed by @ulterify, option 2, as i’m agree that icmp is a base eth protocol and must be directly supported) but i not know if the main library will be updated. Almost one month ago I’ve made some mods for fix a bug on registry address definition on w5500, and i not ever know if someone noticed the pull request… and i see many other pull requests ignored.
By now i can use the icmpping library as i’ve edited the ethernet library adding the missing functions, not the best but not lost too much time and it works.
I’ve been looking for a solution to ping the Ethernet2.0 library for so long.
You seem to have adapted the 2.0 so that old ICMPPing from BlakeFoster works.
Is there a way to get this version? I tried the fork of masterx1981, but unfortunately without success.
I have found a lot of people with this problem on the net and that would be a great solution now.
I need it urgently. I don’t understand how such an elementary function cannot be integrated.
I would be very happy to receive feedback and help with a very long-lasting problem.
I have already been active in several forums and would like to link to this solution here, many would be helped.
The version that I have on github doesn’t include the icmp support, as my implementation is far from optimal. The github version only fixes some problems of the Ethernet library with W5500. When i have time i try to merge the icmpping library with the ethernet library.
I tried to transfer the «missing» functions from the older version to the new one myself.
But that doesn’t really work, WireShark is saying that ICMP is not correct.
Nothing comes back to the Arduino either.
And then at some point it crashes and the Arduino restarts.
Maybe you could send me your version even if it’s not optimal.
Then maybe I understand what I did wrong.
I’ve managed to include the https://github.com/BlakeFoster/Arduino-Ping functions in the ethernet library (using ethernet function and not readding the old ones — the new libraries, despite a name change, are almost identical to the old ones), but seem to cause some memory corruption. The corruption was already there with Blake’s library untouched, and i’ve noticed it when my code reached ~90kb flash size (but with more probability it’s related to the memory usage).
I need to investigate a bit more on what’s causing it. When i’ve found the cause, i update my git library
Hi,
thanks a lot for your work. If I can do anything like, testing, reporducing, discuss about this problem I’ll do with a great please in the limit of my knowledge. I’ll be happy to help if I could.
Best regards, Really appreciate you effort, Gerard
I’ve updated my GIT repository. It’s a simple copy/paste of the BlakeFoster work.
The memory bug was caused by another thing in my code, so nothing to worry
I tested it in sync mode with the following code:
const SOCKET pingSocket = 0;
EthernetICMPPing pingip(pingSocket, (uint8_t)random(0, 255));
pingip.setTimeout(timeout * 1000);
EthernetICMPEchoReply echoReply = pingip(IPAddress, 1);
if (echoReply.status == SUCCESS) DOSOMETHING
Is it working for you? I still have error because this library ICMPPing makes reference to members not declared in Ethernet for my W5100. I have following errors:
ICMPPing.cpp:184:11: error: ‘class W5100Class’ has no member named ‘send_data_processing’
ICMPPing.cpp:207:19: error: ‘class W5100Class’ has no member named ‘getRXReceivedSize’
ICMPPing.cpp:219:9: error: ‘class W5100Class’ has no member named ‘read_data’
Thank you for any help in this.
Is it working for you? I still have error because this library ICMPPing makes reference to members not declared in Ethernet for my W5100. I have following errors:
ICMPPing.cpp:184:11: error: ‘class W5100Class’ has no member named ‘send_data_processing’
ICMPPing.cpp:207:19: error: ‘class W5100Class’ has no member named ‘getRXReceivedSize’
ICMPPing.cpp:219:9: error: ‘class W5100Class’ has no member named ‘read_data’Thank you for any help in this.
Have you tried using my version?
Yes I tried, especially with Ethernet library from your git, but I still see the same errors.
If you are using my modified ethernet library you not have to add the icmpping library, as it’s already embedded on it.
do you also have a complete code with setup and loop to test this by using just your library?
const SOCKET pingSocket = 0;
EthernetICMPPing pingip(pingSocket, (uint8_t)random(0, 255));
pingip.setTimeout(timeout * 1000);
EthernetICMPEchoReply echoReply = pingip(IPAddress, 1);
if (echoReply.status == SUCCESS) DOSOMETHING
You can use it exactely the same as original icmpping library, use this as template how to access the icmp functions inside the library. Sorry but by now i have no sample code
OK, here is first error by using just your library ethernet. It seems that SOCKET is missing in your ethernet which was present in icmp_ping.
PingNew:22:7: error: ‘SOCKET’ does not name a type; did you mean ‘SCK’?
You have to include
#include <EthernetIcmp.h>
#include <Ethernet.h>
Maybe open an issue un my git repository so that we not add unnecessary things here.
Thank a lot. It is not necessary to open an issue anymore, IT WORKS, with few adjustments I did it. I made the test and it works great. By the way, the correct name of library is #include <EthernetICMP.h>
Congratulation, you did a nice job for so long wait, I’d like to understand more and to develop things like you in one day.
Sorry, the phone have corrected the capital letters. I’ve only «pasted» 2 libraries together. Hope that some day someone that really know how to code, fix this thing in a proper way in the official arduino ethernet library…
Thank a lot. It is not necessary to open an issue anymore, IT WORKS, with few adjustments I did it. I made the test and it works great. By the way, the correct name of library is #include <EthernetICMP.h>
Congratulation, you did a nice job for so long wait, I’d like to understand more and to develop things like you in one day.
Could you please post which adjustments you had to do?
Currently the fork of @masterx1981 with ICMP does not work, because there are undefined references (according to the compiler error output).
librariesEthernetEthernetICMP.cpp.o: In function `EthernetICMPPing::operator()(arduino::IPAddress const&, int, EthernetICMPEchoReply&)':
C:Program Files (x86)ArduinolibrariesEthernetsrc/EthernetICMP.cpp:175: undefined reference to `EthernetICMPPing::sendEchoRequest(arduino::IPAddress const&, EthernetICMPEcho const&)'
C:Program Files (x86)ArduinolibrariesEthernetsrc/EthernetICMP.cpp:180: undefined reference to `EthernetICMPPing::receiveEchoReply(EthernetICMPEcho const&, arduino::IPAddress const&, EthernetICMPEchoReply&)'
collect2.exe: error: ld returned 1 exit status
exit status 1
Uhm, on my arduino environment it compiles well. Need to check.
the most important thing is to have the correct libraries installed and included as my list below. I also tested and it works great, sometimes I see a delay and even if the device is connected ping does not respond but for this I asked 3 consecutive times to be sure.
#include <SPI.h>
#include <EthernetICMP.h>
#include <Ethernet.h>
Uhm, on my arduino environment it compiles well. Need to check.
Yup, it suddenly works too. I don’t know why or how. But I haven’t tested the function yet.
Hello @masterx1981
I was looking for an ESP32 / W5500 ping library today. You’ve saved my day. Works like a charm.
Thanks
Felix
Hi,
Where can I download the version of the Ethernet library with pinging support?
Thanks.
Regards,
Jose
I have the same issue @gitneko had prior to it suddenly starting to work:
/var/folders/39/rdsn92s55tjgq_tzvrbtj3_m0000gn/T//cc0db78l.ltrans0.ltrans.o: In function `operator()':
/Users/brandon/Library/Mobile Documents/com~apple~CloudDocs/Documents/code/Ardurino/libraries/Ethernet/src/EthernetICMP.cpp:180: undefined reference to `EthernetICMPPing::sendEchoRequest(IPAddress const&, EthernetICMPEcho const&)'
/Users/brandon/Library/Mobile Documents/com~apple~CloudDocs/Documents/code/Ardurino/libraries/Ethernet/src/EthernetICMP.cpp:185: undefined reference to `EthernetICMPPing::receiveEchoReply(EthernetICMPEcho const&, IPAddress const&, EthernetICMPEchoReply&)'
collect2: error: ld returned 1 exit status
Добрый вечер. Возникает ошибка: error: request for member ‘read_from’ in ‘*(((nation*)this)->nation::currency + ((sizetype)(((unsigned int)i) * 4u)))’, which is of pointer type ‘course*’ (maybe you meant to use ‘->’ ?)
На строках 15 и 23:
C++ | ||
|
Вот код вызывающей функции:
C++ | ||
|
Методы:
C++ | ||
|
C++ | ||
|
Добавлено через 5 минут
Очень глупая ошибка. Поменял «.» на «->» и завелось
With «#include SFMLWindow.hpp»
'class sf::Window' has no member named 'IsOpened'
'class sf::Window' has no member named 'PollEvent'
'class sf::Window' has no member named 'Close'
'class sf::Window' has no member named 'Display'
With «#include SFMLGraphics.hpp»
'class sf::RenderWindow' has no member named 'IsOpened'
'class sf::RenderWindow' has no member named 'PollEvent'
'class sf::RenderWindow' has no member named 'Close'
'class sf::RenderWindow' has no member named 'Display'
The errors above are the 4 errors I get when trying to compile my program.. I have been talking with someone who knows about SFML and I have him stumped too. Does anyone here have any ideas for fixes?
This is the source code:
#include <iostream>
#include <SFML/Window.hpp>
#include <SFML/Graphics.hpp>
int main() {
sf::Window FollowCursor(sf::VideoMode(800, 600, 32), "Follow Cursor - SFML Window");
while (FollowCursor.IsOpened()) {
sf::Event FCEvent;
while (FollowCursor.PollEvent(FCEvent)) {
if (FCEvent.Type == sf::Event::Closed) {
FollowCursor.Close();
}
}
FollowCursor.Display();
}
return EXIT_SUCCESS;
}
Thanks in advance!
-Princessjinifer
EDIT: I fixed them… Nevermind. I looked at http://www.sfml-dev.org/documentation/2.0/ and it showed that IsOpened is actually isOpen, and PollEvent is pollEvent.. so on and so forth.. So, here is the corrected code:
#include <iostream>
#include <SFML/Window.hpp>
#include <SFML/Graphics.hpp>
int main() {
sf::Window FollowCursor(sf::VideoMode(800, 600, 32), "Follow Cursor - SFML Window");
while (FollowCursor.isOpen()) {
sf::Event FCEvent;
while (FollowCursor.pollEvent(FCEvent)) {
if (FCEvent.type == sf::Event::Closed) {
FollowCursor.close();
}
}
FollowCursor.display();
}
return EXIT_SUCCESS;
}