Before use, you must first set the following:
Add the/GR compilation option enable C ++ rtti.
Add the include of ice, the include of stlport, And the Lib path of ice, and add these paths to the beginning to avoid conflicts with VC.
Add iced. Lib iceutild. lib to link object/library modles.
1. compilation appears
Linking
Link: Fatal error lnk1104: cannot open file "stlport_vc6_static.lib"
Error executing link.exe.
Solution:
Porject-> setting-> C ++-> codegeneration: Set use run-time library = debug multithreaded DLL
2. Compilation
Warning c4005: '_ stlp_debug_check': Macro redefinition
Solution: add the following before including ice/ice. h:Code
# If! Defined (ndebug )&&! Defined (_ stlp_debug)
# DEFINE _ stlp_debug
# Endif
3. Compilation
Error c2065: 'tryentercriticalsection ': Undeclared identifier
Solution:
In stdafx. H, add
# Ifndef _ win32_winnt
# DEFINE _ win32_winnt 0x400
# Endif
4. Compilation
Error lnk2001: unresolved external symbol "_ declspec (dllimport) Public: _ thiscall iceutil: gcrecmutexinit (void)" (_ imp _?? 0gcrecmutexinit @ iceutil @ Qae @ xz)
Error lnk2001: unresolved external symbol "_ declspec (dllimport) Public: _ thiscall iceutil: gcrecmutexinit ::~ Gcrecmutexinit (void) "(_ imp _?? 1gcrecmutexinit @ iceutil @ Qae @ xz)
D
Solution:
Porject-> setting-> link-> Object/library modles: Add iced. Lib iceutild. Lib
5. compilation appears
Error c2061: syntax error: identifier 'SC _ handle'
Error c2061: syntax error: identifier 'service _ status'
Error c2146: syntax error: Missing '; 'before identifier' _ statushandle'
Error c2501: 'service _ status_handle': Missing storage-class or type specifiers
Error c2501: '_ statushandle': Missing storage-class or type specifiers
Error c2146: syntax error: Missing '; 'before identifier' _ status'
Error c2501: 'service _ status': Missing storage-class or type specifiers
Error c2501: '_ status': Missing storage-class or type specifiers
Solution:
Add in stdafx. h or other files
# Include <winsvc. h>
author: Li treasure (http://zhenbaodao51.51.net, http://www.lizhenbao.com, http://www.cnitblog.com/lizhenbao/), reprint please indicate the source
end.