View mode: basic / threaded / horizontal-split · Log in · Help
October 15, 2012
Re: D1 & D2 alpha's for Win64
On 10/15/2012 1:27 PM, Michael wrote:
> LINK : fatal error LNK1104: cannot open file 'phobos64.lib'
> --- errorlevel 1104

Fixed.
October 15, 2012
Re: D1 & D2 alpha's for Win64
On Monday, 15 October 2012 at 20:39:14 UTC, Walter Bright wrote:
> On 10/15/2012 1:27 PM, Michael wrote:
>> LINK : fatal error LNK1104: cannot open file 'phobos64.lib'
>> --- errorlevel 1104
>
> Fixed.

dmd -m64 t64.d

--
import std.stdio;

void main()
{
		writeln("Win 64!");
}
--

.\..\lib\shell32.lib : warning LNK4003: invalid library format; 
library ignored
.\..\lib\kernel32.lib : warning LNK4003: invalid library format; 
library ignored
.\..\lib\shell32.lib : warning LNK4003: invalid library format; 
library ignored
.\..\lib\kernel32.lib : warning LNK4003: invalid library format; 
library ignored
LIBCMT.lib(a_map.obj) : error LNK2019: unresolved external symbol 
__imp_WideCharToMultiByte referenced in function "int __cdecl 
__crtLCMapStringA_stat(struct localeinfo_struct *,wchar_t const 
*,unsigned long,char const *,int,char *,int,int,int)" 
(?__crtLCMapStringA_stat@@YAHPEAUlocaleinfo_struct@@PEB_WKPEBDHPEADHHH@Z)
LIBCMT.lib(a_loc.obj) : error LNK2001: unresolved external symbol 
__imp_WideCharToMultiByte
phobos64.lib(dmain2_4a7_1a5.obj) : error LNK2001: unresolved 
external symbol __imp_WideCharToMultiByte
LIBCMT.lib(a_env.obj) : error LNK2001: unresolved external symbol 
__imp_WideCharToMultiByte
LIBCMT.lib(wctomb.obj) : error LNK2001: unresolved external 
symbol __imp_WideCharToMultiByte
LIBCMT.lib(write.obj) : error LNK2001: unresolved external symbol 
__imp_WideCharToMultiByte
phobos64.lib(dmain2_4a7_1a5.obj) : error LNK2019: unresolved 
external symbol IsDebuggerPresent referenced in function main
phobos64.lib(dmain2_4a7_1a5.obj) : error LNK2019: unresolved 
external symbol LocalFree referenced in function main
phobos64.lib(dmain2_4a7_1a5.obj) : error LNK2019: unresolved 
external symbol GetCommandLineW referenced in function main
phobos64.lib(dmain2_4a7_1a5.obj) : error LNK2019: unresolved 
external symbol CommandLineToArgvW referenced in function main
phobos64.lib(thread_1b9_21c.obj) : error LNK2001: unresolved 
external symbol __imp_InitializeCriticalSection
phobos64.lib(mutex_335_213.obj) : error LNK2001: unresolved 
external symbol __imp_InitializeCriticalSection
phobos64.lib(monitor__519_6fd.obj) : error LNK2019: unresolved 
external symbol __imp_InitializeCriticalSection referenced in 
function _d_monitor_create


and ... ... ...
October 15, 2012
Re: D1 & D2 alpha's for Win64
On 10/15/2012 2:21 PM, Michael wrote:> On Monday, 15 October 2012 at 20:39:14 
UTC, Walter Bright wrote:
>> On 10/15/2012 1:27 PM, Michael wrote:
>>> LINK : fatal error LNK1104: cannot open file 'phobos64.lib'
>>> --- errorlevel 1104
>>
>> Fixed.
>
> dmd -m64 t64.d
>
> --
> import std.stdio;
>
> void main()
> {
>          writeln("Win 64!");
> }
> --

You should be linking with the VC libraries, not the 32 bit dmc ones. Try 
disabling the LIB path in sc.ini.

>
> .\..\lib\shell32.lib : warning LNK4003: invalid library format; library ignored
> .\..\lib\kernel32.lib : warning LNK4003: invalid library format; library ignored
> .\..\lib\shell32.lib : warning LNK4003: invalid library format; library ignored
> .\..\lib\kernel32.lib : warning LNK4003: invalid library format; library ignored
> LIBCMT.lib(a_map.obj) : error LNK2019: unresolved external symbol
> __imp_WideCharToMultiByte referenced in function "int __cdecl
> __crtLCMapStringA_stat(struct localeinfo_struct *,wchar_t const *,unsigned
> long,char const *,int,char *,int,int,int)"
> (?__crtLCMapStringA_stat@@YAHPEAUlocaleinfo_struct@@PEB_WKPEBDHPEADHHH@Z)
> LIBCMT.lib(a_loc.obj) : error LNK2001: unresolved external symbol
> __imp_WideCharToMultiByte
> phobos64.lib(dmain2_4a7_1a5.obj) : error LNK2001: unresolved external symbol
> __imp_WideCharToMultiByte
> LIBCMT.lib(a_env.obj) : error LNK2001: unresolved external symbol
> __imp_WideCharToMultiByte
> LIBCMT.lib(wctomb.obj) : error LNK2001: unresolved external symbol
> __imp_WideCharToMultiByte
> LIBCMT.lib(write.obj) : error LNK2001: unresolved external symbol
> __imp_WideCharToMultiByte
> phobos64.lib(dmain2_4a7_1a5.obj) : error LNK2019: unresolved external symbol
> IsDebuggerPresent referenced in function main
> phobos64.lib(dmain2_4a7_1a5.obj) : error LNK2019: unresolved external symbol
> LocalFree referenced in function main
> phobos64.lib(dmain2_4a7_1a5.obj) : error LNK2019: unresolved external symbol
> GetCommandLineW referenced in function main
> phobos64.lib(dmain2_4a7_1a5.obj) : error LNK2019: unresolved external symbol
> CommandLineToArgvW referenced in function main
> phobos64.lib(thread_1b9_21c.obj) : error LNK2001: unresolved external symbol
> __imp_InitializeCriticalSection
> phobos64.lib(mutex_335_213.obj) : error LNK2001: unresolved external symbol
> __imp_InitializeCriticalSection
> phobos64.lib(monitor__519_6fd.obj) : error LNK2019: unresolved external symbol
> __imp_InitializeCriticalSection referenced in function _d_monitor_create
>
>
> and ... ... ...
>
>
October 16, 2012
Re: D1 & D2 alpha's for Win64
On Monday, 15 October 2012 at 21:40:01 UTC, Walter Bright wrote:
> On 10/15/2012 2:21 PM, Michael wrote:> On Monday, 15 October 
> 2012 at 20:39:14 UTC, Walter Bright wrote:
> >> On 10/15/2012 1:27 PM, Michael wrote:
> >>> LINK : fatal error LNK1104: cannot open file 'phobos64.lib'
> >>> --- errorlevel 1104
> >>
> >> Fixed.
> >
> > dmd -m64 t64.d
> >
> > --
> > import std.stdio;
> >
> > void main()
> > {
> >          writeln("Win 64!");
> > }
> > --
>
> You should be linking with the VC libraries, not the 32 bit dmc 
> ones. Try disabling the LIB path in sc.ini.
>
> >
> > .\..\lib\shell32.lib : warning LNK4003: invalid library
> format; library ignored
> > .\..\lib\kernel32.lib : warning LNK4003: invalid library
> format; library ignored
> > .\..\lib\shell32.lib : warning LNK4003: invalid library
> format; library ignored
> > .\..\lib\kernel32.lib : warning LNK4003: invalid library
> format; library ignored
> > LIBCMT.lib(a_map.obj) : error LNK2019: unresolved external
> symbol
> > __imp_WideCharToMultiByte referenced in function "int __cdecl
> > __crtLCMapStringA_stat(struct localeinfo_struct *,wchar_t
> const *,unsigned
> > long,char const *,int,char *,int,int,int)"
> > 
> (?__crtLCMapStringA_stat@@YAHPEAUlocaleinfo_struct@@PEB_WKPEBDHPEADHHH@Z)
> > LIBCMT.lib(a_loc.obj) : error LNK2001: unresolved external
> symbol
> > __imp_WideCharToMultiByte
> > phobos64.lib(dmain2_4a7_1a5.obj) : error LNK2001: unresolved
> external symbol
> > __imp_WideCharToMultiByte
> > LIBCMT.lib(a_env.obj) : error LNK2001: unresolved external
> symbol
> > __imp_WideCharToMultiByte
> > LIBCMT.lib(wctomb.obj) : error LNK2001: unresolved external
> symbol
> > __imp_WideCharToMultiByte
> > LIBCMT.lib(write.obj) : error LNK2001: unresolved external
> symbol
> > __imp_WideCharToMultiByte
> > phobos64.lib(dmain2_4a7_1a5.obj) : error LNK2019: unresolved
> external symbol
> > IsDebuggerPresent referenced in function main
> > phobos64.lib(dmain2_4a7_1a5.obj) : error LNK2019: unresolved
> external symbol
> > LocalFree referenced in function main
> > phobos64.lib(dmain2_4a7_1a5.obj) : error LNK2019: unresolved
> external symbol
> > GetCommandLineW referenced in function main
> > phobos64.lib(dmain2_4a7_1a5.obj) : error LNK2019: unresolved
> external symbol
> > CommandLineToArgvW referenced in function main
> > phobos64.lib(thread_1b9_21c.obj) : error LNK2001: unresolved
> external symbol
> > __imp_InitializeCriticalSection
> > phobos64.lib(mutex_335_213.obj) : error LNK2001: unresolved
> external symbol
> > __imp_InitializeCriticalSection
> > phobos64.lib(monitor__519_6fd.obj) : error LNK2019:
> unresolved external symbol
> > __imp_InitializeCriticalSection referenced in function
> _d_monitor_create
> >
> >
> > and ... ... ...
> >
> >

It worked fine for me at first! This is awesome!
But is it possible to use VC linker for 32-bit architectures?
October 16, 2012
Re: D1 & D2 alpha's for Win64
On 10/16/2012 8:58 AM, Gor Gyolchanyan wrote:
> It worked fine for me at first! This is awesome!

Great!

> But is it possible to use VC linker for 32-bit architectures?

No.
October 16, 2012
Re: D1 & D2 alpha's for Win64
On Tuesday, 16 October 2012 at 16:44:59 UTC, Walter Bright wrote:
> On 10/16/2012 8:58 AM, Gor Gyolchanyan wrote:
>> It worked fine for me at first! This is awesome!
>
> Great!
>

I tried a different lib paths, got same unresolved symbols.

I have VC 10 & VC 11 Express editions. amd64 folder only in VC 
11. Maybe it only work on Pro editions of VS?
October 16, 2012
Re: D1 & D2 alpha's for Win64
On 10/16/2012 11:36 AM, Michael wrote:
> On Tuesday, 16 October 2012 at 16:44:59 UTC, Walter Bright wrote:
>> On 10/16/2012 8:58 AM, Gor Gyolchanyan wrote:
>>> It worked fine for me at first! This is awesome!
>>
>> Great!
>>
>
> I tried a different lib paths, got same unresolved symbols.
>
> I have VC 10 & VC 11 Express editions. amd64 folder only in VC 11. Maybe it only
> work on Pro editions of VS?
>


Do a SET command and remove your LIB definitions. You've got to get it to search 
the VC lib locations first.
October 17, 2012
Re: D1 & D2 alpha's for Win64
On Tuesday, 16 October 2012 at 16:44:59 UTC, Walter Bright wrote:
> On 10/16/2012 8:58 AM, Gor Gyolchanyan wrote:
>> It worked fine for me at first! This is awesome!
>
> Great!
>
>> But is it possible to use VC linker for 32-bit architectures?
>
> No.

Is there a reason why it isn't possible?
If you managed to delegate the linking to 64-bit VC linker, 
effectively producing 64-bit COFF binaries, then what would it 
take to do it for 32-bit too?

This would end the COFF vs OMF problem once and for all...
October 17, 2012
Re: D1 & D2 alpha's for Win64
> Do a SET command and remove your LIB definitions. You've got to 
> get it to search the VC lib locations first.

Finally it works ;) on VC 11 Desktop Express, Win 2008 R2.
October 17, 2012
Re: D1 & D2 alpha's for Win64
On Wednesday, 17 October 2012 at 10:46:37 UTC, Gor Gyolchanyan 
wrote:
> On Tuesday, 16 October 2012 at 16:44:59 UTC, Walter Bright 
> wrote:
>> On 10/16/2012 8:58 AM, Gor Gyolchanyan wrote:
>>> It worked fine for me at first! This is awesome!
>>
>> Great!
>>
>>> But is it possible to use VC linker for 32-bit architectures?
>>
>> No.
>
> Is there a reason why it isn't possible?
> If you managed to delegate the linking to 64-bit VC linker, 
> effectively producing 64-bit COFF binaries, then what would it 
> take to do it for 32-bit too?
>
> This would end the COFF vs OMF problem once and for all...

Although that would be great, it also means everybody who wants 
to use
D2 and have COFF support would also have to get VS. That seems 
like the wrong direction to go in. Be much nicer if D2 can have 
this out of the box.
1 2 3 4
Top | Discussion index | About this forum | D home