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

Redefinition conflict between "types.h" and OpenCV #9

Open
niqbal996 opened this issue Jul 9, 2019 · 2 comments
Open

Redefinition conflict between "types.h" and OpenCV #9

niqbal996 opened this issue Jul 9, 2019 · 2 comments

Comments

@niqbal996
Copy link

Hi Usman,
Great work with the GTA 5 plugin. It really helped with my research for Master thesis. The plugin works perfectly for me, however, I am trying to use OpenCV with your project to add the camera images functionality.

[Problem] When I include both "types.h" file and <opencv2/opencv.hpp> for my project, I get the following error:
C2371 'uint': redefinition; different basic types

There is double conflict between
a. typedef unsigned uint in

opencv2/core/hal/interface.h

AND
b. typedef DWORD uint in

types.h

file. I tried commenting the one in types.h but 😄 then the .asi loader does not load my plugin.
ASI: Loading "D:\Applications\steamapps\common\Grand Theft Auto V\LiDAR GTA V.asi"
"LiDAR_GTA_V.asi" failed to load

It might be irrelevant to your project, But I thought you might have an idea how I could get around this problem?

I am using OpenCV3.4 , VS2017, Win SDK 8.1, GTA 5 version(1.0.1604.1).
Thank you.

@am935401
Copy link

Hi hitman996,

have you resolved this problem meanwhile? I'm also encountering the same problem for a similiar GTAV + scripthook project. The same issue when opencv is used

@niqbal996
Copy link
Author

niqbal996 commented Nov 27, 2019

Hi @am935401 ,
Sorry for the late reply. Unfortunately, I could not find suitable way to overcome these conflicts between scripthook and standard libraries like OpenCV. If you are still stuck at this problem, I would suggest take a look at DeepGTA5 repository. It has a lot of functionalities and well written in general. Maybe that can serve as a good start. Sorry I could not give you a concrete answer. Good luck.

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