[Qt-creator] Using Windows API directly

2010-03-27 Thread Stephen Chu
Hi.

I have a piece of code that converts CMYK image data to color corrected 
RGB for display. In Creator, I can use ColorSync for OS X by including
ApplicationServices/ApplicationServices.h and call the OS function 
directly.

I need to do the same thing on Windows with WCS/ICM. So I include the 
following:

#include w32api.h
#define _WIN32_WINNTWindowsVista

#include windows.h
#include icm.h

and call CreateColorTransform(). It compiles but fails to link. The ICM 
API is documented to exist in Mscms.lib and .dll:
http://msdn.microsoft.com/en-us/library/dd316829%28VS.85%29.aspx

My question is, how do I make it link to the right library? I am using 
mingw that comes with Creator 2.0 alpha on Window.

Thanks.
___
Qt-creator mailing list
Qt-creator@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-creator


Re: [Qt-creator] Using Windows API directly

2010-03-27 Thread Coda Highland
You mean LIBS += -lmscms doesn't work? That's odd...

/s/ Adam

On Sat, Mar 27, 2010 at 4:59 PM, Stephen Chu step...@ju-ju.com wrote:
 Hi.

 I have a piece of code that converts CMYK image data to color corrected
 RGB for display. In Creator, I can use ColorSync for OS X by including
 ApplicationServices/ApplicationServices.h and call the OS function
 directly.

 I need to do the same thing on Windows with WCS/ICM. So I include the
 following:

 #include w32api.h
 #define _WIN32_WINNT    WindowsVista

 #include windows.h
 #include icm.h

 and call CreateColorTransform(). It compiles but fails to link. The ICM
 API is documented to exist in Mscms.lib and .dll:
 http://msdn.microsoft.com/en-us/library/dd316829%28VS.85%29.aspx

 My question is, how do I make it link to the right library? I am using
 mingw that comes with Creator 2.0 alpha on Window.

 Thanks.
 ___
 Qt-creator mailing list
 Qt-creator@trolltech.com
 http://lists.trolltech.com/mailman/listinfo/qt-creator


___
Qt-creator mailing list
Qt-creator@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-creator


Re: [Qt-creator] Using Windows API directly

2010-03-27 Thread Stephen Chu
Well. I had trouble spelling the lib name right. Now it works. :)

Thanks

On 3/27/2010 8:04 PM, Coda Highland wrote:
 You mean LIBS += -lmscms doesn't work? That's odd...

 /s/ Adam

 On Sat, Mar 27, 2010 at 4:59 PM, Stephen Chustep...@ju-ju.com  wrote:
 Hi.

 I have a piece of code that converts CMYK image data to color corrected
 RGB for display. In Creator, I can use ColorSync for OS X by including
 ApplicationServices/ApplicationServices.h  and call the OS function
 directly.

 I need to do the same thing on Windows with WCS/ICM. So I include the
 following:

 #includew32api.h
 #define _WIN32_WINNTWindowsVista

 #includewindows.h
 #includeicm.h

 and call CreateColorTransform(). It compiles but fails to link. The ICM
 API is documented to exist in Mscms.lib and .dll:
 http://msdn.microsoft.com/en-us/library/dd316829%28VS.85%29.aspx

 My question is, how do I make it link to the right library? I am using
 mingw that comes with Creator 2.0 alpha on Window.

 Thanks.
 ___
 Qt-creator mailing list
 Qt-creator@trolltech.com
 http://lists.trolltech.com/mailman/listinfo/qt-creator


 ___
 Qt-creator mailing list
 Qt-creator@trolltech.com
 http://lists.trolltech.com/mailman/listinfo/qt-creator

___
Qt-creator mailing list
Qt-creator@trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-creator