Bug 333765 - Building marble-qt fails because of wrong entry point
Summary: Building marble-qt fails because of wrong entry point
Status: RESOLVED FIXED
Alias: None
Product: marble
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Dennis Nienhüser
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-23 11:32 UTC by Aleksei Aleshin
Modified: 2014-09-27 04:53 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aleksei Aleshin 2014-04-23 11:32:43 UTC
src/CMakeLists.txt:151 is
add_executable (marble-qt WIN32 ${marble_SRCS} ${marble_HDRS})

So cmake generates project that has SUBSYSTEM:WINDOWS. This assumes that marble-qt's entry point is WinMain (). But it is "int main(...)" and linking fails with error
unresolved external symbol WinMain referenced in function __tmainCRTStartup

Reproducible: Always

Steps to Reproduce:
1. Clone qt branch from git repository
2. Run cmake -DQTONLY=ON -DQT5BUILD=ON -DCMAKE_INSTALL_PREFIX=../marble-bin -DPACKAGE_ROOT_PREFIX=../marble-bin -G "Visual Studio 11 Win64" ../marble
3. Build ALL_BUILD project
Actual Results:  
Build fails

Expected Results:  
Successful build

Versions:
Windws 8.1
Visual Studion 2012
Qt 5.1.2 x64
Comment 1 Aleksei Aleshin 2014-04-23 12:01:09 UTC
I ment qt5 branch from git repository
Comment 2 Bernhard Beschow 2014-04-27 08:46:31 UTC
Hi Aleksei,

please use the master branch instead. The qt5 branch has been merged into master and therefore isn't maintained any more.
Comment 3 Aleksei Aleshin 2014-04-27 17:11:46 UTC
Master branch has the same bug.
Comment 4 Bernhard Beschow 2014-04-29 05:51:58 UTC
Does this happen also in the Qt4 version of Marble?
Comment 5 Aleksei Aleshin 2014-04-30 09:29:56 UTC
(In reply to comment #4)
> Does this happen also in the Qt4 version of Marble?

It's a bit time consuming task (since i have to compile Qt4 with VS 2012).
I'll try it later.
Comment 6 Dennis Nienhüser 2014-07-24 19:12:13 UTC
I tested both Qt 4.7 with MSVC 2010 64 bit and Qt 4.8 with MSVC 2010 Express without running into this.
Comment 7 Dennis Nienhüser 2014-09-08 01:53:09 UTC
Reproducable with Qt 5.3 and MSVC 2013.
Comment 8 Dennis Nienhüser 2014-09-08 02:59:48 UTC
Fixed in 27a8424a
Comment 9 Dennis Nienhüser 2014-09-27 04:53:12 UTC
Git commit f6c9d51d3dc79ec7e840192154c7d0b8dfc5bd48 by Dennis Nienhüser.
Committed on 08/09/2014 at 01:50.
Pushed by nienhueser into branch 'master'.

Fix linking with MSVC 12 and Qt 5.x
(cherry picked from commit 27a8424a9577fc0bb0d715077def7586d4ea6d7d)

M  +3    -0    src/apps/marble-qt/CMakeLists.txt

http://commits.kde.org/marble/f6c9d51d3dc79ec7e840192154c7d0b8dfc5bd48