How can I execute C++ functions from Dlang?

thePengüin arcanet192 at gmail.com
Sat Aug 19 19:31:39 UTC 2023


On Monday, 14 August 2023 at 07:38:46 UTC, Sergey wrote:
> On Monday, 14 August 2023 at 06:40:04 UTC, thePengüin wrote:
>> hola a todos quisiera ejecutar este codigo de c++
>> Error: linker exited with status 1
>
> Hola.
> On the page https://dlang.org/spec/cpp_interface.html
> commands to run also have different flags. Did you try them?
>> g++ -c foo.cpp
>> dmd bar.d foo.o -L-lstdc++ && ./bar

estoy en windows y me sale este error:
Error: unrecognized file extension o
el g++ -c me da de resultado un archivo con .o y el dmd solo me 
permite con .obj pero ni aun asi me funciona


More information about the Digitalmars-d-learn mailing list