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

Failing to link #80

Closed
Ruannilton opened this issue Dec 22, 2020 · 0 comments
Closed

Failing to link #80

Ruannilton opened this issue Dec 22, 2020 · 0 comments

Comments

@Ruannilton
Copy link

I have a package that I am porting to the bake environment:
{ "id": "collections", "type": "package" }

and an application project thats depends on it:
{ "id": "collec_test", "type": "application", "value": { "use": [ "collections" ] } }

But when try to compile I get this error:

ruan@Mahlik:~/Dev/collec_test$ bake build
[ build] application collec_test => '.'
/usr/bin/ld: .bake_cache/x64-Linux-debug/obj/main.o: in function 'main':
/home/ruan/Dev/collec_test/./src/main.c:5: undefined reference to 'cvector_create_i'
collect2: error: ld returned 1 exit status
[ error] process 4040 exited with returncode 1
[ from] command returned 1
gcc -Wall -O0 .bake_cache/x64-Linux-debug/obj/main.o -L/home/ruan/bake/x64-Linux/debug/lib -L/home/ruan/bake/lib -lcollections -o ./bin/x64-Linux-debug/collec_test
[ from] command for task './bin/x64-Linux-debug/collec_test' failed
[ from] failed to build rule 'ARTEFACT'
[ error] build interrupted for collec_test in .
[ error] project 'collec_test' built with errors, skipping

When I go to the lib directory the .so file is presente there:

ruan@Mahlik:~/bake/x64-Linux/debug/lib$ ls
libcollections.so

And when I list the bake enviroment the package is there:

ruan@Mahlik:~$ bake list

Listing projects for platform:

  • x64-Linux

Packages & Applications:
P bake.amalgamate => all
C bake.lang.c => all
C bake.lang.cpp => all
C bake.opengl => all
C bake.sdl2 => all
C bake.sfml2 => all
P bake.test => all
P bake.util => all
P collections => [debug]

Summary:
applications: 0, packages: 9, templates: 0

The package code works well in other projects, so, I believe the cvector_create_i function is defined in the .so file.
Could someone explain to me what's wrong please?

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

1 participant