Página 1 de 1

Erros ao compilar harbour + MSVC

Enviado: 20 Jun 2016 21:40
por rossine
Olá,

Estou tentando compilar usando o harbour + MSVC + QT e está ocorrendo erros que não estou sabendo como resolver.

Será que alguém que já usa o harbour + MSVC poderia me dar uma luz para resolvê-los ?

Segue os erros:

Código: Selecionar todos

Qt5AxContainer.lib(qaxbase.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in hbqaxcontainer5.lib(QAxBase.obj)
Qt5AxContainer.lib(qaxdump.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in hbqaxcontainer5.lib(QAxBase.obj)
Qt5AxContainer.lib(qaxobject.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in hbqaxcontainer5.lib(QAxBase.obj)
Qt5AxContainer.lib(qaxtypes.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in hbqaxcontainer5.lib(QAxBase.obj)
Qt5AxContainer.lib(qaxutils.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in hbqaxcontainer5.lib(QAxBase.obj)
Qt5UiTools.lib(quiloader.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in hbqaxcontainer5.lib(QAxBase.obj)
Qt5UiTools.lib(Qt5UiTools_pch.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in hbqaxcontainer5.lib(QAxBase.obj)
Qt5UiTools.lib(moc_quiloader.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in hbqaxcontainer5.lib(QAxBase.obj)
Qt5UiTools.lib(abstractformbuilder.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in hbqaxcontainer5.lib(QAxBase.obj)
Qt5UiTools.lib(formbuilder.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in hbqaxcontainer5.lib(QAxBase.obj)
Qt5UiTools.lib(formbuilderextra.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in hbqaxcontainer5.lib(QAxBase.obj)
Qt5UiTools.lib(textbuilder.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in hbqaxcontainer5.lib(QAxBase.obj)
Qt5UiTools.lib(properties.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in hbqaxcontainer5.lib(QAxBase.obj)
Qt5UiTools.lib(resourcebuilder.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in hbqaxcontainer5.lib(QAxBase.obj)
Qt5UiTools.lib(ui4.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in hbqaxcontainer5.lib(QAxBase.obj)
Qt5UiTools.lib(moc_properties_p.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in hbqaxcontainer5.lib(QAxBase.obj)
msvcprt.lib(MSVCP120.dll) : error LNK2005: "void __cdecl std::_Xbad_alloc(void)" (?_Xbad_alloc@std@@YAXXZ) already defined in libcpmt.lib(xthrow.obj)
msvcprt.lib(MSVCP120.dll) : error LNK2005: "void __cdecl std::_Xlength_error(char const *)" (?_Xlength_error@std@@YAXPBD@Z) already defined in libcpmt.lib(xthrow.obj)
msvcprt.lib(MSVCP120.dll) : error LNK2005: "void __cdecl std::_Xout_of_range(char const *)" (?_Xout_of_range@std@@YAXPBD@Z) already defined in libcpmt.lib(xthrow.obj)
msvcprt.lib(MSVCP120.dll) : error LNK2005: "char const * __cdecl std::_Syserror_map(int)" (?_Syserror_map@std@@YAPBDH@Z) already defined in libcpmt.lib(syserror.obj)
msvcprt.lib(MSVCP120.dll) : error LNK2005: "char const * __cdecl std::_Winerror_map(int)" (?_Winerror_map@std@@YAPBDH@Z) already defined in libcpmt.lib(syserror.obj)
msvcprt.lib(MSVCP120.dll) : error LNK2005: "public: __thiscall std::locale::id::id(unsigned int)" (??0id@locale@std@@QAE@I@Z) already defined in hbqaxcontainer5.lib(QAxBase.obj)
Qt5AxBase.lib(qaxtypefunctions.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in hbqaxcontainer5.lib(QAxBase.obj)
Qt5AxBase.lib(Qt5AxBase_pch.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in hbqaxcontainer5.lib(QAxBase.obj)
Qt5AxContainer.lib(qaxutils.obj) : warning LNK4049: locally defined symbol _memmove imported
Qt5UiTools.lib(Qt5UiTools_pch.obj) : warning LNK4049: locally defined symbol _memmove imported
Qt5AxBase.lib(Qt5AxBase_pch.obj) : warning LNK4049: locally defined symbol _memmove imported
Qt5AxContainer.lib(qaxbase.obj) : warning LNK4217: locally defined symbol _memmove imported in function "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > & __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::erase(unsigned int,unsigned int)" (?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@II@Z)
Qt5AxContainer.lib(qaxdump.obj) : warning LNK4049: locally defined symbol _memmove imported
Qt5AxContainer.lib(qaxobject.obj) : warning LNK4049: locally defined symbol _memmove imported
Qt5AxContainer.lib(qaxtypes.obj) : warning LNK4049: locally defined symbol _memmove imported
Qt5AxContainer.lib(qaxutils.obj) : warning LNK4049: locally defined symbol __hypot imported
Qt5UiTools.lib(Qt5UiTools_pch.obj) : warning LNK4049: locally defined symbol __hypot imported
Qt5AxBase.lib(Qt5AxBase_pch.obj) : warning LNK4049: locally defined symbol __hypot imported
Qt5AxContainer.lib(qaxbase.obj) : warning LNK4217: locally defined symbol __hypot imported in function _hypot
Qt5AxContainer.lib(qaxdump.obj) : warning LNK4049: locally defined symbol __hypot imported
Qt5AxContainer.lib(qaxobject.obj) : warning LNK4049: locally defined symbol __hypot imported
Qt5AxContainer.lib(qaxtypes.obj) : warning LNK4049: locally defined symbol __hypot imported
Qt5AxContainer.lib(qaxbase.obj) : warning LNK4217: locally defined symbol _isupper imported in function "private: void __thiscall MetaObjectGenerator::addSetterSlot(class QByteArray const &)" (?addSetterSlot@MetaObjectGenerator@@AAEXABVQByteArray@@@Z)
Qt5AxContainer.lib(qaxdump.obj) : warning LNK4049: locally defined symbol _isupper imported
Qt5UiTools.lib(abstractformbuilder.obj) : warning LNK4217: locally defined symbol __invalid_parameter_noinfo_noreturn imported in function "class stdext::checked_array_iterator<class QWidget * const *> __cdecl stdext::make_checked_array_iterator<class QWidget * const *>(class QWidget * const *,unsigned int,unsigned int)" (??$make_checked_array_iterator@PBQAVQWidget@@@stdext@@YA?AV?$checked_array_iterator@PBQAVQWidget@@@0@PBQAVQWidget@@II@Z)
Qt5AxContainer.lib(qaxbase.obj) : error LNK2019: unresolved external symbol __imp__toupper referenced in function "private: void __thiscall MetaObjectGenerator::addSetterSlot(class QByteArray const &)" (?addSetterSlot@MetaObjectGenerator@@AAEXABVQByteArray@@@Z)
Qt5AxContainer.lib(qaxdump.obj) : error LNK2001: unresolved external symbol __imp__toupper
test.exe : fatal error LNK1120: 1 unresolved externals
hbmk2 [padtest]: Erro: Executando linkeditor. 1120

Obrigado,

Erros ao compilar harbour + MSVC

Enviado: 21 Jun 2016 09:41
por Kapiaba
Não uso, mas pelo que entendi em uma resposta na net, te falta:

Código: Selecionar todos

wsock32.lib
ws2_32.lib
comctl32.lib

Erros ao compilar harbour + MSVC

Enviado: 21 Jun 2016 12:33
por rossine
Olá Kapiaba,

Inseri estas libs e mudei em meu .hbp as configurações abaixo:

Código: Selecionar todos

{msvc}ldflags=/DEFAULTLIB:msvcrt.lib /DEFAULTLIB:msvcprt.lib /NODEFAULTLIB:libcpmt.lib /NODEFAULTLIB:libcmt.lib /FORCE
{msvc}libs=ws2_32
{msvc}libs=vfw32
{msvc}libs=wsock32
{msvc}libs=comctl32
Agora ficaram somente estes erros:

Código: Selecionar todos

Qt5AxContainer.lib(qaxbase.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in hbqaxcontainer5.lib(QAxBase.obj)
Qt5AxContainer.lib(qaxdump.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in hbqaxcontainer5.lib(QAxBase.obj)
Qt5AxContainer.lib(qaxobject.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in hbqaxcontainer5.lib(QAxBase.obj)
Qt5AxContainer.lib(qaxtypes.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in hbqaxcontainer5.lib(QAxBase.obj)
Qt5AxContainer.lib(qaxutils.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in hbqaxcontainer5.lib(QAxBase.obj)
Qt5UiTools.lib(quiloader.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in hbqaxcontainer5.lib(QAxBase.obj)
Qt5UiTools.lib(Qt5UiTools_pch.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in hbqaxcontainer5.lib(QAxBase.obj)
Qt5UiTools.lib(moc_quiloader.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in hbqaxcontainer5.lib(QAxBase.obj)
Qt5UiTools.lib(abstractformbuilder.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in hbqaxcontainer5.lib(QAxBase.obj)
Qt5UiTools.lib(formbuilder.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in hbqaxcontainer5.lib(QAxBase.obj)
Qt5UiTools.lib(formbuilderextra.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in hbqaxcontainer5.lib(QAxBase.obj)
Qt5UiTools.lib(textbuilder.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in hbqaxcontainer5.lib(QAxBase.obj)
Qt5UiTools.lib(properties.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in hbqaxcontainer5.lib(QAxBase.obj)
Qt5UiTools.lib(resourcebuilder.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in hbqaxcontainer5.lib(QAxBase.obj)
Qt5UiTools.lib(ui4.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in hbqaxcontainer5.lib(QAxBase.obj)
Qt5UiTools.lib(moc_properties_p.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in hbqaxcontainer5.lib(QAxBase.obj)
msvcprt.lib(MSVCP120.dll) : warning LNK4006: "public: __thiscall std::locale::id::id(unsigned int)" (??0id@locale@std@@QAE@I@Z) already defined in hbqaxcontainer5.lib(QAxBase.obj); second definition ignored
Qt5AxBase.lib(qaxtypefunctions.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in hbqaxcontainer5.lib(QAxBase.obj)
Qt5AxBase.lib(Qt5AxBase_pch.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in hbqaxcontainer5.lib(QAxBase.obj)
test.exe : fatal error LNK1319: 18 mismatches detected
hbmk2 [padtest]: Erro: Executando linkeditor. 1319
Mais alguma sugestão ?

Obrigado,

Erros ao compilar harbour + MSVC

Enviado: 21 Jun 2016 13:06
por Kapiaba
Rossine, tens certeza que as versões harbour + MSVC + QT são comaptiveis?

Erros ao compilar harbour + MSVC

Enviado: 09 Ago 2016 14:42
por rossine
Olá,

Só para constar a solução dos erros que citei acima.

Em meu arquivo .HBC eu inclui a sequinte linha:

{msvc}cflags=/MD

T+

Erros ao compilar harbour + MSVC

Enviado: 09 Ago 2016 21:53
por JoséQuintas
Estas configurações valem pra msvc e bcc:

SET PATH
SET INCLUDE
SET LIB

Não costumo indicar nada adicional pra msvc pra linqueditar.
A não ser o comp=msvc

Mas não uso QT.