Re: Reference to an unresolved external symbol

2022-09-07 Thread Injeckt via Digitalmars-d-learn

On Wednesday, 7 September 2022 at 10:50:17 UTC, Dennis wrote:

On Wednesday, 7 September 2022 at 10:14:22 UTC, Injeckt wrote:
I guess you right. But I don't know how i gonna link libs when 
I'm using "dmd main.d".


Another way is to add this to your code:

```D
pragma(lib, "User32");
```


Oh thank you. I didn't knew that, I thought that it only works in 
visual studio.
Comrades, I need to use inet_ntop() from Ws2tcpip.h, but how I 
gonna include this header file to my code file?


Re: Reference to an unresolved external symbol

2022-09-07 Thread Dennis via Digitalmars-d-learn

On Wednesday, 7 September 2022 at 10:14:22 UTC, Injeckt wrote:
I guess you right. But I don't know how i gonna link libs when 
I'm using "dmd main.d".


Another way is to add this to your code:

```D
pragma(lib, "User32");
```




Re: Reference to an unresolved external symbol

2022-09-07 Thread Injeckt via Digitalmars-d-learn
On Wednesday, 7 September 2022 at 10:31:02 UTC, rikki cattermole 
wrote:


On 07/09/2022 10:14 PM, Injeckt wrote:
On Wednesday, 7 September 2022 at 10:01:11 UTC, rikki 
cattermole wrote:


You have probably forgotten to link against user32.


I guess you right. But I don't know how i gonna link libs when 
I'm using "dmd main.d". Tell me please.


I think it is as simple as adding user32.lib to dmd (directly).


LOL! WTF?!? It works! Thanks Sensei.


Re: Reference to an unresolved external symbol

2022-09-07 Thread rikki cattermole via Digitalmars-d-learn



On 07/09/2022 10:14 PM, Injeckt wrote:

On Wednesday, 7 September 2022 at 10:01:11 UTC, rikki cattermole wrote:


You have probably forgotten to link against user32.


I guess you right. But I don't know how i gonna link libs when I'm using 
"dmd main.d". Tell me please.


I think it is as simple as adding user32.lib to dmd (directly).


Re: Reference to an unresolved external symbol

2022-09-07 Thread Injeckt via Digitalmars-d-learn
On Wednesday, 7 September 2022 at 10:01:11 UTC, rikki cattermole 
wrote:


You have probably forgotten to link against user32.


I guess you right. But I don't know how i gonna link libs when 
I'm using "dmd main.d". Tell me please.


Re: Reference to an unresolved external symbol

2022-09-07 Thread rikki cattermole via Digitalmars-d-learn



You have probably forgotten to link against user32.