New user registration is currently disabled due to spam abuse / Регистрация новых пользователей в настоящее время приостановлена из-за злоупотреблений спаммерами

How to build on Windows 7 x64

General discussion

How to build on Windows 7 x64

Postby chiapas » Sat Dec 07, 2013 9:25 pm

I tried to install:

Qt 5.1.1 for Windows 64-bit (VS 2012, 525 MB) (Info)
or
Qt libraries 4.8.5 for Windows (VS 2010, 235 MB) (Info)

also (tried with it and without it)
MinGW from http://sourceforge.net/projects/mingw/f ... urce=files

and git.

I use Visual Studio 2012 to open the .sln file, and tried to build it with "Debug Win32" and "Release-Qt4 x64".
But I always got :

1> UIC about.ui -> ui_about.h
1>C:\Users\xxx\Desktop\b\MSBuild\QtExtensions\uic.targets(62,5): error MSB3721: The command "\bin\uic.exe -o "C:\Users\xxx\Desktop\b\build\ui_about.h" about.ui" exited with code 1.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I really don't want to tried all the other qt install files. Doesn't anyone knows how to resolve this issue. Or a more detailed steps and requirements to build goldendict on Windows 7 x64, please.
Last edited by chiapas on Sun Dec 08, 2013 6:38 am, edited 2 times in total.
chiapas
 
Posts: 4
Joined: Sat Dec 07, 2013 7:23 pm

Re: How to build on Windows 7 x64

Postby chiapas » Sat Dec 07, 2013 11:43 pm

I just tried something further and found that, in CMD,

C:\Users\xxx>cd C:\Qt\4.8.5\bin

C:\Qt\4.8.5\bin>uic.exe -o "C:\Users\xxx\Desktop\b\build\ui_about.h" "C:\Users\
xxx\Desktop\b\about.ui"

This will create successfully the ui_about.h file.

I am thinking if the command in Visual Studio

The command "\bin\uic.exe -o "C:\Users\xxx\Desktop\b\build\ui_about.h" about.ui" exited with code 1.

is not working because some path is not correctly set.
Last edited by chiapas on Sun Dec 08, 2013 6:38 am, edited 1 time in total.
chiapas
 
Posts: 4
Joined: Sat Dec 07, 2013 7:23 pm

Re: How to build on Windows 7 x64

Postby chiapas » Sun Dec 08, 2013 2:49 am

By changing (just for testing, not a good solution) $(QTDIR) to C:\Qt\4.8.5, the above issue is fixed.
The better way is to put <QTDIR>C:\Qt\4.8.5</QTDIR> just after <PropertyGroup> in the file goldendict.vcxproj.
The best way is to use a script to detect a QT folder then pass to Visual Studio.

Although the above issue is fixed, there are still some problems. The first one is:

1>c:\users\xxx\desktop\b\winlibs\include\libavutil\common.h(30): fatal error C1083: Cannot open include file: 'inttypes.h': No such file or directory (ffmpegaudio.cc)

I have to find this inttypes.h on the interent, then put it into the same locationi as common.h. And modify this line #include <inttypes.h> (in common.h) to #include "inttypes.h".

Now, this issue is fixed. But more issuses come! Here is just part of the log:

1>c:\users\xxx\desktop\b\dictinfo.hh(26): error C2039: 'DictInfo' : is not a member of 'Ui' (dictinfo.cc)
1>c:\users\xxx\desktop\b\articleview.hh(30): error C2039: 'ArticleView' : is not a member of 'Ui' (articleview.cc)
1>c:\users\xxx\desktop\b\dictinfo.hh(26): error C2460: 'DictInfo::ui' : uses 'DictInfo', which is being defined (dictinfo.cc)
1> c:\users\xxx\desktop\b\dictinfo.hh(9) : see declaration of 'DictInfo'
1>c:\users\xxx\desktop\b\articleview.hh(30): error C2460: 'ArticleView::ui' : uses 'ArticleView', which is being defined (articleview.cc)
1> c:\users\xxx\desktop\b\articleview.hh(20) : see declaration of 'ArticleView'
1>build\ui_dictgroupwidget.h(27): error C2011: 'Ui_About' : 'class' type redefinition (groups.cc)
1> build\ui_groups.h(27) : see declaration of 'Ui_About'
1>build\ui_sources.h(27): error C2011: 'Ui_About' : 'class' type redefinition (editdictionaries.cc)
1> build\ui_editdictionaries.h(27) : see declaration of 'Ui_About'


There are much more errors than the above.

I wish someone knows where are the problems, otherwise I have to post this as an issue in goldendict github page.
chiapas
 
Posts: 4
Joined: Sat Dec 07, 2013 7:23 pm

Re: How to build on Windows 7 x64

Postby Tvangeste » Sun Dec 08, 2013 8:30 am

If you're trying to build with Visual Studio, don't forget to invoke the following command, once you've cloned the repository:
Code: Select all
git submodule init
Tvangeste
 
Posts: 893
Joined: Thu Jun 02, 2011 11:42 am

Re: How to build on Windows 7 x64

Postby chiapas » Sun Dec 08, 2013 1:45 pm

@Tvangeste,

Thank you. After using "git submodule init", it compiled to a point where I got

"1>------ Build started: Project: goldendict, Configuration: Release-Qt4 Win32 ------
1>LINK : fatal error LNK1181: cannot open input file 'avutil-gd.lib'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped =========="


If I just put the .lib files (from goldendict-winlibs-prebuilt-master) to \winlibs\lib\msvc, this issue is resolved but I got (just a part of the error log...)

1>------ Build started: Project: goldendict, Configuration: Release-Qt4 Win32 ------
1>qtmain.lib(qtmain_win.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1600' doesn't match value '1700' in delegate.obj
1>xdxf.obj : error LNK2001: unresolved external symbol "void __cdecl gdWarning(char const *,...)" (?gdWarning@@YAXPBDZZ)
1>xdxf2html.obj : error LNK2001: unresolved external symbol "void __cdecl gdWarning(char const *,...)" (?gdWarning@@YAXPBDZZ)
1>zipsounds.obj : error LNK2001: unresolved external symbol "void __cdecl gdWarning(char const *,...)" (?gdWarning@@YAXPBDZZ)
1>mdx.obj : error LNK2001: unresolved external symbol "void __cdecl gdWarning(char const *,...)" (?gdWarning@@YAXPBDZZ)
1>sdict.obj : error LNK2001: unresolved external symbol "void __cdecl gdWarning(char const *,...)" (?gdWarning@@YAXPBDZZ)
1>stardict.obj : error LNK2001: unresolved external symbol "void __cdecl gdWarning(char const *,...)" (?gdWarning@@YAXPBDZZ)


Am I supposed to build this libraries separately and manually, before I build the Visual project? If so, how? Else, what should I do?

Remark: The QTDIR and inttypes issue are still there even if I did git submodule init. Should I report these as bugs?
chiapas
 
Posts: 4
Joined: Sat Dec 07, 2013 7:23 pm


Return to General

Who is online

Users browsing this forum: No registered users and 36 guests

cron