I got the error:
HelloWorld.c
helper.c
util\helper.c(457) : warning C4311: 'type cast' : pointer truncation
from 'void *' to 'int'
msgUtil.c
Properties.c
CallbackServerUnparsed.c
XmlBlasterAccessUnparsed.c
XmlBlasterConnectionUnparsed.c
xmlBlasterSocket.c
xmlBlasterZlib.c
Generating Code...
Microsoft (R) Incremental Linker Version 7.00.9955
Copyright (C) Microsoft Corporation. All rights reserved.
/out:HelloWorld.exe
HelloWorld.obj
helper.obj
msgUtil.obj
Properties.obj
CallbackServerUnparsed.obj
XmlBlasterAccessUnparsed.obj
XmlBlasterConnectionUnparsed.obj
xmlBlasterSocket.obj
xmlBlasterZlib.obj
ws2_32.lib
helper.obj : error LNK2019: unresolved external symbol
__imp__pthread_self referenced in function _xmlBlasterDefaultLogging
XmlBlasterAccessUnparsed.obj : error LNK2019: unresolved external
symbol __imp__pthread_self referenced in function _xmlBlasterConnect
CallbackServerUnparsed.obj : error LNK2019: unresolved external symbol
__imp__pthread_mutex_destroy referenced in function _runCallbackServer
XmlBlasterAccessUnparsed.obj : error LNK2019: unresolved external
symbol __imp__pthread_mutex_destroy referenced in function _preSendEvent
CallbackServerUnparsed.obj : error LNK2019: unresolved external symbol
__imp__pthread_join referenced in function _runCallbackServer
XmlBlasterAccessUnparsed.obj : error LNK2019: unresolved external
symbol __imp__pthread_join referenced in function _preSendEvent
CallbackServerUnparsed.obj : error LNK2019: unresolved external symbol
__imp__pthread_create referenced in function _runCallbackServer
XmlBlasterAccessUnparsed.obj : error LNK2019: unresolved external
symbol __imp__pthread_create referenced in function _preSendEvent
CallbackServerUnparsed.obj : error LNK2019: unresolved external symbol
__imp__pthread_mutex_init referenced in function _runCallbackServer
XmlBlasterAccessUnparsed.obj : error LNK2019: unresolved external
symbol __imp__pthread_mutex_init referenced in function _preSendEvent
CallbackServerUnparsed.obj : error LNK2019: unresolved external symbol
__imp__pthread_mutex_unlock referenced in function _listenLoop
XmlBlasterAccessUnparsed.obj : error LNK2019: unresolved external
symbol __imp__pthread_mutex_unlock referenced in function _preSendEvent
CallbackServerUnparsed.obj : error LNK2019: unresolved external symbol
__imp__pthread_mutex_lock referenced in function _listenLoop
XmlBlasterAccessUnparsed.obj : error LNK2019: unresolved external
symbol __imp__pthread_mutex_lock referenced in function _preSendEvent
XmlBlasterAccessUnparsed.obj : error LNK2019: unresolved external
symbol __imp__pthread_detach referenced in function
_freeXmlBlasterAccessUnparsed
XmlBlasterAccessUnparsed.obj : error LNK2019: unresolved external
symbol __imp__pthread_cond_signal referenced in function _responseEvent
XmlBlasterAccessUnparsed.obj : error LNK2019: unresolved external
symbol __imp__pthread_cond_destroy referenced in function _postSendEvent
XmlBlasterAccessUnparsed.obj : error LNK2019: unresolved external
symbol __imp__pthread_cond_wait referenced in function _postSendEvent
XmlBlasterAccessUnparsed.obj : error LNK2019: unresolved external
symbol __imp__pthread_cond_timedwait referenced in function _postSendEvent
XmlBlasterAccessUnparsed.obj : error LNK2019: unresolved external
symbol __imp__pthread_cond_init referenced in function _postSendEvent
XmlBlasterAccessUnparsed.obj : error LNK2019: unresolved external
symbol __imp__pthread_attr_destroy referenced in function _interceptUpdate
XmlBlasterAccessUnparsed.obj : error LNK2019: unresolved external
symbol __imp__pthread_attr_setdetachstate referenced in function
_interceptUpdate
XmlBlasterAccessUnparsed.obj : error LNK2019: unresolved external
symbol __imp__pthread_attr_init referenced in function _interceptUpdate
HelloWorld.exe : fatal error LNK1120: 16 unresolved externals
Hope if you can help me...
Regards
ARGHAD
On 7/17/06, *Marcel Ruff* <mr at marcelruff.info
<mailto:mr at marcelruff.info>> wrote:
Hi,
adding
cl -DDLL_IGNORE ...
to you command should help you further:
cd xmlBlaster\src\c
cl -D_WINDOWS -DDLL_IGNORE -I. HelloWorld.c util\*.c
socket\XmlBlasterConnectionUnparsed.c
socket\xmlBlasterSocket.c socket\xmlBlasterZlib.c ws2_32.lib
socket\pthreadVC2.lib
I usually compile it with
cd xmlBlaster
build c
regards
Marcel
Arghad Arnaout wrote:
> Hallo ...
>
> I am trying to compile ANSI C Library.... but when I tried the
> following compilation command:
> cl -D_WINDOWS -I. HelloWorld.c util\*.c
socket\XmlBlasterConnectionUnparsed.c
> socket\xmlBlasterSocket.c
ws2_32.lib
>
> I got the following errors:
>
> HelloWorld.c
> helper.c
> util\helper.c(84) : error C2491: 'getStackTrace' : definition of
> dllimport function not allowed
> util\helper.c(139) : error C2491: 'sleepMillis' : definition of
> dllimport function not allowed
> util\helper.c(187) : error C2491: 'getTimestamp' : definition of
> dllimport function not allowed
> util\helper.c(211) : error C2491: 'getAbsoluteTime' : definition of
> dllimport function not allowed
> util\helper.c(268) : error C2491: 'strcpyAlloc' : definition of
> dllimport function not allowed
> util\helper.c(282) : error C2491: 'strcatAlloc' : definition of
> dllimport function not allowed
> util\helper.c(297) : error C2491: 'strcpyRealloc' : definition of
> dllimport function not allowed
> util\helper.c(311) : error C2491: 'strFromBlobAlloc' :
definition of
> dllimport function not allowed
> util\helper.c(339) : error C2491: 'strncpy0' : definition of
dllimport
> function not allowed
> util\helper.c(349) : error C2491: 'trim' : definition of dllimport
> function not allowed
> util\helper.c(385) : error C2491: 'trimStart' : definition of
> dllimport function not allowed
> util\helper.c(413) : error C2491: 'trimEnd' : definition of
dllimport
> function not allowed
> util\helper.c(431) : error C2491: 'toReadableDump' : definition of
> dllimport function not allowed
> util\helper.c(455) : warning C4273: 'get_pthread_id' : inconsistent
> dll linkage
> util\helper.c(483) : error C2491: 'xmlBlasterDefaultLogging' :
> definition of dllimport function not allowed
> util\helper.c(555) : error C2491: 'parseLogLevel' : definition of
> dllimport function not allowed
> util\helper.c(579) : error C2491: 'getLogLevelStr' : definition of
> dllimport function not allowed
> util\helper.c(590) : error C2491: 'doLog' : definition of dllimport
> function not allowed
> util\helper.c(601) : error C2491: 'embedException' : definition of
> dllimport function not allowed
> util\helper.c(622) : error C2491: 'initializeExceptionStruct' :
> definition of dllimport function not allowed
> util\helper.c(640) : error C2491: 'getExceptionStr' : definition of
> dllimport function not allowed
> util\helper.c(653) : error C2491: 'int64ToStr' : definition of
> dllimport function not allowed
> util\helper.c(670) : error C2491: 'strToInt64' : definition of
> dllimport function not allowed
> util\helper.c(685) : error C2491: 'blobcpyAlloc' : definition of
> dllimport function not allowed
> util\helper.c(707) : error C2491: 'freeBlobHolderContent' :
definition
> of dllimport function not allowed
> util\helper.c(724) : error C2491: 'blobDump' : definition of
dllimport
> function not allowed
> util\helper.c(729) : error C2491: 'freeBlobDump' : definition of
> dllimport function not allowed
> msgUtil.c
> util\msgUtil.c(47) : error C2491: 'getXmlBlasterVersion' :
definition
> of dllimport function not allowed
> util\msgUtil.c(69) : error C2491: 'xmlBlasterFree' : definition of
> dllimport function not allowed
> util\msgUtil.c(80) : error C2491: 'freeQosArr' : definition of
> dllimport function not allowed
> util\msgUtil.c(96) : error C2491: 'freeMsgUnitArr' : definition of
> dllimport function not allowed
> util\msgUtil.c(107) : error C2491: 'freeMsgUnitArrInternal' :
> definition of dllimport function not allowed
> util\msgUtil.c(121) : error C2491: 'freeMsgUnitData' :
definition of
> dllimport function not allowed
> util\msgUtil.c(147) : error C2491: 'freeMsgUnit' : definition of
> dllimport function not allowed
> util\msgUtil.c(161) : error C2491: 'messageUnitToXmlLimited' :
> definition of dllimport function not allowed
> util\msgUtil.c(195) : error C2491: 'messageUnitToXml' :
definition of
> dllimport function not allowed
> util\msgUtil.c(203) : error C2491:
'initializeXmlBlasterException' :
> definition of dllimport function not allowed
> util\msgUtil.c(347) : error C2491: 'gethostbyname_re' :
definition of
> dllimport function not allowed
> Properties.c
> util\Properties.c(34) : warning C4273: 'createProperties' :
> inconsistent dll linkage
> util\Properties.c(63) : warning C4273: 'freeProperties' :
inconsistent
> dll linkage
> util\Properties.c(78) : warning C4273: 'dumpProperties' :
inconsistent
> dll linkage
> XmlBlasterConnectionUnparsed.c
> socket\XmlBlasterConnectionUnparsed.c(48) : warning C4273:
> 'getXmlBlasterConnectionUnparsed' : inconsistent dll linkage
> socket\XmlBlasterConnectionUnparsed.c(96) : warning C4273:
> 'freeXmlBlasterConnectionUnparsed' : inconsistent dll linkage
> socket\XmlBlasterConnectionUnparsed.c(476) : warning C4273:
> 'xmlBlasterConnectionUnparsedUsage' : inconsistent dll linkage
> xmlBlasterSocket.c
> socket\xmlBlasterSocket.c(102) : error C2491: 'encodeMsgUnit' :
> definition of dllimport function not allowed
> socket\xmlBlasterSocket.c(157) : error C2491: 'encodeMsgUnitArr' :
> definition of dllimport function not allowed
> socket\xmlBlasterSocket.c(304) : warning C4273: 'parseSocketData' :
> inconsistent dll linkage
> socket\xmlBlasterSocket.c(467) : warning C4273:
> 'convertToXmlBlasterException' : inconsistent dll linkage
> socket\xmlBlasterSocket.c(486) : warning C4273:
> 'encodeXmlBlasterException' : inconsistent dll linkage
> socket\xmlBlasterSocket.c(505) : warning C4273: 'parseQosArr' :
> inconsistent dll linkage
> socket\xmlBlasterSocket.c(524) : error C2491: 'parseMsgUnitArr' :
> definition of dllimport function not allowed
> Generating Code...
>
> I am using Microsoft C/C++ Optimizing Compiler Ver 13.00.9466 for
> 80x86 ... this compiler is shipped with MS VS 2002.NET
<http://2002.NET> <http://2002.NET>
> I do not have this big experience with C compilation.
>
> Any help ...
> Thank you
>
> Arghad
>