Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mic@mic-nb /tmp $ cat main.cpp
- namespace math {
- #include <math.h>
- }
- int main() {
- return math::expf(5);
- }
- mic@mic-nb /tmp $ g++ main.cpp
- mic@mic-nb /tmp $ ./a.out; echo $?
- 148
- mic@mic-nb /tmp $ g++ main.cpp -nostdlib
- /usr/bin/ld: warning: cannot find entry symbol _start; defaulting to 0000000000400144
- /tmp/ccSX0iir.o: In function `main':
- main.cpp:(.text+0xd): undefined reference to `expf'
- collect2: error: ld returned 1 exit status
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement