-
Notifications
You must be signed in to change notification settings - Fork 118
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
I'm currently trying to (ab)use fpm to compile a C project. It is not a C package manager, but it certainly could become one.
Using a project with the following layout:
fpm.toml
app/main.c
fpm.toml:
name = "test"
[[executable]]
name = "test"
main = "main.c"app/main.c:
int
main (void) {
return 0;
}Will fail to link the C executable with
❯ fpm build
+ mkdir -p build/gfortran_2A42023B310FA28D/test
+ gcc -c app/main.c -I./include -o build/gfortran_2A42023B310FA28D/test/app_main.c.o
❯ fpm run
<INFO> No executables to run
STOP 0
I think the source scanning must find a program statement in the source-file declared as main in the manifest. Instead, it would be preferable if fpm just trust the user input and assumes that the provided main is providing the necessary entry point.
Tested with fpm 0.5.0
LKedward and ivan-pi
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working