Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Undefined Reference with GMP

Name: Anonymous 2012-07-27 11:40

>make simple program using GMP
>try to compile
>UNDEFINED REFERENCE

I don't know what I'm doing wrong. gmp.h is included in the source, I'm telling GCC to link GMP's library, I've set the include/lib paths... What's going on?

Also, what I'm using to compile:
gcc -I/usr/local/include -L/usr/local/lib -lgmp fib_dik_gmp.c

Name: Anonymous 2012-07-27 11:43

Include the original error message and the offending source code.

Name: Anonymous 2012-07-27 11:44

Go back to /g/.

Name: Anonymous 2012-07-27 11:46

how about
gcc -I/usr/local/include -L/usr/local/lib fib_dik_gmp.c -lgmp

Depending on which parameters GCC is compiled with, it can be quite cunt regarding the link order.

Name: Anonymous 2012-07-27 11:46

>>3
Be polite, nigger.

Name: Anonymous 2012-07-27 11:48

>>4
Yup, this did the trick. Thank you.

Name: Anonymous 2012-07-27 12:12

UNDEFINE MY ANUS

Name: Anonymous 2012-07-27 12:23

Stop being a moron and include the lib path when you run the ELF. Either add /usr/local/lib to your /etc/ld.so.conf or run it with LD_LIBRARY_PATH=/usr/local/lib ./my_shitty_program

Name: Anonymous 2013-09-01 19:27



               ,. -──- 、.,_
         r─- ∠..,,_  ⌒ソ_  `' 、
         ,ヘ、      `"'' <,    \
        ,-ゝ>-──- 、.,_   `ヽ   ハ
       /{/  /./     `' 、 ∨ ア⌒ヽ
        {/ /  /- 、|   ト、   |!   ヽ ソ ァ'⌒Y⌒';
       ;' ;'  ,' ァテ、!   | ,  ハ 、 ∨ 、__.人__ノ!
       | |!  |! { { ハ\_| }_/─|、.ハ  ∨ |    リ
       |八  '、 弋リ   ァ=テ‐t、|  }  ',  /
        ./ \7   ,      {ノ  リハ  |!     {
        ;   /人        ゝ‐''゚ソ  八    '、
         { ∧ ,ム、 ` ー(   "∠..,.イ /\   ヽ
        ∨,.-,\八ヽ.,__,.   イ/|/レ'    )  ノノ
        /:;(_   \」-r]  /`'</‐-.、 (r ''"´
         {::!::;:}   /::;r/ |/   /rへ;::::\
      ./二二ヽ .{:://レヘ>、__,/r'   \:::::\
      {  ─-り |/.イ!レ'  ///  __  ∨:::::ハ
      ./| ─-ノ、r{/ !  / .{/  / ̄`ヽ }:::::|:::|
      {| ト-rァ'::} 7  ,|/   /  / ̄`ヽリ/::::::;:::;'
     |! |::::ゝ-ヘ. {  ◎、   ./   .{_   //::::::/::/}

Don't change these.
Name: Email:
Entire Thread Thread List