PDA

View Full Version : i have a question about using qextserialport



to_guliang
27th May 2008, 06:11
i develop an application based on serial port communication, I downloaded qextserialport-1.1.tar. after i build QextSerialPort, i can't find the file "qextserialport.dll" and "libqextserialport.a" . what should i do?

jjbabu
27th May 2008, 06:51
After downloading that "qextserialport" you just go to that directory and give the commands like this,

1st you give "qmake".
next give "make".

after complition of your compilation you just go to build directory, there you will get "qextserialport.dll" and "libqextserialport.a" .

in "qextserialport" package you will get one example folder,plz go through that,and palce your application folder in placeof example folder and do your tasks.

to_guliang
27th May 2008, 07:14
thanks.
i build the qextserialport as you say, but i can't find the "qextserialport.dll" and "libqextserialport.a", i just get the file "libqextserialport.prl".
what's wrong with what i do? plz help me

to_guliang
27th May 2008, 08:46
i use qt 4.3.4, if i want to use qextserialport, i should download qextserialport-1.1.tar.gz, and i find the procedure what i have to do by google.
the procedureas follows:
1. extract it, then copy the file qextserialport under the src that under the setup file of qt 4.3.4.
2.then i complie it by command "qmake" and "make".
3.i will get the file folder "build", there will be "qextserialport.dll" "qextserialport.prl""libqextserialport.a" and other files in it.
4.i copy the file "qextserialport.dll" to the file folder "bin" in the setup file of qt and copy the "qextserialport.prl" and "libqextserialport.a" to the file folder "lib".
5. create the file "qextserialport.h" in the file folder "Qt" under the file folder "include", whose content is "#include ".../.../src/qextserialport/qextserialport.h". At the same time, copy the file "qextserialport.h" to the file folder "QtGui". Then create file "QextSerialPort" , its content is" #include "qextserialport.h" ".
when i do as the above procedure , i only get the file "qextserialport.prl".

Is the procedure above right? if it's right ,why i can't get the file "libqextserialport.a" "qextserialport.dll" since i download the qextserialport-1.1.tar.gz in "http://qextserialport.sourceforge.net/".
if it's wrong, please tell me the detailed procedure if i want to use qextserialport in Qt 4.3.4.
thanks very much for any advice.

jjbabu
27th May 2008, 13:32
Exactly what u r going to do?
are u developing application or someother....?

upto 3rd point u mentioned in the last post is right.
after that what u r doing i dont get that.

if u are developing serialport connected application,u simply observe example directory 1st.
after that u crete your own application folder in place of example folder,in the pro.file of ur application u simly add "LIBS += -lqextserialport" and
QMAKE_LIBDIR += "here u mention ur build folder path".

still u have any doubts 1st explain ur requirements in ur next post.

to_guliang
27th May 2008, 14:20
hi,thanks for your reply
i'm sorry i don't express myself clear.

first problem:
if i place the folder "qextserialport" in the desktop of the linux, after the command "qmake" and "make" i get the following files:
two folder:"moc" , "obj"
other four: "libqextserialport.so", "libqextserialport.so.1", "libqextserialport.so.1.0",
"libqextserialport.so.1.0.0"
those are what all i get.

if i place the folder "qextserialport" in path "qt-x11-opensouce-src-4.3.4/src", after the command, i will get two more files except the above, there are "libqextserialport.prl" and "libqextserialport.so.1.0.0.debug".

qt-x11-opensouce-src-4.3.4 is the folder that i setup my qt4.3.4

i can't get "qextserialport.dll" and "libqextserialport.a". i don't know why.
maybe it's something to do with the version of my qt(qt 4.3.4) or the
"qextserialport-1.1.tar.gz" is not the right one?

to_guliang
27th May 2008, 14:24
exactly, i want to use qextserialport in my application just as a kind of common class, for example "Qwidget","QtXml" and so on.
and i download the qextserialport-1.1.tar.gz in "http://qextserialport.sourceforge.net/".
it shouldn't be wrong, shouldn't it?

pherthyl
27th May 2008, 17:46
If you are compiling on Linux, then the .so files are what you want. You will not get any dll or .a files, since those are only created on Windows. You do not need them on Linux.

to_guliang
28th May 2008, 01:50
oh!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
after i get the .so files, if i want to use the qextserialport as a common class, need i configure the files and how to configure?
thanks!

to_guliang
28th May 2008, 10:10
If you are compiling on Linux, then the .so files are what you want. You will not get any dll or .a files, since those are only created on Windows. You do not need them on Linux.

hi, could you tell me how to use the qextserialport as a common class? atfer i compile, should i configure the qextserialport folder? how to?
or it can be used without configuring? But compiling the examples in the qextserialport folder don't succeed.

plz help me! thanks very much!!

pherthyl
28th May 2008, 18:54
I don't know exactly how to do it, since I work mainly on Windows. However it should work by just modifying your pro file. The pro file needs information on where your qextserialport headers and libs are. So you need something like LIBS += -L"path/to/your/qextserialport/so/files" -lqextserialport

Same goes for include. If the compile errors out finding the qextserialport headers, then you need to tell it where to find them (INCLUDEPATH in the pro file I think).

to_guliang
29th May 2008, 01:54
I don't know exactly how to do it, since I work mainly on Windows. However it should work by just modifying your pro file. The pro file needs information on where your qextserialport headers and libs are. So you need something like LIBS += -L"path/to/your/qextserialport/so/files" -lqextserialport

Same goes for include. If the compile errors out finding the qextserialport headers, then you need to tell it where to find them (INCLUDEPATH in the pro file I think).

thanks, i will try as you said.

to_guliang
29th May 2008, 03:35
it seems no use, i give the path to find -lqextserialport as "Desktop/qextserialport/build/-lqextserialport", it gives out " No such file or directory". i try to copy the .so file to the folder i compile, it gives out "/usr/bin/ld: cannot find -lqextserialport
"

why? how to modify the path of "-lqextserialport"?
or how to configure the qextserialport?

help!!!!

thanks very much!

to_guliang
29th May 2008, 05:42
hi, everyone, i compile the qextserialport/examples/qespta succedly, but open the Icon it created , it shows nothing

why?

to_guliang
29th May 2008, 08:33
hi, everyone. i find a simple method to use qextserialport.

if your Qt works on Windows, you just copy "win_qextserialport.cpp" "win_qextserialport.h""qextserialbase.cpp""qextserialbase.h"to the path where your application at. then you can use any function the qextserialport has, but you should define your variable as "Win_QextSerialPort *RS232 = new Win_QextSerialPort("/dev/ttyS0");"

if your Qt works on Unix, you just copy "posix_qextserialport.cpp" "posix_qextserialport.h""qextserialbase.cpp""qextserialbase.h" to the path where your application at. Then define the variable type as "Posix_QextSerialPort *RS232 ".

but i still don't know how to use it as a common class, it's so kind if someone can tell me