Hi all,
I want to call the Bitmap function from gdi+. This is the syntax
of the function in C++.
```c++
void Bitmap(
[in] const WCHAR *filename,
[in] BOOL useEmbeddedColorManagement
);
```
And this is the mangled name which I got from goldbolt compiler.
`?Bitmap@@YAXPEB_WH@Z `
Now, this is my declaration in D.
```d
extern (C++, "Bitmap") void * Bitmap(const(wchar)* file, BOOL
useClr);
```
And this is my call site.
```d
auto imgPath = toUTF16z(r"C:\Users\AcerLap\Pictures\Saved
Pictures\d3.png") ;
auto pBmp = Bitmap(imgPath, FALSE);
```
But I got this error message.
```
app.obj : error LNK2019: unresolved external symbol "void *
__cdecl Bitmap::Bitmap(char16_t const *,int)"
(?Bitmap@0@YAPAXPB_SH@Z) referenced in function
__D4wing9imagelist9ImageList8addImageMFAyaZv
app.exe : fatal error LNK1120: 1 unresolved externals
Error: linker exited with status 1120
```
You see, the mangled names are different.
From D - `?Bitmap@0@YAPAXPB_SH@Z`
From C++ - `?Bitmap@@YAXPEB_WH@Z`
How to fix this ?