[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: libobjc2 on windows
From: |
Vincent Richomme |
Subject: |
Re: libobjc2 on windows |
Date: |
Mon, 15 Mar 2010 15:33:08 +0100 |
User-agent: |
RoundCube Webmail/0.2 |
>> On 6 Mar 2010, at 13:57, Vincent Richomme wrote:
>>
>>> So how can I tell GNUmakefile to use clang ? I also tried the
following
>>> line:
>>>
>>> $> CC=clang CXX=clang++ OBJC=clang make messages=yes but same problem.
>>
>>
>> This is GNU Make, not BSD Make. The correct syntax is:
>>
>> $ make CC=clang
>>
>> libobjc2 should compile with GCC, however...
>>
>
I have recompiled clang with specific include headers for GNustep :
InitHeaderSearch.cpp:
-----------------------
...
case llvm::Triple::MinGW64:
case llvm::Triple::MinGW32:
AddPath("c:/GNUstep/mingw/include", System, true, false, false);
AddPath("c:/GNUstep/mingw/lib/gcc/mingw32/4.4.0/include", System,
true, false, false);
AddPath("c:/GNUstep/mingw/lib/gcc/mingw32/4.4.0/include-fixed",
System, true, false, false);
break;
and then tried to compile libobjc2 :
Global is marked as dllimport, but not external
%struct.objc_class* (i8*)** @_objc_lookup_class
Broken module found, compilation aborted!
you should add the following preprocessor directive to your makefile to
indicate
you are exporting symbols:
libobjc_CPPFLAGS += -DDLL_EXPORT ...
Once I made the change, compilation could progress a bit and now I have
the following error :
runtime.c:162:21: error: implicitly declaring C library function 'strdup'
with type 'char *(char const *)' [-pedantic]
ivar->ivar_name = strdup(name);
^
runtime.c:162:21: note: please include the header <string.h> or explicitly
provide a declaration for 'strdup'
Don't know how to fix that since string.h is included and do have a
declaration for strdup :
#ifndef _NO_OLDNAMES
/*
* Non-underscored versions of non-ANSI functions. They live in
liboldnames.a
* and provide a little extra portability. Also a few extra UNIX-isms like
* strcasecmp.
*/
_CRTIMP void* __cdecl __MINGW_NOTHROW memccpy (void*, const void*, int,
size_t);
_CRTIMP int __cdecl __MINGW_NOTHROW memicmp (const void*, const void*,
size_t);
_CRTIMP char* __cdecl __MINGW_NOTHROW strdup (const char*)
__MINGW_ATTRIB_MALLOC;
_CRTIMP int __cdecl __MINGW_NOTHROW strcmpi (const char*, const char*);
_CRTIMP int __cdecl __MINGW_NOTHROW stricmp (const char*, const char*);
int __cdecl __MINGW_NOTHROW strcasecmp (const char*, const char *);
...
#endif
If you really want to be pedantic, why don't you cast result from strdup
into const char*(type
of ivar_name)
ivar->ivar_name = (const char *)strdup(name);
Anyway it doesn't solve clang error.
- libobjc2 on windows, Vincent Richomme, 2010/03/06
- Re: libobjc2 on windows, Vincent Richomme, 2010/03/06
- Re: libobjc2 on windows, David Chisnall, 2010/03/06
- Re: libobjc2 on windows, Vincent Richomme, 2010/03/06
- Re: libobjc2 on windows, David Chisnall, 2010/03/06
- Re: libobjc2 on windows, Vincent Richomme, 2010/03/06
- Re: libobjc2 on windows,
Vincent Richomme <=
- Re: libobjc2 on windows, Vincent Richomme, 2010/03/15
- Re: libobjc2 on windows, Vincent Richomme, 2010/03/15
- Re: libobjc2 on windows, David Chisnall, 2010/03/15
- Re: libobjc2 on windows, Vincent Richomme, 2010/03/15
- Re: libobjc2 on windows, David Chisnall, 2010/03/15
- Re: libobjc2 on windows, Vincent Richomme, 2010/03/15
- Re: libobjc2 on windows, Vincent Richomme, 2010/03/15
- Re: libobjc2 on windows, Vincent Richomme, 2010/03/15
- Re: libobjc2 on windows, Vincent Richomme, 2010/03/15
- Re: libobjc2 on windows, Vincent Richomme, 2010/03/15