View Full Version : Mixing Qt and c
Aladin
28th March 2011, 11:46
Hi
I m working on a speech recognition project using Qt. My problem is that the speech decoder is written in c .is there any way to use the c code within the qt code?
Thanks in advance.
high_flyer
28th March 2011, 11:50
is there any way to use the c code within the qt code?
Is there a way to use C code in C++ code?
The same answer applies as Qt IS C++ code.
Aladin
28th March 2011, 11:58
can you give me a simple example ?
wysota
28th March 2011, 12:03
void MyClass::exampleCall() {
int x = callFunctionFromC();
}
Aladin
28th March 2011, 12:09
so what i understand is i ll include the .h header in the qt code and just call the c function.
Am i right ?
wysota
28th March 2011, 12:22
There is no "Qt code". It's C++.
Aladin
28th March 2011, 12:24
:)
sorry ,i mean the c++ code .
wysota
28th March 2011, 12:27
Using C and C++ together (http://lmgtfy.com/?q=using+C+and+C%2B%2B+together)
Aladin
28th March 2011, 15:29
thanks, i found out how it works. It's a matter of adding links to include file and libraries .
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.