Simple I know, but could use some help compiling with make
Roderick Gibson
kniteli at gmail.com
Thu Sep 29 14:29:44 PDT 2011
On 9/29/2011 2:19 PM, Steven Schveighoffer wrote:
> On Thu, 29 Sep 2011 16:30:54 -0400, Roderick Gibson <kniteli at gmail.com>
> wrote:
>
>> On 9/29/2011 1:02 PM, Steven Schveighoffer wrote:
>>> On Thu, 29 Sep 2011 15:28:56 -0400, Roderick Gibson <kniteli at gmail.com>
>>> wrote:
>>>
>>>> On 9/29/2011 11:52 AM, Andrej Mitrovic wrote:
>>>>> On 9/29/11, Steven Schveighoffer<schveiguy at yahoo.com> wrote:
>>>>>> On Thu, 29 Sep 2011 14:32:28 -0400, Andrej Mitrovic
>>>>>> <andrej.mitrovich at gmail.com> wrote:
>>>>>>
>>>>>>> No it's not the same for Windows. On Windows you have to use -L+,
>>>>>>> e.g.:
>>>>>>>
>>>>>>> dmd myfile.d -L+path/to/libs mylib.lib
>>>>>>
>>>>>> That's because +path/to/libs is the search-path parameter for
>>>>>> OPTLINK. -L
>>>>>> goes before all linker parameters. The same is for Linux.
>>>>>>
>>>>>> See here: http://www.digitalmars.com/d/2.0/dmd-windows.html
>>>>>>
>>>>>> -Steve
>>>>>>
>>>>>
>>>>> Right, I misinterpreted the "same for Windows" part, you were
>>>>> referring to -L and you're right.
>>>>>
>>>>> DMD could do some magic and replace -L-L with -L+ on Windows to
>>>>> simplify cross-platform development. I know it sends everything after
>>>>> -L to the linker, but it could make one special case for this.
>>>>
>>>>
>>>> Thanks so much guys, it worked, although it looks like a mutated
>>>> wildebeest. For the interested:
>>>>
>>>> IMPORT = -IC:\Dlang\dmd2\src\ext\Derelict2\import
>>>> LIB_PATHS = -L+C:\Dlang\dmd2\src\ext\Derelict2\lib\\
>>>>
>>>> LIB_INCLUDES = DerelictSDL.lib DerelictGL.lib DerelictUtil.lib
>>>> DerelictGLU.lib
>>>>
>>>> all:
>>>> dmd src/main.d src/display.d src/renderdata.d src/vector2d.d $(IMPORT)
>>>> $(LIB_PATHS) $(LIB_INCLUDES)
>>>>
>>>> Yes, that is TWO backslashes and the empty line between paths and
>>>> includes is required. Could probably fix it but couldn't figure out
>>>> how to escape the backslash (to prevent it from escaping the newline).
>>>
>>> Can you just leave off the last backslash? Again, not too familiar with
>>> OPTLINK, so not sure.
>>>
>>> -Steve
>>
>> Nope, because then the first backslash would be escaping the newline
>> and the linker looks for Derelict2\lib.lib instead of Derelict2\lib\.
>
> I mean, leave off the, um... first last backslash too :)
>
> LIB_PATHS = -L+C:\Dlang\dmd2\src\ext\Derelict2\lib
>
> -Steve
In that case it starts looking for Derelict2\lib.lib instead of
Derelict2\lib\
More information about the Digitalmars-d-learn
mailing list