Qt gui for Winboard

Programming Topics (Computer Chess) and technical aspects as test techniques, book building, program tuning etc

Moderator: Andres Valverde

Re: Qt gui for Winboard

Postby F. Bluemers » 07 Sep 2012, 18:53

crystalclear wrote:I just tried compiling some of my chess software using the QT IDE.
I get error messages like this ....
Code: Select all
undefined reference to `@__security_check_cookie@4'

A search on the internet seems to show that these are from microsoft including some buffer overflow attack checking in some of the standard C procedures, without them linking the library containing the appropriate software. A little research indicated that a compiler flag /GS- should be able to work around the microsft problem, but I don't know where to set that flag in the QT IDE GUI.

Another error message I get is
Code: Select all

undefined reference to `_allshl'


This appears to be from trying to use 64 bit variables in places, ie bitboards fr some chess related routines. As far as I can tell, the compiler is trying to replace the 64 bit arithmetic routines with function calls written in 32 bit code, and these functions are not being linked into the executable. It's a case of the IDE's left hand not knowing what its right hand is doing.


You can control MS buffer overflow checks with pragmas
http://msdn.microsoft.com/en-us/library/ybwsy5f9
But that looks like a lousy fix(for several reasons).
Seems to me that the qt ide is missing out on some headers and/or libraries
F. Bluemers
 
Posts: 175
Joined: 04 Sep 2008, 16:56
Location: Netherlands

Re: Qt gui for Winboard

Postby crystalclear » 11 Sep 2012, 15:42

Thanks for that.

The way QT installed on my computer, QT uses the Microsoft compiler when generating code to produce a normal windows program, and uses gcc and MinGW when compiling to produce code that runs on the Nokia phone simulator interface. It is the phone simulator interface compilation that isn't working when functions from "strings.h" are used.

I have downloaded a replacement for the library strings.c, but have not yet tried to use that in place of standard library.
That's generally a bad idea anyway.

I have replaced some calls to routines in strings.c with safer versions that use string lengths.
That should improve my code and work around the problem at the same time. If I continue, I might be able to get around the problem by not using strings.c at all.
I don't want to use the Microsoft safe strings library, as that is rumoured to be a way Microsoft are trying to lock people into using their compiler and QT wants to use gcc/MinGW when compiling to run on a simulated phone, so M$ stuff is best avoided.

At present I am just forgetting about QT and working on my chess program: magic multipliers to locate pinned pieces.

I'm still curious about QT though. I wish I had a phone that would run QT software. It would be nice to see my chess software on there.
crystalclear
 
Posts: 91
Joined: 22 Sep 2011, 14:19

Re: Qt gui for Winboard

Postby chessuser » 20 Sep 2012, 21:12

yes. use mingw as a compiler. Qt 4.8.3 is out and soon Qt 5.
Did you test the chess function in interface.sf.net? can your gui be integrated?
chessuser
 
Posts: 26
Joined: 28 Jul 2012, 12:10

Re: Qt gui for Winboard

Postby crystalclear » 03 Oct 2012, 16:18

chessuser wrote:yes. use mingw as a compiler. Qt 4.8.3 is out and soon Qt 5.
Did you test the chess function in interface.sf.net? can your gui be integrated?


No, I haven't looked at interface.sf.net properly.

I did make the mistake of writing a QT GUI for the polyglot opening book header software.
It was working passably well since I was using the exercise to experiment with QT.
But when I came to finding the executable to try to distribute it, I found the executable was referencing DLLs which you cannot expect to be on the recipient's computer.
That means trying to distribute megabytes and megabytes of unwanted stuff with the program and then possibly running into a 10 megabyte limit on email attachments, etc.

I think I should have done it in Tk.
crystalclear
 
Posts: 91
Joined: 22 Sep 2011, 14:19

Previous

Return to Programming and Technical Discussions

Who is online

Users browsing this forum: No registered users and 2 guests