Hello,
after some time, I updated my sources from repository and I tried to build them with my projects made for Visual Studio. Unfortunately, during linking, these messages appear:
render1x2.obj : error LNK2001: unresolved external symbol _render_solid_line
render1x2.obj : error LNK2001: unresolved external symbol _render_source_line
render2x4.obj : error LNK2001: unresolved external symbol _render_solid_line_2x
render2x4.obj : error LNK2001: unresolved external symbol _render_source_line_2x
These 4 functions are implemented into vice\src\video\render-common.c and they are prefixed by "inline" keyword. As result, I verified that render-common.obj is empty and that's why they are not found when doing the link stage. I did myself a quick fix by removing those "inline" keyword from the functions, inside vice\src\video\render-common.c, and the build process completed successfully.
I do not clear to me the reason because they are declared in that way, since render-common.c is not included into any file but it is compiled separately.
However, if I understood correctly, it would be better to remove those "inline" keywords.
Sincerely.
certainly not - we want those functions to be inline.
I am not sure if putting those into a seperate compilation unit is the right thing to do - maybe they must be moved into the .h file, or the .c file included by the renderers
Should be fixed in r40344 - please test and let us know. (don't try to compile render-common.c anymore, it's it's now #included within render-common.h )
That causes a recursive
#includeof "render-common.h".Here is a better fix:
static inline.#include "video.h"."better" for what reason? Yes - i forgot to remove the #include but the standard ifdef header guard prevents recursion. It's c code, i prefer it to live in a .c file.
Could it be related to bug #1503?
Last edit: Frederic bezies 2021-07-13
Yes, it seems to me that's the same thing.
This bug is fixed for me and it could be closed. Thanks.