On Tuesday, 13 October 2015 at 19:14:51 UTC, ZombineDev wrote:
On Wednesday, 7 October 2015 at 22:33:09 UTC, Martin Nowak wrote:
First beta for the 2.069.0 release.

http://dlang.org/download.html#dmd_beta http://dlang.org/changelog/2.069.0.html

Please report any bugs at https://issues.dlang.org

-Martin

I decided to try the newly included mscoff 32 Phobos. For this purpouse I create a D struct, whose members I call in C++. This works in Linux, so any issues should be windows specific.

My directory has the following files:
test_struct.d
main.cpp

I did the following:
1) Installed DMD v2.069.0-b1 with the installer
2) Started VS2015 x86 Native Tools Command Prompt
3) Executed the following commands:
dmd -c -m32mscoff test_struct.d
cl main.cpp test_struct.obj C:\D\dmd2\windows\lib32mscoff\phobos32mscoff.lib

And got the following error:
main.cpp
phobos32mscoff.lib(sections_win64_6de_5a5.obj) : error LNK2019: unresolved exter nal symbol __minfo_beg referenced in function _D2rt14sections_win6414getModuleIn
fosFZAyPS6object10ModuleInfo
phobos32mscoff.lib(sections_win64_6de_5a5.obj) : error LNK2019: unresolved exter nal symbol __minfo_end referenced in function _D2rt14sections_win6414getModuleIn
fosFZAyPS6object10ModuleInfo
phobos32mscoff.lib(config_48f_452.obj) : error LNK2019: unresolved external symb ol _snprintf referenced in function _D2gc6config13__T5parseHTfZ5parseFNbNiAxaKAx
aKfZb
phobos32mscoff.lib(config_48f_452.obj) : error LNK2019: unresolved external symb ol _sscanf referenced in function _D2gc6config13__T5parseHTfZ5parseFNbNiAxaKAxaK
fZb
hw0_cpp.exe : fatal error LNK1120: 4 unresolved externals

Edit - read this as:
main.exe : fatal error LNK1120: 4 unresolved externals

I have declared the druntime hooks like this:
extern "C" int rt_init();
extern "C" void rt_term();

P.S. I decided to try something simpler:
A single .cpp file that calls rt_init() and rt_term() and nothing else. I tried the following:
cl main.cpp C:\D\dmd2\windows\lib32mscoff\phobos32mscoff.lib
And I got the same error message.

Any idea what's going wrong?


Reply via email to