Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 12-07-2008, 06:35 AM   #1
ShellShock
Guru
ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.
 
ShellShock's Avatar
 
Posts: 964
Karma: 2193020
Join Date: Sep 2008
Device: IPad Mini Retina, Kobo Aura HD
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
I've had a similar problem before in Windows development - this error occurs because Microsoft changed the declaration of these functions in their SDK some years ago. By the way, I'm using mingw 5.1.4 and Qt 4.4.3.

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
ShellShock is offline   Reply With Quote
Old 12-07-2008, 06:55 AM   #2
itimpi
Wizard
itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.
 
Posts: 4,094
Karma: 780247
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 .
itimpi is offline   Reply With Quote
Old 12-07-2008, 07:14 AM   #3
ShellShock
Guru
ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.
 
ShellShock's Avatar
 
Posts: 964
Karma: 2193020
Join Date: Sep 2008
Device: IPad Mini Retina, Kobo Aura HD
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.
ShellShock is offline   Reply With Quote
Old 12-07-2008, 07:20 AM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 26,312
Karma: 5382313
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.
kovidgoyal is offline   Reply With Quote
Old 12-07-2008, 08:53 AM   #5
ShellShock
Guru
ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.
 
ShellShock's Avatar
 
Posts: 964
Karma: 2193020
Join Date: Sep 2008
Device: IPad Mini Retina, Kobo Aura HD
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.
ShellShock is offline   Reply With Quote
Old 12-07-2008, 10:59 AM   #6
itimpi
Wizard
itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.
 
Posts: 4,094
Karma: 780247
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?
itimpi is offline   Reply With Quote
Old 12-07-2008, 11:13 AM   #7
ShellShock
Guru
ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.
 
ShellShock's Avatar
 
Posts: 964
Karma: 2193020
Join Date: Sep 2008
Device: IPad Mini Retina, Kobo Aura HD
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.
ShellShock is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Lit to Epub... Problem and can't fix? jotekman Calibre 6 09-10-2010 05:12 AM
Help me fix my problem....$25 bonus roland1919 Sony Reader 13 05-16-2008 05:37 AM
FB2 problem in V3. How to fix it. reycat HanLin eBook 2 02-18-2008 04:18 PM
Confused on how to fix this problem (pic included) Frogsmasha Sony Reader 9 04-12-2007 08:53 AM
[Librie-Dev] Librie RSS Reader v0.2b (Windows GUI) *needs XylogParser.dll* quantumskie Legacy E-Book Devices 0 11-27-2006 02:34 PM


All times are GMT -4. The time now is 05:45 PM.


MobileRead.com is a privately owned, operated and funded community.