0

Does anyone on this community have experience with compiling linking the CUDD package for manipulating BDDs? Seems like a great resource if I can only compile something simple... Getting a lot of following. I am a novice with C, mainly Py guy, so any help would be highly appreciated. (I've tried using tulip-dd in Py, but that is a limited experience). Thanks in advance.

[glarangeira@login1 cudd3]$ gcc basicDD.c

/tmp/cc5v0zuv.o: In function `main':
basicDD.c:(.text+0x2a): undefined reference to `Cudd_Init'
basicDD.c:(.text+0x3a): undefined reference to `Cudd_bddNewVar'
basicDD.c:(.text+0x4a): undefined reference to `Cudd_Ref'
basicDD.c:(.text+0x56): undefined reference to `Cudd_Quit'
collect2: error: ld returned 1 exit status

[glarangeira@login1 cudd3]$ gcc basicDD.c /gpfs/software/dd/cudd-3.0.0/cudd/.libs/libcudd.a -o bdd
/gpfs/software/dd/cudd-3.0.0/cudd/.libs/libcudd.a(cudd_libcudd_la-cuddAPI.o): In function `Cudd_ExpectedUsedSlots':
/gpfs/software/dd/cudd-3.0.0/cudd/cuddAPI.c:1835: undefined reference to `exp'
/gpfs/software/dd/cudd-3.0.0/cudd/cuddAPI.c:1844: undefined reference to `exp'
/gpfs/software/dd/cudd-3.0.0/cudd/cuddAPI.c:1850: undefined reference to `exp'
/gpfs/software/dd/cudd-3.0.0/cudd/.libs/libcudd.a(cudd_libcudd_la-cuddCache.o): In function `cuddCacheProfile':
/gpfs/software/dd/cudd-3.0.0/cudd/cuddCache.c:816: undefined reference to `exp'
/gpfs/software/dd/cudd-3.0.0/cudd/.libs/libcudd.a(cudd_libcudd_la-cuddUtil.o): In function `Cudd_CountMinterm':
/gpfs/software/dd/cudd-3.0.0/cudd/cuddUtil.c:595: undefined reference to `pow'
/gpfs/software/dd/cudd-3.0.0/cudd/cuddUtil.c:595: undefined reference to `pow'
/gpfs/software/dd/cudd-3.0.0/cudd/cuddUtil.c:595: undefined reference to `pow'
/gpfs/software/dd/cudd-3.0.0/cudd/cuddUtil.c:595: undefined reference to `pow'
/gpfs/software/dd/cudd-3.0.0/cudd/.libs/libcudd.a(cudd_libcudd_la-cuddUtil.o): In function `Cudd_LdblCountMinterm':
/gpfs/software/dd/cudd-3.0.0/cudd/cuddUtil.c:729: undefined reference to `powl'
/gpfs/software/dd/cudd-3.0.0/cudd/.libs/libcudd.a(cudd_libcudd_la-cuddUtil.o): In function `Cudd_CountMinterm':
/gpfs/software/dd/cudd-3.0.0/cudd/cuddUtil.c:595: undefined reference to `pow'
/gpfs/software/dd/cudd-3.0.0/cudd/cuddUtil.c:595: undefined reference to `pow'
/gpfs/software/dd/cudd-3.0.0/cudd/cuddUtil.c:595: undefined reference to `pow'
/gpfs/software/dd/cudd-3.0.0/cudd/cuddUtil.c:595: undefined reference to `pow'
/gpfs/software/dd/cudd-3.0.0/cudd/.libs/libcudd.a(cudd_libcudd_la-epd.o): In function `EpdNormalizeDecimal':
/gpfs/software/dd/cudd-3.0.0/epd/epd.c:834: undefined reference to `pow'
/gpfs/software/dd/cudd-3.0.0/cudd/.libs/libcudd.a(cudd_libcudd_la-epd.o):/gpfs/software/dd/cudd-3.0.0/epd/epd.c:834: more undefined references to `pow' follow
/gpfs/software/dd/cudd-3.0.0/cudd/.libs/libcudd.a(cudd_libcudd_la-cuddAnneal.o): In function `siftBackwardProb':
/gpfs/software/dd/cudd-3.0.0/cudd/cuddAnneal.c:671: undefined reference to `exp'
/gpfs/software/dd/cudd-3.0.0/cudd/cuddAnneal.c:671: undefined reference to `exp'
/gpfs/software/dd/cudd-3.0.0/cudd/.libs/libcudd.a(cudd_libcudd_la-cuddAnneal.o): In function `cuddAnnealing':
/gpfs/software/dd/cudd-3.0.0/cudd/cuddAnneal.c:229: undefined reference to `log'
/gpfs/software/dd/cudd-3.0.0/cudd/cuddAnneal.c:229: undefined reference to `log'
/gpfs/software/dd/cudd-3.0.0/cudd/.libs/libcudd.a(cudd_libcudd_la-cuddAnneal.o): In function `siftBackwardProb':
/gpfs/software/dd/cudd-3.0.0/cudd/cuddAnneal.c:671: undefined reference to `exp'
collect2: error: ld returned 1 exit status
  • 2
    Normally, `exp`, `pow`, `log` are functions from the standard math library. So, adding `-lm` at the end of the compile line should help. – Craig Estey Jun 25 '20 at 15:10
  • That did help! Good job, thanks! Still get nothing when I run the file, but that's probably my own mistake. I got no compile errors after your suggestion! – Gui Larange Jun 25 '20 at 18:54
  • suggest reading [cuda compile](https://forums.developer.nvidia.com/t/the-simplest-way-to-compile-a-cu-file-looking-for-hello-world-example-for-compilation/21151/2) – user3629249 Jun 26 '20 at 04:38
  • @user3629249 CUDA and CUDD are not the same thing. The latter is a library for manipulating binary decision diagrams. – DCTLib Jun 26 '20 at 11:25

0 Answers0