Page 1 of 1

How to get rid of errors c1189 ?

Posted: Fri Aug 23, 2013 8:44 pm
by andrei1985
Hello! I'm new into C++ programming and i'm interested in RCF for my PhD studies. I'm currently attempting to build a static library out of RCF-2.0.0.2685. I managed to avoid the problem caused by winsock.h but i'm still encountering the following 3 errors...

Error 1 error C1189: #error : UNICODE and _UNICODE should only be defined for Windows builds. d:\cpp projects\librcf\librcf\include\rcf\util\tchar.hpp
Error 2 error C1189: #error : RCF_FEATURE_FILETRANSFER=1 must be defined d:\cpp projects\librcf\librcf\include\rcf\filestream.hpp
Error 3 error C1189: #error : RCF_FEATURE_FILETRANSFER=1 must be defined d:\cpp projects\librcf\librcf\include\rcf\filestream.hpp

Any ideas of how them can be removed and cause no other damage to the project? I use VS 2012 express for building under Windows 7 Professional...

Thanks you in advance!
Andrei

Re: How to get rid of errors c1189 ?

Posted: Fri Aug 23, 2013 11:39 pm
by jarl
Hi Andrei,

The User Guide has build instructions for RCF:

http://www.deltavsoft.com/doc/rcf_user_ ... tudio_2010

, using either Visual Studio or gcc. More details are available here:

http://www.deltavsoft.com/doc/rcf_user_ ... lding.html

The basic idea is that you compile RCF.cpp, using your own build system. If you are building on a non-Windows platform, you should not be defining either UNICODE or _UNICODE.