<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Sep 10, 2009, at 10:29 AM, Jason Foreman wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>On Sep 10, 2009, at 5:09 AM, Georg Seifert wrote:<br><blockquote type="cite"><font class="Apple-style-span" color="#144FAE"><br></font></blockquote><blockquote type="cite">How do I specify the version to link with.<br></blockquote><blockquote type="cite">The 10.5 SDK links against python 2.5 and the 10.6 SDK to 2.6. But what if I need the 10.6 SKD but want to link to python 2.5?<br></blockquote><br>I'll try to look for ways to specify a specific framework version to link against and let you know if I find anything.</div></blockquote><br></div><div>I did find a way to use the 10.6 SDK but still link with Python 2.5. &nbsp;However I'd classify this as a 'dirty hack' so I'm not sure I could recommend it.</div><div><br></div><div>When the linker is linking to a framework, it expects to find (a link to) the framework binary at Foo.framework/Foo (e.g. Python.framework/Python). &nbsp;In the real framework, this is just a symlink to Python.framework/Versions/Current/Python, which is of course the 2.6 version of Python.</div><div><br></div><div>We can exploit the fact that same-named frameworks that exist in a user-specified framework search path will be used before the ones in system search paths. &nbsp;What you do is create a Python.framework directory in your project (or some subdirectory of it) and link Python.framework/Python to /System/Library/Frameworks/Python.framework/Version/2.5/Python. &nbsp;Then you *should* be able to add this "framework" to your project, or do as I did and add "-framework Python" to the "Other linker flags" build setting.</div><div><br></div><div>I tried this on a little sample project and verified with otool that the binary was linked against Python 2.5.</div><div><br></div><div>Again, I'm not sure you want to do this, but if you can't find any other way to solve your issues this may work for you.</div><div><br></div><div><br></div><div>Jason</div><div><br></div><div><br></div></body></html>