1

I'm trying to port an open source existing ocaml app from Makefiles to dune. The application includes some C and C++ stubs. I tried to add a test.c file in a library like this:

(library
    (name cdk)
    (public_name [...])
    (wrapped false) 
    (modules
[...]
    )
    (libraries IO unix str threads camlp-streams autoconf)
    (flags (:standard -w -32 -w -50 -w -27 -w -35 -w -69))
    (foreign_stubs
        (language c)
        (names test)
        (include_dirs ../../../)
    )
)

the C file is just an include of stdio.h. I then get this error:

Error: Dependency cycle between:            
   _build/default/src/utils/cdk/test.o
-> _build/default/src/utils/cdk/libcdk_stubs.a
-> _build/default/src/utils/cdk/cdk.cmxs
-> _build/default/src/utils/cdk/test.o
-> required by alias src/utils/cdk/all
-> required by alias default

This happens whatever C file I include. What is this cycle being created? How can I fix this? Thank you!

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.