Created by: ityuhui
After the C client library is generated, I try to link it to my program.
gcc main.c -g -I../../c_k8s_api_client/include -I../../c_k8s_api_client/model -I../../c_k8s_api_client/api -L../../c_k8s_api_client/build -lkubernetes -lpthread -lssl -lz -lcurl -o lsecretOutCluster
But there are some link errors:
../../c_k8s_api_client/build/libk8s.a(CoreV1API.c.o): In function `CoreV1API_patchCoreV1Namespace':
/root/c_k8s_api_client/api/CoreV1API.c:19072: undefined reference to `object_convertToJSON'
../../c_k8s_api_client/build/libk8s.a(CoreV1API.c.o): In function `CoreV1API_patchCoreV1NamespaceStatus':
/root/c_k8s_api_client/api/CoreV1API.c:19219: undefined reference to `object_convertToJSON'
...
The reason is : The source code file "object.c" is not compiled into the C client library (libkubernetes).
PR checklist
-
Read the contribution guidelines. -
If contributing template-only or documentation-only changes which will change sample output, build the project before. -
Run the shell script(s) under ./bin/
(or Windows batch scripts under.\bin\windows
) to update Petstore samples related to your fix. This is important, as CI jobs will verify all generator outputs of your HEAD commit, and these must match the expectations made by your contribution. You only need to run./bin/{LANG}-petstore.sh
,./bin/openapi3/{LANG}-petstore.sh
if updating the code or mustache templates for a language ({LANG}
) (e.g. php, ruby, python, etc). -
File the PR against the master: master
,4.3.x
,5.0.x
. Default:master
. -
Copy the technical committee to review the pull request if your PR is targeting a particular programming language.
@wing328 @zhemant