Linking error on Mac OS X

Venkatram Vundavalli <[email protected]>
Newsgroups gmane.comp.lib.icu.general
Message-ID <7D5800A5B6E26644B2EB7A862856B0D40AC2FE70@SARASWATI>
Hi,
On Mac OS 10.2, using CodeWarrior 8.3, I was using UnicodeString class.
While using the three of the functions (which includes  a constructor), I
was getting the following link error.

Link Error   : undefined: 'icu_2_6::UnicodeString::doCaseCompare(long, long,
const wchar_t*, long, long, unsigned long)const ' (code) Referenced from
'icu_2_6::UnicodeString::doCaseCompare(long, long, icu_2_6::UnicodeString&,
long, long, unsigned long)const ' in HelloWorld.cpp

Link Error   : undefined: 'icu_2_6::UnicodeString::UnicodeString(const
char*, const char)' (code) Referenced from 'main' in HelloWorld.cpp

Link Error   : undefined: 'icu_2_6::UnicodeString::extract(int, int, char*,
unsigned long, const char*)const ' (code)
Referenced from 'main' in HelloWorld.cpp 

Just to give a back ground, I build ICU using gcc compiler and using the
dynamic libs in a CW project.
I have changed to umachine.h with the following to use plaform.h (this is to
avoid redefinition of int32_t)

#if defined(WIN32) || defined(_WIN32) || defined(WIN64) || 
defined(_WIN64)
#   include "unicode/pwin32.h"
#elif defined(__OS400__)
#   include "unicode/pos400.h"
#elif defined(__MWERKS__) && !defined(__MACH__)		//!defined(__MACH__)
added
#   include "unicode/pmacos.h"
#else
#   include "unicode/platform.h"
#endif

I suspect that the typedefs are not getting properly.  Or some thing is
going wrong.
In my program I have different typedefs to int32(signed long), uchar
(unsigned char), uchar16 (unsigned short), uint32(unsigned long).
The same code is working fine on Windows.
Please suggest.
thanks,
Venkat


-----Original Message-----
From: Steven R. Loomis [mailto:[email protected]]
Sent: Thursday, September 11, 2003 8:31 PM
To: Venkatram Vundavalli
Cc: Zartaj T. Majeed; [email protected]
Subject: Re: Compiling on Mac OS X



On Thursday, September 11, 2003, at 04:52 AM, Venkatram Vundavalli 
wrote:

> Hi,
> Thanks for your responses. Even though I installed ICU package using 
> gcc and
> not thru Code Warrior, I was getting this error.
>
> This is because of the flag __MWERKS__ and I was able to solve my 
> errors by
> undefined __MWERKS__ before including unistr.h.
>
> I think the flag __MWERKS__ is defined by Code Warrior. It is not the 
> right
> flag to identify Mac Classic.
> May I say it is a bug?

I agree, there should be another way to detect Classic.

yes.,   if you like, could you file it on  
http://www.jtcsv.com/cgibin/icu-bugs please ? if not, I can file it.

could you try changing it to:

	#elif defined(__MWERKS__) && !defined(__MACH__)

and see if that works.


Regards,
  Steven
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.