![]() |
#1 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,178
Karma: 2431850
Join Date: Sep 2008
Device: IPad Mini 2 Retina
|
Problem & fix to Windows dev env setup
I'm currently following the instructions to set up the Windows dev environment here. With step 8, Install Qt, I was getting these errors:
Code:
../../include/QtCore/../../src/corelib/arch/qatomic_windows.h:387: error: declaration of C function `long int InterlockedCompareExchange(long int*, long int, long int)' conflicts with D:/CalibreDev/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/winbase.h:1663: error: previous declaration `LONG InterlockedCompareExchange(volatile LONG*, LONG, LONG)' here ../../include/QtCore/../../src/corelib/arch/qatomic_windows.h:388: error: declaration of C function `long int InterlockedIncrement(long int*)' conflicts with D:/CalibreDev/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/winbase.h:1676: error: previous declaration `LONG InterlockedIncrement(volatile LONG*)' here ../../include/QtCore/../../src/corelib/arch/qatomic_windows.h:389: error: declaration of C function `long int InterlockedDecrement(long int*)' conflicts with D:/CalibreDev/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/winbase.h:1667: error: previous declaration `LONG InterlockedDecrement(volatile LONG*)' here ../../include/QtCore/../../src/corelib/arch/qatomic_windows.h:390: error: declaration of C function `long int InterlockedExchange(long int*, long int)' conflicts with D:/CalibreDev/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/winbase.h:1668: error: previous declaration `LONG InterlockedExchange(volatile LONG*, LONG)' here ../../include/QtCore/../../src/corelib/arch/qatomic_windows.h:391: error: declaration of C function `long int InterlockedExchangeAdd(long int*, long int)' conflicts with D:/CalibreDev/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/winbase.h:1672: error: previous declaration `LONG InterlockedExchangeAdd(volatile LONG*, LONG)' here Anyway, I've got round this problem by changing MinGW\include\winbase.h, to remove volatile from the declaration of these functions: InterlockedCompareExchange InterlockedCompareExchangePointer InterlockedDecrement InterlockedExchange InterlockedExchangePointer InterlockedExchangeAdd |
![]() |
![]() |
![]() |
#2 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,553
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
|
I have been going through the same process and finding it quite hard work initially.
![]() You may notice that I updated the wiki page with an alternative way of effectively achieving the same thing. You might want to update that page with your own findings/ecperience. Getting it more ccurate and comprehensive can only be a good thing ![]() I think it will be a good idea if a number of developers start using the Windows environment as their primary one. I am sure that there are a number of areas in which Calibre could have minor changes to make it perform better in a Windows environment. I know that kovid wants to keep Calibre OS neutral, but as it is likely that a significant proportion of Calibre users are Windows based small tweaks that have large benefits might be acceptable, particularily if he does not have to develop and test them ![]() |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,178
Karma: 2431850
Join Date: Sep 2008
Device: IPad Mini 2 Retina
|
Yes - thanks for the updates - I noticed that some of the links had been fixed too.
I'm currently reading a thread in the Qt forums; it seems similar problems are caused when Visual Studio is already installed - the Qt configuration is using the INCLUDE and LIB system environment variables, which will be pointing to the Visual Studio installation. This could have caused the problem I described, and another one I'm now getting: undefined reference to `CoCreateInstance@20' blah blah I'm going start from the beginning, with LIB and INCLUDE set to the mingw dirs instead. I'll have to figure out a better solution to switch between VS and MINGW. ![]() |
![]() |
![]() |
![]() |
#4 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,163
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
I'm upgrading my windows calibre build environment to python 2.6 + Qt 4.4.3 compiled with VS 2008. Qt, SIP and PyQt all compiled out of the box for me with VS 2008. So you may not need to use mingw for them at all.
|
![]() |
![]() |
![]() |
#5 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,178
Karma: 2431850
Join Date: Sep 2008
Device: IPad Mini 2 Retina
|
Thanks for the tip - I'll try VS2008 instead. I was only using mingw as I thought it would be easier to set up (less likely to go wrong). I think I was close to getting the mingw env working but I would prefer VS2008 anyway.
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,553
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
|
I would prefer VS2008 as well, and now that the express editions are available free of charge anyone can get the basic version. I used to have a MSDN subscription so I am accustomed to earlier versions of VS. I have not looked yet, but I wonder if there are Python and/or bazarre plugins for VS?
|
![]() |
![]() |
![]() |
#7 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,178
Karma: 2431850
Join Date: Sep 2008
Device: IPad Mini 2 Retina
|
ActiveState used to do a plug-in but I think it is discontinued. And Microsoft have IronPython, which is not quite the same thing IronPython = Python + .Net.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Lit to Epub... Problem and can't fix? | jotekman | Calibre | 6 | 09-10-2010 04:12 AM |
Help me fix my problem....$25 bonus | roland1919 | Sony Reader | 13 | 05-16-2008 04:37 AM |
FB2 problem in V3. How to fix it. | reycat | HanLin eBook | 2 | 02-18-2008 03:18 PM |
Confused on how to fix this problem (pic included) | Frogsmasha | Sony Reader | 9 | 04-12-2007 07:53 AM |
[Librie-Dev] Librie RSS Reader v0.2b (Windows GUI) *needs XylogParser.dll* | quantumskie | Legacy E-Book Devices | 0 | 11-27-2006 01:34 PM |