Page 2 of 2

Re: Trying out Serial comm

PostPosted: Fri Jan 11, 2013 12:22 am
by Henning
Qt does not have any embedded SerialPort, so Bernd added the code needed to use "qextserialport", kind of an addon.

In the Q7Basic directory there is a subdir Q7BSerialPort with the .cpp and .h files needed to compile.
There is also a file main.cpp wich should NOT be copied, it will someway collide with the projects compiling.
There is also a Q7BSerialPort.txt with the Declares for using the SerialPort.

Hope this is ... clearer...

/Henning

Re: Trying out Serial comm

PostPosted: Fri Jan 11, 2013 10:08 am
by Slowdown
Yup i did know that.
Those are called 'Extensions' by Bernd, i have played with the Zip/UnZip extension and the one for sending e-mail.
The part i missed is that the file main.cpp was causing problems.
I have setup a project 'SerailTest' and first places the declares from the txt file in global and hit run.
Everything compiled without error's but nothing happes after that.
Next i did a deploy again no error's but the final binary also will not run.
Try to compile it with creator and that one will trow an error from my head something with a duplicated _main in global.obj.
After saw your tip to remove and finally the the basic code in Q7B compiles and run.
Sorry for the mis understanding.

Re: Trying out Serial comm

PostPosted: Fri Jan 11, 2013 10:33 am
by Slowdown
Found the troublemaker in main.cpp,
Code: Select all
int main(int argc, char **argv)

Bernd is also using main in Global.ccp
Code: Select all
int main (int argc, char *argv[])

That was creator telling me i guess and i couldn't find it.
I tested it as follows, in main.cpp i changed the word main to Main and placed main.cpp in the cpp directory of the project and no error's.
I don't think this is the solution because my knowledge of Qt is far to limited.
Code: Select all
sp.Open   'if I add the parens() I get a Syntax Error..

works here with the () without problems.

Re: Trying out Serial comm

PostPosted: Sat Jan 12, 2013 10:30 am
by Slowdown
Hi Henning,

The goal is a Formless app running as a service.

It's not a service but perhaps you can do something with it.

console_01.zip
(1.16 KiB) Downloaded 113 times

Re: Trying out Serial comm

PostPosted: Sat Jan 12, 2013 11:39 am
by Henning
Thanx!

I have a VB Class written by Sergey Merzlikin that creates an app to be run as a service. There is also a little "starter" app to register the app as a service.
I have used it in a few apps, and it works like a charm. :)
I'll see if I can rewrite it for Q7B, it is only using standard Windows API's. For Mac and Linux...

/Henning