Skip to content

Help my mingW64 has a handicap or my code (help) #22

@cool1coder

Description

@cool1coder

So this is my code (i am trying to make a little joke virus for my friend)

#include <windows.h>
#include
#include <time.h>
void invertscreen() {
int x, y;
x = GetSystemMetrics(SM_CXSCREEN);
y = GetSystemMetrics(SM_CXSCREEN);
while (0 == 0) {
int randx, randy;
randx = rand() % x + 0;
randy = rand() % x + 0;
BitBlt(GetDC(NULL),rand() % x + 0, rand() % y + 0, randx + 200,randy+200,GetDC(NULL),randx,randy,NOTSRCCOPY);
}
}

int main()
{
invertscreen();
}

now once compiling i get this error: c:/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\mverb\AppData\Local\Temp\cchWKwR9.o:main.cpp:(.text+0xc2): undefined reference to `__imp_BitBlt'
collect2.exe: error: ld returned 1 exit status

if you know please help before i get a handicap :D

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions