Skip to content

fix: resolve #729 - #744

Open
strias-ai wants to merge 1 commit into
LibVNC:masterfrom
strias-ai:fix-issue-729
Open

strias-ai wants to merge 1 commit into
LibVNC:masterfrom
strias-ai:fix-issue-729

Conversation

@strias-ai

Copy link
Copy Markdown
Okay, so I'm trying to figure out the problem with issue #729 about conflicting turbojpeg functions in the exports. Let me start by understanding the context.

The user provided a list of files, and the issue is about conflicting functions in turbojpeg. I remember that in C, when you have multiple functions with the same name, you can use function pointers or other mechanisms to handle them, but sometimes they can conflict.

Looking at the files, I see that there's a turbojpeg.c and turbojpeg.h in the common directory. The issue mentions that the exports are conflicting, so I think that means there are duplicate functions being exported.

In the turbojpeg.h file, there are functions like tjEncodeYUV, tjGetColorSpace, etc. I recall that in some libraries, especially when using both the main library and a C++ wrapper, functions might be duplicated, causing conflicts.

So, the problem is likely that the same functions are defined in both the main C file and the C++ wrapper, leading to duplicate symbols when building.

The solution would be to consolidate these functions. Maybe the C++ wrapper can include the C functions, or the C functions can be moved to the C++ file. This way, there's no duplication, and the exports are handled correctly.

I think the user wants me to explain this in a clear way, so I'll structure it by identifying the cause and the solution, suggesting that the C++ file should include the C functions or vice versa to eliminate the duplication.

The issue #729 mentions that there are conflicting turbojpeg functions in the exports. This likely occurs because the same functions are defined in both the C and C++ files, leading to duplicate symbols.

Causa:
The functions in src/common/turbojpeg.c and src/common/turbojpeg.h are duplicated in src/common/turbojpeg++.c and src/common/turbojpeg++.h, causing conflicting exports.

Solución:
Consolidar las funciones en un solo archivo. Por ejemplo, mover las funciones de turbojpeg.c a turbojpeg++.c y actualizar los encabezados.

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

Successfully merging this pull request may close these issues.

1 participant