Skip to content

Ошибка сборки (error: redefinition of ‘time_amortization_table_fast_exp’) #26

Description

@pensnarik
vv/am-amortization.c:59:8: error: redefinition of ‘time_amortization_table_fast_exp’
 double time_amortization_table_fast_exp (time_amortization_table_t *self, int dt) {
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from vv/am-amortization.c:23:0:
vv/am-amortization.h:42:22: note: previous definition of ‘time_amortization_table_fast_exp’ was here
 extern inline double time_amortization_table_fast_exp (time_amortization_table_t *self, int dt) {
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Makefile:280: recipe for target 'objs/vv/am-amortization.o' failed
make: *** [objs/vv/am-amortization.o] Error 1
make: *** Waiting for unfinished jobs....

Если закомментировать одно из объявлений, получаю ошибку на этапе линковки:

objs/vv/am-amortization.o: In function `time_amortization_table_fast_exp':
/home/mutex/src/kphp-kdb/vv/am-amortization.h:44: multiple definition of `time_amortization_table_fast_exp'
objs/targ/targ-weights.o:/home/mutex/src/kphp-kdb/vv/am-amortization.h:44: first defined here
collect2: error: ld returned 1 exit status
Makefile:329: recipe for target 'objs/bin/targ-engine' failed
make: *** [objs/bin/targ-engine] Error 1
make: *** Waiting for unfinished jobs....
[mutex@hp kphp-kdb]$ (master)*$ mc

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions