PDA

View Full Version : How to use IOCTL calls with QT?



augusbas
23rd November 2009, 13:29
Hi ,

I Wanna open a I2C device in my Qt program using IOCTL Open() Function. But this open() call gives me error. It tries to look for the function in the class.

"error: no matching function for call to ‘MainMenu::open(const char [11], int)’
/usr/local/Trolltech/Qt-4.5.0/include/QtGui/qdialog.h:99: note: candidates are: void QDialog::open()"

Is there any specific way of accesing devices in qt and getting a file descriptor for them. please advise me

caduel
23rd November 2009, 13:55
this has nothing to do with Qt.

qualify your open call:

::open(...)
std::open(...)
depending on what headers you include.

Thành Viên Mới
15th November 2010, 04:27
this has nothing to do with Qt.

qualify your open call:

::open(...)
std::open(...)
depending on what headers you include.


can you help me call ‘ioctl’ on QT:


../Bto/main.cpp: In function ‘int main()’:
../Bto/main.cpp:26: error: ‘ioctl’ was not declared in this scope
../Bto/main.cpp:32: error: ‘ioctl’ was not declared in this scope

squidge
15th November 2010, 07:55
Again, nothing to do with Qt.

Which headers are you including ? Do you include ioctl.h ?