Giter VIP home page Giter VIP logo

Comments (4)

kimci86 avatar kimci86 commented on July 19, 2024 2

I had a similar issue because of a small mistake in the makefile : %.: %.c should be %: %.c (notice the dot). Then I had to add the -lm flag for gcc.

from light2d.

leinlin avatar leinlin commented on July 19, 2024

用Unity 把算法 依葫芦画瓢的搞了一个下来,makefile文盲可以来试试看
https://github.com/ElPsyCongree/light2d_for_unity

from light2d.

miloyip avatar miloyip commented on July 19, 2024

@wurui1994 感觉这是平台的问题。例子代码都只使用了 C99 标准库。

from light2d.

micfan avatar micfan commented on July 19, 2024

gcc (GCC) 8.2.1 20181127 compile error, how to solve it?

gcc -Wall -O3 -o csg csg.c
/usr/bin/ld: /tmp/ccv6tJMs.o: in function `circleSDF':
csg.c:(.text+0xa1a): undefined reference to `sqrtf'
/usr/bin/ld: /tmp/ccv6tJMs.o: in function `scene':
csg.c:(.text+0xc03): undefined reference to `sqrtf'
/usr/bin/ld: csg.c:(.text+0xc30): undefined reference to `sqrtf'
/usr/bin/ld: /tmp/ccv6tJMs.o: in function `trace':
csg.c:(.text+0xd8b): undefined reference to `sqrtf'
/usr/bin/ld: csg.c:(.text+0xe2d): undefined reference to `sqrtf'
/usr/bin/ld: /tmp/ccv6tJMs.o: in function `sample':
csg.c:(.text+0xf0d): undefined reference to `sincosf'
/usr/bin/ld: csg.c:(.text+0x1053): undefined reference to `sqrtf'
/usr/bin/ld: csg.c:(.text+0x10a6): undefined reference to `sqrtf'
/usr/bin/ld: /tmp/ccv6tJMs.o: in function `main':
csg.c:(.text.startup+0x63): undefined reference to `fminf'
collect2: error: ld returned 1 exit status
make: *** [makefile:11: csg] Error 1

from light2d.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.