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

Error during compilation #6

Open
absolutelynothinghere opened this issue Nov 3, 2023 · 1 comment
Open

Error during compilation #6

absolutelynothinghere opened this issue Nov 3, 2023 · 1 comment

Comments

@absolutelynothinghere
Copy link

absolutelynothinghere commented Nov 3, 2023

Compiling jlibtool with Clang (c99) yields the following error and 2 warnings:

jlibtool.c:1617:11: warning: call to undeclared function 'strdup'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
                                tmp = strdup(arg);
                                      ^
jlibtool.c:1617:9: error: incompatible integer to pointer conversion assigning to 'char *' from 'int' [-Wint-conversion]
                                tmp = strdup(arg);
                                    ^ ~~~~~~~~~~~
jlibtool.c:2227:2: warning: call to undeclared function 'setenv'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
        setenv(LD_LIBRARY_PATH_LOCAL, l, 1);
        ^

Adding -Wno-int-conversion -Wno-implicit-function-declaration to the compiler command silences the error and warnings.

@alandekok
Copy link
Owner

The better solution is to include the correct header files which have the function prototypes. I'll take a look.

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