Re: DMD Mac and linking with frameworks

2009-03-15 Thread Anders F Björklund
Jacob Carlborg wrote: (it would however be nice if DMD for Mac OS X could be taught to accept the most straightforward syntax for it, i.e. "dmd -framework Carbon") I asked that ldc should add this but they said something about a linker flag shouldn't be available as a compiler flag. I guess

Re: DMD Mac and linking with frameworks

2009-03-14 Thread Jacob Carlborg
Anders F Björklund wrote: Jacob Carlborg wrote: Seems it needs the -L flag on each: dmd -L-framework -LCarbon main.d Because -Xlinker is being used, "-Wl,-framework,Carbon" doesn't work. It worked. Thanks. It's a little annoying that all three compilers have to use different commands for thi

Re: DMD Mac and linking with frameworks

2009-03-13 Thread Anders F Björklund
Jacob Carlborg wrote: Seems it needs the -L flag on each: dmd -L-framework -LCarbon main.d Because -Xlinker is being used, "-Wl,-framework,Carbon" doesn't work. It worked. Thanks. It's a little annoying that all three compilers have to use different commands for this. Yeah, it's somewhat an

Re: DMD Mac and linking with frameworks

2009-03-12 Thread Jacob Carlborg
Anders F Björklund wrote: Jacob Carlborg wrote: The problem is if compile like this for example: "dmd -L-framework Carbon main.d" dmd complains that it can't find Carbon.d. It seems that it takes everything as a D source file if it doesn't recognize it as a compiler switch. Seems it needs t

Re: DMD Mac and linking with frameworks

2009-03-09 Thread Jarrett Billingsley
On Mon, Mar 9, 2009 at 4:36 PM, Jacob Carlborg wrote: > If I understand things correct dmd uses gcc to do the linking on linux and > osx, therefore I should be able to link against frameworks on osx. > > GDC/GCC uses the compiler flag "-framework Carbon" and the passes the same > flag to the linke

Re: DMD Mac and linking with frameworks

2009-03-09 Thread Anders F Björklund
Jacob Carlborg wrote: The problem is if compile like this for example: "dmd -L-framework Carbon main.d" dmd complains that it can't find Carbon.d. It seems that it takes everything as a D source file if it doesn't recognize it as a compiler switch. Seems it needs the -L flag on each: dmd -L-

Re: DMD Mac and linking with frameworks

2009-03-09 Thread Walter Bright
You can use the -v switch to dmd which will show the linker command line it tries.

DMD Mac and linking with frameworks

2009-03-09 Thread Jacob Carlborg
If I understand things correct dmd uses gcc to do the linking on linux and osx, therefore I should be able to link against frameworks on osx. GDC/GCC uses the compiler flag "-framework Carbon" and the passes the same flag to the linker. LDC/LLVM uses the linker flag "-framework=Carbon" which I