Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined reference to alphablend #302

Open
Yedboy33k opened this issue Aug 16, 2024 · 22 comments
Open

Undefined reference to alphablend #302

Yedboy33k opened this issue Aug 16, 2024 · 22 comments

Comments

@Yedboy33k
Copy link

I'm trying to test blur C++ effect but it says "Undefined reference to alphablend"
what to do?

@BlocksFunction
Copy link

This should be a problem with the compiler
Can you link the msimg32.lib library file?

@Yedboy33k
Copy link
Author

I linked msimg32.lib. Still the same thing.

@BlocksFunction
Copy link

Are you include wingdi.h in code?

@Yedboy33k
Copy link
Author

oh thanks

@Yedboy33k
Copy link
Author

keeps saying undefined reference to `_imp__AlphaBlend@44'

@BlocksFunction
Copy link

BlocksFunction commented Aug 27, 2024

Are you linked msimg32.lib in code?
try link msimg32.lib in linker options

@Yedboy33k
Copy link
Author

where to find compiler options

@BlocksFunction
Copy link

First open your project and click "Tools"Button, and click to "Compiler Options", "Add the following commands when calling the linker" the following input box

@BlocksFunction
Copy link

I wrote some code:
#include <windows.h>
#include <wingdi.h>

int main() {
AlphaBlend(NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
return 0;
}
linker not say "Undefined reference to alphablend"
Can you try the code?(replace "NULL" to your paramet pls)

@Yedboy33k
Copy link
Author

It says 5 72 C:\Users\DELL\OneDrive\Escritorio\main.cpp [Error] could not convert '0' from 'int' to 'BLENDFUNCTION' {aka '_BLENDFUNCTION'}

@BlocksFunction
Copy link

replace "NULL" to your paramet pls.........

@Yedboy33k
Copy link
Author

Yedboy33k commented Aug 31, 2024

I did replace NULL to my paramet

@BlocksFunction
Copy link

emm

@Yedboy33k
Copy link
Author

emm

Can you make a video of how to do it so i understand?
I'm a cpp newbie

@BlocksFunction
Copy link

Do you have test code?

@Yedboy33k
Copy link
Author

I said make a video ._.

@BlocksFunction
Copy link

That's right, but I don't have instance code and I don't know much about Windows graphics APIs

@Yedboy33k
Copy link
Author

I mean the video of how to link it

@BlocksFunction
Copy link

emm

@checkdigits
Copy link
Contributor

emm

Does this mean you will produce a video or not?

@BlocksFunction
Copy link

I don't know.

@BlocksFunction
Copy link

This is the reason for the Windows API
and
"It says 5 72 C:\Users\DELL\OneDrive\Escritorio\main.cpp [Error] could not convert '0' from 'int' to 'BLENDFUNCTION' {aka '_BLENDFUNCTION'}" This error is because an int value was passed in a parameter of AlphaBlend instead of BLENDFUTURE (without type conversion)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants