How I can Run C code in QT creator?
-
What problems do you face? It's not different than c++.
-
@Christian-Ehrlicher
This (https://github.com/analogdevicesinc/iio-oscilloscope) is opensource ADI API implemented in C + GTK I need to use few function then how can I can use them in QT. -
And what's the actual problem then? Simply include the headers of the library and link against the libs.
-
@Christian-Ehrlicher
Thanks for your valuable response! Kindly give me very small example from this ADI API so that I can do it with ease.Thanks
-
@Christian-Ehrlicher
Thanks for your valuable response! Kindly give me very small example from this ADI API so that I can do it with ease.Thanks
-
@jsulm Hi;
Because I didn't know about how to work with C in QT? If you have another from this API outside example of C with QT then you can quote.
Thanks@Wasee You are asking two different questions:
- How to use a library?
- How to use a specific API?
Do you understand that?
Using a library is not that hard. @Christian-Ehrlicher already told you what you need to do.
More information here: https://doc.qt.io/qtcreator/creator-project-qmake-libraries.html -
@jsulm Hi;
Because I didn't know about how to work with C in QT? If you have another from this API outside example of C with QT then you can quote.
Thanks@Wasee said in How I can Run C code in QT creator?:
Because I didn't know about how to work with C in QT?
Qt is not a language. It's just some code written in C++. You call something written in C like you would from any C++ program, Qt is not relevant here.
-
@Christian-Ehrlicher
This (https://github.com/analogdevicesinc/iio-oscilloscope) is opensource ADI API implemented in C + GTK I need to use few function then how can I can use them in QT.@Wasee said in How I can Run C code in QT creator?:
This (https://github.com/analogdevicesinc/iio-oscilloscope) is opensource ADI API implemented in C + GTK I need to use few function then how can I can use them in QT.
You say that this uses GTK. Since it is an oscilloscope I presume that it provides some widgets for display as well. If this is the case you cannot mix Qt and GTK for windowing. At least I wouldn't try it. And even if it works this will be way beyond your current experience level.