[ace-users] link fail on "ACE_Thread_Mutex.h"
Douglas C. Schmidt
schmidt at dre.vanderbilt.edu
Mon Aug 6 06:47:44 CDT 2007
Hi,
Thanks for using the PRF.
> ACE VERSION: 5.5
Please upgrade to ACE+TAO+CIAO x.5.10 (i.e., ACE 5.5.10, TAO 1.5.10, and
CIAO 0.5.10), which you can download from
http://download.dre.vanderbilt.edu
under the heading: "Latest Beta Kit".
The DOC groups at Washington University, UC Irvine, and Vanderbilt
University only provide "best effort" support for non-sponsors for the
latest release, as described in
http://www.dre.vanderbilt.edu/~schmidt/DOC_ROOT/ACE/docs/ACE-bug-process.html
Thus, if you need more "predictable" help for earlier versions of
ACE+TAO, I recommend that you check out
http://www.dre.vanderbilt.edu/support.html
for a list of companies that will provide you with ACE+TAO commercial
support.
> HOST MACHINE and OPERATING SYSTEM:
> Host Machine: Intel Centrio Duo 2GHz meory 1.5GB
> OS: Windows Professional SP2
Which C++ compiler are you using on Windows?
> TARGET MACHINE and OPERATING SYSTEM: Same with Host Machine and OS
>
> THE $ACE_ROOT/ace/config.h FILE
>
> #define ACE_HAS_STANDARD_CPP_LIBRARY 1
> #define ACE_HAS_MFC 1
> #define ACE_NO_INLINE
> #include "ace/config-win32.h"
>
> AREA/CLASS/EXAMPLE AFFECTED:
> ACE_TSS/ACE_Thread_Mutex
>
> DOES THE PROBLEM AFFECT:
> LINKING
>
> SYNOPSIS:
> linking error is occurred in the compile time
>
> error LNK2019: unresolved external simbol "__declspec(dllimport)
> public: __thiscall ACE_Thread_Mutex::ACE_Thread_Mutex(wchar_t const
> *,struct ACE_mutexattr_t *)"
> (__imp_??0ACE_Thread_Mutex@@QAE at PB_WPAUACE_mutexattr_t@@@Z) in
> (reference position: "public: __thiscall
> ACE_TSS<int>::ACE_TSS<int>(int *)" (??0?$ACE_TSS at H@@QAE at PAH@Z)
> function)
>
>
> DESCRIPTION:
> I am writting a thread-based application using ACE_TSS. However,
> I cannot compile my test code because of link failure. My test code is
> as follows:
>
> #include "stdafx.h"
> #include "ace/init_ACE.h"
> #include "ace/TSS_T.h"
> #include "ace/SOCK_Stream.h"
>
> using namespace std;
>
> ACE_Thread_Mutex m;
>
> int main(void)
> {
> ACE::init();
> ACE_SOCK_Stream sock;
>
>
> ACE_TSS<int> tss;
> ACE::fini();
> return 0;
> }
>
> I do not think it is caused by the compiler missconfiguration. If I
> comment out the like "ACE_TSS<int> tss," it works. Please give me any
> clue to solve my problem.
Please see
ACE_ROOT/tests/TSS_Test.cpp
for an example of how to use ACE_TSS. Make sure this compiles/runs
properly on your platform first and then use it as a model for writing
your code.
Thanks,
Doug
More information about the Ace-users
mailing list