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

LNK2019 unresolved external symbol __imp_slang_createGlobalSession #5931

Closed
JoseMiguelPizarro opened this issue Dec 21, 2024 · 2 comments
Closed

Comments

@JoseMiguelPizarro
Copy link

Hi!

I'm trying to use the slang compiler and slang reflection API on my project.
I built slang locally and added the generated {buildTarget}/lib .lib files to my project library directories.

But when I compile my project I get this linker error.

Severity Code Description Project File Line Suppression State Details
Error LNK2019 unresolved external symbol __imp_slang_createGlobalSession referenced in function "int __cdecl slang::createGlobalSession(struct slang::IGlobalSession * *)" (?createGlobalSession@slang@@YAHPEAPEAUIGlobalSession@1@@z)

Not sure what other .lib file should I include to link that function.

@csyonghe
Copy link
Collaborator

This function is defined in slang.lib, and you need to make sure your linker has it as input.

@JoseMiguelPizarro
Copy link
Author

It happened my build configuration was incorrect. Redid my cmake and now is fine. Closing the ticket. Thanks!

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

2 participants