Comments (4)
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.
用Unity 把算法 依葫芦画瓢的搞了一个下来,makefile文盲可以来试试看
https://github.com/ElPsyCongree/light2d_for_unity
from light2d.
@wurui1994 感觉这是平台的问题。例子代码都只使用了 C99 标准库。
from light2d.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from light2d.