digitalmars.D.learn - Linking with .dylibs on OSX?
- Jeremy DeHaan (5/5) Jul 19 2013 I was just curious if DMD supported linking with .dylib files on
- evilrat (5/10) Jul 19 2013 i don't remember exactly, but if this not work for you try
- Jeremy DeHaan (3/16) Jul 19 2013 That worked! Just one too many -L's though. It ended up being
- Jeremy DeHaan (14/31) Jul 19 2013 I have another question.
- evilrat (8/41) Jul 19 2013 with libglfw.dylib it works for me
- Jeremy DeHaan (2/9) Jul 20 2013 That worked perfectly! Thank you very much!
I was just curious if DMD supported linking with .dylib files on OSX. Would one simply do something like this? "dmd main.d somelib.dylib" Thanks!
Jul 19 2013
On Friday, 19 July 2013 at 18:19:20 UTC, Jeremy DeHaan wrote:I was just curious if DMD supported linking with .dylib files on OSX. Would one simply do something like this? "dmd main.d somelib.dylib" Thanks!i don't remember exactly, but if this not work for you try something like this dmd main.d -L-L/path/to/lib.dylib i think there was a topic on this on wiki
Jul 19 2013
On Friday, 19 July 2013 at 18:29:12 UTC, evilrat wrote:On Friday, 19 July 2013 at 18:19:20 UTC, Jeremy DeHaan wrote:That worked! Just one too many -L's though. It ended up being dmd main.d -L/path/to/lib.dylibI was just curious if DMD supported linking with .dylib files on OSX. Would one simply do something like this? "dmd main.d somelib.dylib" Thanks!i don't remember exactly, but if this not work for you try something like this dmd main.d -L-L/path/to/lib.dylib i think there was a topic on this on wiki
Jul 19 2013
On Friday, 19 July 2013 at 19:52:49 UTC, Jeremy DeHaan wrote:On Friday, 19 July 2013 at 18:29:12 UTC, evilrat wrote:I have another question. Is there a way to specify a search directory and then link to each dylib? I have someone that I'm trying to help by the way, and I don't have a Mac :P I was pretty sure that -L-L/path/ seemed to be the way to add the search directory, but if I have a dylib named libsomelib.dylib, would I pass -Lsomelib, -Llibsomelib.dylib, -Lsomelib.dylib, or something else? Thanks for you help. P.S. Only a guide for compiling and linking on Windows is in the wiki. That should definitely be changed.On Friday, 19 July 2013 at 18:19:20 UTC, Jeremy DeHaan wrote:That worked! Just one too many -L's though. It ended up being dmd main.d -L/path/to/lib.dylibI was just curious if DMD supported linking with .dylib files on OSX. Would one simply do something like this? "dmd main.d somelib.dylib" Thanks!i don't remember exactly, but if this not work for you try something like this dmd main.d -L-L/path/to/lib.dylib i think there was a topic on this on wiki
Jul 19 2013
On Friday, 19 July 2013 at 22:30:42 UTC, Jeremy DeHaan wrote:On Friday, 19 July 2013 at 19:52:49 UTC, Jeremy DeHaan wrote:with libglfw.dylib it works for me evilrat$ dmd test.d -L-L/Users/evilrat/Documents/prog/glfwbuild/osx/_install/lib -L-lglfw note that first -L is dmd flag to pass linker options, but if you linking just single lib you can simply add it as source file like this "dmd test.d testlib.a"On Friday, 19 July 2013 at 18:29:12 UTC, evilrat wrote:I have another question. Is there a way to specify a search directory and then link to each dylib? I have someone that I'm trying to help by the way, and I don't have a Mac :P I was pretty sure that -L-L/path/ seemed to be the way to add the search directory, but if I have a dylib named libsomelib.dylib, would I pass -Lsomelib, -Llibsomelib.dylib, -Lsomelib.dylib, or something else? Thanks for you help. P.S. Only a guide for compiling and linking on Windows is in the wiki. That should definitely be changed.On Friday, 19 July 2013 at 18:19:20 UTC, Jeremy DeHaan wrote:That worked! Just one too many -L's though. It ended up being dmd main.d -L/path/to/lib.dylibI was just curious if DMD supported linking with .dylib files on OSX. Would one simply do something like this? "dmd main.d somelib.dylib" Thanks!i don't remember exactly, but if this not work for you try something like this dmd main.d -L-L/path/to/lib.dylib i think there was a topic on this on wiki
Jul 19 2013
On Saturday, 20 July 2013 at 04:26:45 UTC, evilrat wrote:with libglfw.dylib it works for me evilrat$ dmd test.d -L-L/Users/evilrat/Documents/prog/glfwbuild/osx/_install/lib -L-lglfw note that first -L is dmd flag to pass linker options, but if you linking just single lib you can simply add it as source file like this "dmd test.d testlib.a"That worked perfectly! Thank you very much!
Jul 20 2013