On Monday, 25 November 2013 at 17:44:43 UTC, Jeremy DeHaan wrote:
On Monday, 25 November 2013 at 13:49:58 UTC, Frustrated wrote:
I had an old dmd2 setup that worked perfectly. I recently
installed VS2013, SDK 8, DMD 2.064.2, and VS 3.37 on a fresh
system.
I copied the project to the HD, updated the sc.ini files and
tried to compile. Basic projects would compile but my old
projects would give errors either:
user32.lib not found when trying to use optilink. I spend
about 2 hours trying various ways to get it to find the
user32.lib file. It will only look in the project dir. I setup
`LIB=` in environment in sc.ini with no luck.
In x64 mode, the linker gives an error that dmd.obj could not
be found. There is no such thing as dmd.obj and I have no idea
why it is finding this. It could be an issue with visual.d but
I see no where that it says anything about dmd.obj.
I can't get my old projects to compile. Not that it matters,
but here is my sc.ini file.
The project seems to compile file but simply won't link
because of the above 2 issues.
[Version]
version=7.51 Build 020
; environment for both 32/64 bit
[Environment]
WindowsSdkDir=C:\Program Files (x86)\Windows
Kits\8.1\Lib\win8\um
VCINSTALLDIR=D:\Apps\Technical\VS2013\VC\
DFLAGS=-L/nologo "-I%@P%\..\..\src\phobos"
"-I%@P%\..\..\src\druntime\import" "-ID:\DLang\Lib"
LIB="%@P%\..\lib"
[Environment32]
LIB="%WindowsSdkDir%\x86"
; LIB="%@P%\..\lib"
PATH=%PATH%;%VCINSTALLDIR%\bin\x86;%VCINSTALLDIR%\..\Common7\IDE;"%WindowsSdkDir%\x86";
LINKCMD=%@P%\link.exe
[Environment64]
DFLAGS=%DFLAGS% -L/OPT:NOICF
LIB="%WindowsSdkDir%\x64";"%@P%\..\lib64"
PATH=%PATH%;%VCINSTALLDIR%\bin\amd64;%VCINSTALLDIR%\..\Common7\IDE;"%WindowsSdkDir%\x64";
LINKCMD=%VCINSTALLDIR%\bin\amd64\link.exe
I have yet to use DMD64 on Windows, but I can tell you that
user32.lib should be in the DMC lib directory. In my
Environment settings, the LIB line looks like this:
LIB="%@P%\..\lib";\dm\lib
Maybe try that and see if it works?
Nope. In any case that was one of the original ways and it didn't
work, even when I put it as the hard path. Optilink doesn't even
look for the lib in dm\lib. I've used process monitor to see what
it's doing and it only looks for the lib in the project dir
regardless of where I tell it to in sc.ini.