Well I finally somehow got it to stop complaining about a bad lib file, but now it wants to tell me the entry point for the functions i list isnt correct, so now im just unsure if its being stupid on me or im not writing something write on the D or C++ end...

The D code:
_______________________________________________________________
import std.stdio;

export:

void ConsoleWrite()
{
        writeln("This is a test written in DLang/DMD!");
}

void ConsoleWait()
{
        readln();
}
_______________________________________________________________

i imported the stuff on CPP and tried to call it.. this is the hpp file:

myclass.hpp:
_______________________________________________________________
#pragma once

#ifdef _MYDLL_EXPORTS
        #define DllAPI __declspec(dllexport)
#else
        #define DllAPI __declspec(dllimport)
#endif

DllAPI void ConsoleWrite();
DllAPI void ConsoleWait();
_______________________________________________________________

The errors:

_______________________________________________________________
2 error LNK1120: 1 unresolved externals
1 error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl ConsoleWrite (void)" (__imp_?ConsoleWrite@myclass@@SAXXZ) referenced in function _wmain
_______________________________________________________________

Reply via email to