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

Cant compile under C++ 20 #402

Closed
M0n7y5 opened this issue Jan 27, 2022 · 12 comments
Closed

Cant compile under C++ 20 #402

M0n7y5 opened this issue Jan 27, 2022 · 12 comments

Comments

@M0n7y5
Copy link

M0n7y5 commented Jan 27, 2022

Hello i have a problem with compilation in my C++ 20 project. When i try to compile it it gives me this error:
image

It looks like that it need C DirectX API so i tried to do this but no luck
image
Any ideas how to fix it?

@RobLoach
Copy link
Contributor

Looks like you may need to link Direct3D in your compiler.

@M0n7y5 M0n7y5 closed this as completed Jan 28, 2022
@M0n7y5 M0n7y5 reopened this Jan 28, 2022
@M0n7y5
Copy link
Author

M0n7y5 commented Jan 28, 2022

I tried to link it against d11 libs but no luck. It works only in .c file ... not .cpp
Is there any way to use this in C++ project or should i need to stick with C?

image

@M0n7y5
Copy link
Author

M0n7y5 commented Jan 28, 2022

I also tried build it in 2 different machines

@RobLoach
Copy link
Contributor

Nuklear works in C++, you're just running into D3D issues. You'd have to link D3d, and ensure the include directory is set.... Nuklear has no real dependencies itself.

@M0n7y5
Copy link
Author

M0n7y5 commented Jan 28, 2022

But i have everything linkedand setup
image

@RobLoach
Copy link
Contributor

Does d3d11.h include? Looks like it's not finding even the function declarations.

@M0n7y5
Copy link
Author

M0n7y5 commented Jan 28, 2022

yes ... its already part of this file
image

@M0n7y5
Copy link
Author

M0n7y5 commented Jan 28, 2022

when i move my code to somefile.c then it works

@RobLoach
Copy link
Contributor

RobLoach commented Jan 29, 2022

Correct. Implementation define should be in a .c or .cpp file.

@M0n7y5
Copy link
Author

M0n7y5 commented Jan 29, 2022

I was trying to use that DX11 renderer from demo folder. Nevertheless I got it working.

@M0n7y5 M0n7y5 closed this as completed Jan 29, 2022
@RobLoach
Copy link
Contributor

What did you end up doing?

@ExoticNx
Copy link

What did you do to get this working having the same issue. @M0n7y5

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