Building Objc4 on Windows
Building Objc4 on Windows
- Subject: Building Objc4 on Windows
- From: Brent Fulgham <email@hidden>
- Date: Mon, 14 Sep 2009 13:20:47 -0700
I attempted to build the Objc4 v437 sources
(http://opensource.apple.com/source/objc4/objc4-437/) using the
included Visual Studio solution. Once I updated my environment to
account for DSTROOT/SRCROOT and so forth, everything worked amazingly
well. However, I get the following link error:
1>objc-typeencoding.m
1>Generating Code...
1>Compiling manifest to resources...
1>Microsoft (R) Windows (R) Resource Compiler Version 6.1.6723.1
1>Copyright (C) Microsoft Corporation. All rights reserved.
1>Linking...
1> Creating library E:\Fulgham\objc4-437\Debug\objc_debug.lib and
object E:\Fulgham\objc4-437\Debug\objc_debug.exp
1>objc-runtime-old.obj : error LNK2019: unresolved external symbol
_unmap_image_nolock referenced in function _unmap_image
1>objc-runtime-old.obj : error LNK2019: unresolved external symbol
_map_images_nolock referenced in function _map_images
1>objc-runtime-old.obj : error LNK2019: unresolved external symbol
_load_images_nolock referenced in function _load_images
1>E:\Fulgham\objc4-437\Debug\objc_debug.dll : fatal error LNK1120: 3
unresolved externals
1>Project : warning PRJ0018 : The following environment variables were
not found:
1>$(SRCROOT)
1>Build log was saved at "file://e:\Fulgham\objc4-437\Debug\BuildLog.htm"
1>objc - 4 error(s), 5 warning(s)
Indeed, the three missing symbols (_unmap_image_nolock,
_map_image_nolock, and _load_images_nolock) are only defined for the
OS X build of this library, so I understand why the error is
occurring. Since they relate to DYLD load/map/unmap they are probably
not needed for the Windows build at all.
These symbols are used in both the objc-runtime-new.m and
objc-runtime-old.m implementations:
1. map_images
2. unmap_images
3. load_images
I ended up bracketing these three functions inside a "#if
!TARGET_OS_WIN32/#endif", and everything then built fine.
Since these functions appear to be unused on the Windows build, I
assume this change is correct, however I wanted to see if this was the
correct course of action, or if perhaps a Windows-specific build file
might be missing in the distribution?
Thanks,
-Brent
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden