Skip to content
This repository has been archived by the owner on Mar 1, 2022. It is now read-only.

Compilation error: unresolved external symbol #42

Closed
bubnenkoff opened this issue Sep 5, 2016 · 17 comments
Closed

Compilation error: unresolved external symbol #42

bubnenkoff opened this issue Sep 5, 2016 · 17 comments
Labels

Comments

@bubnenkoff
Copy link

bubnenkoff commented Sep 5, 2016

Using Visual Studio: C:\Program Files (x86)\Microsoft Visual Studio 14.0\
dub.internal.vibecompat.core.log.obj : error LNK2019: unresolved external symbol
 _D3std9exception108__T12errnoEnforceTbVAyaa37_433a2f442f6c64632f62696e2f2e2e2f6
96e636c7564652f645c7374645c737464696f2e64Vmi850Z12errnoEnforceFNfbLAyaZb referen
ced in function _D3dub8internal10vibecompat4core3log12__T3logTAyaZ3logFNbE3dub8i
nternal10vibecompat4core3log8LogLevelAyaLAyaZv
dub.internal.vibecompat.core.file.obj : error LNK2019: unresolved external symbol _D3std9exception109__T12errnoEnforceTbVAyaa37_433a2f442f6c64632f62696e2f2e2e2f
696e636c7564652f645c7374645c737464696f2e64Vmi1041Z12errnoEnforceFNfbLAyaZb refer
enced in function _D3dub8internal10vibecompat4core4file9RangeFile7readAllMFZAh
.dub\build\application-release-windows-x86_64-ldc_0-6DA9C788DA4BC2A3768E34296AF8
856B\workspace-d.exe : fatal error LNK1120: 2 unresolved externals
Error: `C:\Windows\system32\cmd.exe /s /c "C:\D\ldc\bin\amd64.bat link.exe"` fai
led with status: 1120
ldc2 failed with exit code 1120.
Error while compiling workspace-d.
Program exited with code 1

LDC 1.1.0 beta 2

Error: module fallback_allocator is in file '..\..\..\..\..\..\bubenkov_di\AppDa
ta\Roaming\dub\packages\experimental_allocator-2.70.0-b1\experimental_allocator\
src\std\experimental\allocator\building_blocks\fallback_allocator.d' which canno
t be read
import path[0] = ..\..\..\..\..\..\bubenkov_di\AppData\Roaming\dub\packages\expe
rimental_allocator-2.70.0-b1\experimental_allocator\src
import path[1] = C:\D\dmd2\windows\bin\..\..\src\phobos
import path[2] = C:\D\dmd2\windows\bin\..\..\src\druntime\import
dmd failed with exit code 1.
Error while compiling DCD.
Program exited with code 1

LDC 1.0.0 x32

@WebFreak001
Copy link
Member

Compiling manually or with the installer? Also can you check if the path where it tries to install/compile workspace-d is shorter than ~200 characters to ensure it isnt a problem with the length of the file path

@WebFreak001 WebFreak001 added the bug label Sep 6, 2016
@WebFreak001 WebFreak001 changed the title Compilation errro: unresolved external symbol Compilation error: unresolved external symbol Sep 6, 2016
@Rock48
Copy link

Rock48 commented Oct 5, 2016

I've got the same error

Using Visual Studio: C:\Program Files (x86)\Microsoft Visual Studio 14.0\
dub.internal.vibecompat.core.log.obj : error LNK2019: unresolved external symbol _D3std9exception106__T12errnoEnforceTbVAyaa36_433a2f6c6463322f62696e2f2e2e2f696e636c7564652f645c7374645c737464696f2e64Vmi850Z12errnoEnforceFNfbLAyaZb referenced in function _D3dub8internal10vibecompat4core3log12__T3logTAyaZ3logFNbE3dub8internal10vibecompat4core3log8LogLevelAyaLAyaZv
dub.internal.vibecompat.core.file.obj : error LNK2019: unresolved external symbol _D3std9exception107__T12errnoEnforceTbVAyaa36_433a2f6c6463322f62696e2f2e2e2f696e636c7564652f645c7374645c737464696f2e64Vmi1041Z12errnoEnforceFNfbLAyaZb referenced in function _D3dub8internal10vibecompat4core4file9RangeFile7readAllMFZAh
.dub\build\application-release-windows-x86-ldc_0-5DBFD940DC7CF345E2146464AF1E319E\workspace-d.exe : fatal error LNK1120: 2 unresolved externals
Error: `C:\WINDOWS\system32\cmd.exe /s /c "C:\ldc2\bin\amd64.bat link.exe"` failed with status: 1120
ldc2 failed with exit code 1120.
Error while compiling workspace-d.
Program exited with code 1

@WebFreak001
Copy link
Member

@Rock48 can you check my 29 days old comment so I can know where the issue is?

@Rock48
Copy link

Rock48 commented Oct 5, 2016

Where would I find out where it's trying to install? It doesn't log it

@WebFreak001
Copy link
Member

um can you post the full log?

@Rock48
Copy link

Rock48 commented Oct 5, 2016

C:\Users\Charlie Quigley\Desktop\workspace-d>install

C:\Users\Charlie Quigley\Desktop\workspace-d>dub run :installer -- .
Building package workspace-d:installer in C:\Users\Charlie Quigley\Desktop\workspace-d\installer\
Performing "debug" build using dmd for x86.
workspace-d:installer 2.7.2+commit.2.g3dc0bef: target for configuration "application" is up to date.
To force a rebuild of up-to-date targets, run again with --force.
Running .\installer\iworkspaced.exe .
Welcome to the workspace-d installation guide.
Make sure, you have dub and git installed.

LDC is required on your platform!

Which optional dependencies do you want to install?
[1] DCD - auto completion
[2] DScanner - code linting
[3] dfmt - code formatting
Enter a comma separated list of numbers
Selected [all]:
Using existing git repository for workspace-d
Compiling...
$ dub upgrade
Upgrading project in C:\Users\Charlie Quigley\Desktop\workspace-d
$ dub build --compiler=ldc2 --combined --build=release
Performing "release" build using ldc2 for x86.
workspace-d 2.7.2+commit.2.g3dc0bef: building configuration "application"...
..\..\AppData\Roaming\dub\packages\dub-1.1.0-beta.1\source\dub\internal\sdlang\lexer.d(16): Deprecation: module std.stream is deprecated - It will be removed from Phobos in October 2016. If you still need it, go to https://github.com/DigitalMars/undeaD
source\app.d(145): Deprecation: workspaced.com.dub.object is not visible from module app
source\app.d(145): Deprecation: workspaced.com.dub.core is not visible from module app
source\app.d(145): Deprecation: workspaced.com.dub.std is not visible from module app
source\app.d(145): Deprecation: workspaced.com.dub.workspaced is not visible from module app
source\app.d(145): Deprecation: workspaced.com.dub.dub is not visible from module app
source\app.d(145): Deprecation: workspaced.com.dub.BuildIssue is not visible from module app
source\app.d(145): Deprecation: workspaced.com.dub.DubPackageInfo is not visible from module app
source\app.d(145): Deprecation: workspaced.com.dcd.object is not visible from module app
source\app.d(145): Deprecation: workspaced.com.dcd.std is not visible from module app
source\app.d(145): Deprecation: workspaced.com.dcd.core is not visible from module app
source\app.d(145): Deprecation: workspaced.com.dcd.painlessjson is not visible from module app
source\app.d(145): Deprecation: workspaced.com.dcd.workspaced is not visible from module app
source\app.d(145): Deprecation: workspaced.com.dcd.DCDServerStatus is not visible from module app
source\app.d(145): Deprecation: workspaced.com.dcd.DCDIdentifier is not visible from module app
source\app.d(145): Deprecation: workspaced.com.dcd.DCDSearchResult is not visible from module app
source\app.d(145): Deprecation: workspaced.com.dfmt.object is not visible from module app
source\app.d(145): Deprecation: workspaced.com.dfmt.std is not visible from module app
source\app.d(145): Deprecation: workspaced.com.dfmt.core is not visible from module app
source\app.d(145): Deprecation: workspaced.com.dfmt.painlessjson is not visible from module app
source\app.d(145): Deprecation: workspaced.com.dfmt.workspaced is not visible from module app
source\app.d(145): Deprecation: workspaced.com.dscanner.object is not visible from module app
source\app.d(145): Deprecation: workspaced.com.dscanner.std is not visible from module app
source\app.d(145): Deprecation: workspaced.com.dscanner.core is not visible from module app
source\app.d(145): Deprecation: workspaced.com.dscanner.painlessjson is not visible from module app
source\app.d(145): Deprecation: workspaced.com.dscanner.workspaced is not visible from module app
source\app.d(145): Deprecation: workspaced.com.dscanner.DScannerIssue is not visible from module app
source\app.d(145): Deprecation: workspaced.com.dscanner.OutlineTreeNode is not visible from module app
source\app.d(145): Deprecation: workspaced.com.dscanner.DefinitionElement is not visible from module app
source\app.d(145): Deprecation: workspaced.com.dlangui.object is not visible from module app
source\app.d(145): Deprecation: workspaced.com.dlangui.std is not visible from module app
source\app.d(145): Deprecation: workspaced.com.dlangui.core is not visible from module app
source\app.d(145): Deprecation: workspaced.com.dlangui.painlessjson is not visible from module app
source\app.d(145): Deprecation: workspaced.com.dlangui.workspaced is not visible from module app
source\app.d(145): Deprecation: workspaced.com.dlangui.LocationType is not visible from module app
source\app.d(145): Deprecation: workspaced.com.dlangui.LocationInfo is not visible from module app
source\app.d(145): Deprecation: workspaced.com.fsworkspace.object is not visible from module app
source\app.d(145): Deprecation: workspaced.com.fsworkspace.std is not visible from module app
source\app.d(145): Deprecation: workspaced.com.fsworkspace.workspaced is not visible from module app
..\..\AppData\Roaming\dub\packages\dub-1.1.0-beta.1\source\dub\compilers\utils.d(92): Deprecation: dub.compilers.buildsettings.array is not visible from module utils
Using Visual Studio: C:\Program Files (x86)\Microsoft Visual Studio 14.0\
dub.internal.vibecompat.core.log.obj : error LNK2019: unresolved external symbol _D3std9exception106__T12errnoEnforceTbVAyaa36_433a2f6c6463322f62696e2f2e2e2f696e636c7564652f645c7374645c737464696f2e64Vmi850Z12errnoEnforceFNfbLAyaZb referenced in function _D3dub8internal10vibecompat4core3log12__T3logTAyaZ3logFNbE3dub8internal10vibecompat4core3log8LogLevelAyaLAyaZv
dub.internal.vibecompat.core.file.obj : error LNK2019: unresolved external symbol _D3std9exception107__T12errnoEnforceTbVAyaa36_433a2f6c6463322f62696e2f2e2e2f696e636c7564652f645c7374645c737464696f2e64Vmi1041Z12errnoEnforceFNfbLAyaZb referenced in function _D3dub8internal10vibecompat4core4file9RangeFile7readAllMFZAh
.dub\build\application-release-windows-x86-ldc_0-5DBFD940DC7CF345E2146464AF1E319E\workspace-d.exe : fatal error LNK1120: 2 unresolved externals
Error: `C:\WINDOWS\system32\cmd.exe /s /c "C:\ldc2\bin\amd64.bat link.exe"` failed with status: 1120
ldc2 failed with exit code 1120.
Error while compiling workspace-d.
Program exited with code 1

That's what I got

@WebFreak001
Copy link
Member

oh ok. I'm gonna add logging of the installation path to the installer and also check if the path is too long

@Rock48
Copy link

Rock48 commented Oct 5, 2016

Alright, let me know when to pull the new version.

@WebFreak001
Copy link
Member

oh actually because its workspace-d, it will use the folder where you pulled it from, so its not an issue with the path. This is actually not the same issue as the one from the post and you might wanna create a separate issue for that

@WebFreak001
Copy link
Member

WebFreak001 commented Oct 5, 2016

as for fixing it, try changing the dub version to ~>1.1.0-beta.1 in the dub.json file and then run the installer again

@Rock48
Copy link

Rock48 commented Oct 5, 2016

It's already set to ~>1.1.0-beta.1

Are you sure it's not the same error? It looks the same.

@WebFreak001
Copy link
Member

hm actually I think those are two separate errors in his post. The first one seems to be the same as yours and the second one seems to be an issue with dcd, dscanner or dfmt because afaik dub or any of its dependencies dont use the experimental allocators but I know that dcd/dscanner/dfmt do. Im gonna check on dub again and see if I can fix it somehow

@WebFreak001
Copy link
Member

vibe.d uses their own allocator implementation and its an optional dependency for dub. Just to be sure, can you delete all versions of vibe.d version >=0.7.29 from your dub packages folder? (appdata/roaming/dub/packages on windows IIRC, might also be in appdata/local)

@Rock48
Copy link

Rock48 commented Oct 5, 2016

One second

@Rock48
Copy link

Rock48 commented Oct 5, 2016

I don't have any versions of vibe.d at all, rip

@Rock48
Copy link

Rock48 commented Oct 5, 2016

I'll be back in a few minutes

back

@WebFreak001
Copy link
Member

top issue is moved into #46, bottom issue was external and should be fixed

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants