[ace-users] link fail on "ACE_Thread_Mutex.h"

Jeong Ho Lee friend25kr at gmail.com
Mon Aug 6 06:43:03 CDT 2007


Dear, all.

   ACE VERSION: 5.5

   HOST MACHINE and OPERATING SYSTEM:
       Host Machine: Intel Centrio Duo 2GHz meory 1.5GB
       OS: Windows Professional SP2

   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.

Sincerely,
Jeong-ho Lee.



More information about the Ace-users mailing list