tag:blogger.com,1999:blog-1192351224236811521.post2580846444656215410..comments2018-05-16T17:55:12.217-04:00Comments on #!/bin/nitro: libf2c.so: undefined reference to `MAIN__'Unknownnoreply@blogger.comBlogger18125tag:blogger.com,1999:blog-1192351224236811521.post-9214647268578329292018-05-16T17:55:12.217-04:002018-05-16T17:55:12.217-04:00with modern gcc you can just link like this
-l:l...with modern gcc you can just link like this <br /><br />-l:libf2c.a<br /><br />to link to the static library on your systemAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-1192351224236811521.post-38436707227730214112017-07-28T18:02:03.622-04:002017-07-28T18:02:03.622-04:00Hello from 2017 ¬¬
I am having this problem, but ...Hello from 2017 ¬¬<br /><br />I am having this problem, but with the file - libf2c.so.2 - I don't know how to link it to the dynamic.<br /><br />I created this thread:<br />https://stackoverflow.com/questions/45382324/dont-know-how-to-deal-with-a-f2c-error<br /><br />This:<br /><br />rm /usr/lib/libf2c.so.2 && ln -s /usr/lib/libf2c.a /usr/lib/libf2c.so.2<br /><br />Didn't work.Bruno Pinhohttps://www.blogger.com/profile/06808215919343168975noreply@blogger.comtag:blogger.com,1999:blog-1192351224236811521.post-6230223568696167702012-09-17T11:58:24.356-04:002012-09-17T11:58:24.356-04:00Another big thank you!Another big thank you!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1192351224236811521.post-79999585123736641342012-06-21T15:43:24.758-04:002012-06-21T15:43:24.758-04:00Thank you!Thank you!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1192351224236811521.post-28038029046541760172012-06-20T18:07:54.302-04:002012-06-20T18:07:54.302-04:00I'm having exactly the same issue as Roger-- d...I'm having exactly the same issue as Roger-- does anyone have any insight? Thank you!Laurienoreply@blogger.comtag:blogger.com,1999:blog-1192351224236811521.post-89602840171025906302012-04-18T10:07:27.660-04:002012-04-18T10:07:27.660-04:00Hello,
I tried doing this but it still gives me a...Hello,<br /><br />I tried doing this but it still gives me an error as -<br /><br />/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../../lib/libf2c.so(main.o): In function `main':<br />/build/buildd/libf2c2-20090411/main.c:138: undefined reference to `MAIN__'<br />collect2: ld returned 1 exit status<br /><br />Can you plz help me with this?<br />Thanks in advance...Rogernoreply@blogger.comtag:blogger.com,1999:blog-1192351224236811521.post-14778786359929401812012-01-18T04:53:42.552-05:002012-01-18T04:53:42.552-05:00You deserve a million thank yous...You deserve a million thank yous...Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1192351224236811521.post-52379266795938793922011-01-14T19:15:43.697-05:002011-01-14T19:15:43.697-05:00Thanks for pointing out the problem! Another fix, ...Thanks for pointing out the problem! Another fix, change the makefile, to link with f2c statically and with the rest dynamically, i.e.:<br />LAPACKLIBS=-llapack -lblas -Wl,-Bstatic -lf2c -Wl,-Bdynamic<br /><br />Which is on line 18 in levmar 2.5, works just fine :)Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1192351224236811521.post-36629782561360947882010-12-09T20:37:24.245-05:002010-12-09T20:37:24.245-05:00Thank you! I cannot even express how extremely hel...Thank you! I cannot even express how extremely helpful piece information this is for me. But I would be more than interested also why it's not working with shared library?Unknownhttps://www.blogger.com/profile/06869754236738654362noreply@blogger.comtag:blogger.com,1999:blog-1192351224236811521.post-48109139996987369702010-10-07T13:44:17.836-04:002010-10-07T13:44:17.836-04:00Thanks! In my case I didn't even have to link ...Thanks! In my case I didn't even have to link the .a to the .so, just removing the original .so link was enough.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1192351224236811521.post-45181327117586638572010-08-31T10:37:47.578-04:002010-08-31T10:37:47.578-04:00Thanks! Why does none of the gcc documentation men...Thanks! Why does none of the gcc documentation mention this?!Timhttps://www.blogger.com/profile/14408908510164973992noreply@blogger.comtag:blogger.com,1999:blog-1192351224236811521.post-20962147498861068372010-05-25T11:05:35.222-04:002010-05-25T11:05:35.222-04:00Thank yoooooooou soooooooooooooooo much. I was goi...Thank yoooooooou soooooooooooooooo much. I was going to kill myself....<br />wish the best for you! ;)Msalaminoreply@blogger.comtag:blogger.com,1999:blog-1192351224236811521.post-88008248595157264602010-02-19T18:26:47.083-05:002010-02-19T18:26:47.083-05:00You're welcome everybody.. it was such a pain ...You're welcome everybody.. it was such a pain to figure it out!<br /><br />Anonymous.. you can do the linking in your local directory and link against the library from there <br /><br />For example <br /><br />ln -s /usr/lib/libf2c.a ~/libf2c.so<br /><br />This will place libf2c.so in your home directory (you can choose something else)<br /><br />When you compile you should include that in your LD_PATH path <br /><br />For example <br /><br />gcc my_program.c -L~ -lf2c <br /><br />I suggest creating a directory called mylib in your home folder and put your custom libraries there and permanently change the LD_LIBRARY_PATH to point there by default <br /><br /><br />mkdir ~/mylib<br />ln -s /usr/lib/libf2c.a ~/mylib/libf2c.so<br /><br />in your .bashrc (csh is similar)<br /><br />export LD_LIBRARY_PATH="$HOME/mylib":$LD_LIBRARAY_PATH <br /><br />Good luckHAhttps://www.blogger.com/profile/10525403434147613472noreply@blogger.comtag:blogger.com,1999:blog-1192351224236811521.post-36603965221019286692010-02-19T18:21:22.744-05:002010-02-19T18:21:22.744-05:00how can you do this without root access?how can you do this without root access?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1192351224236811521.post-62663005448682238932010-02-19T13:24:08.585-05:002010-02-19T13:24:08.585-05:00Thanks, Thanks and thanks.Thanks, Thanks and thanks.Pallab Basuhttps://www.blogger.com/profile/06201074406725317885noreply@blogger.comtag:blogger.com,1999:blog-1192351224236811521.post-47592319185874297102010-01-05T15:18:12.004-05:002010-01-05T15:18:12.004-05:00i would never figure it out by my own.
Thank you!...i would never figure it out by my own.<br /><br />Thank you!Eugenhttps://www.blogger.com/profile/10420137683900595988noreply@blogger.comtag:blogger.com,1999:blog-1192351224236811521.post-67934550350991642462009-12-04T08:18:47.279-05:002009-12-04T08:18:47.279-05:00thanks, that was really helpful :)thanks, that was really helpful :)Unknownhttps://www.blogger.com/profile/15383044483210321091noreply@blogger.comtag:blogger.com,1999:blog-1192351224236811521.post-75313779948864826182009-02-12T12:28:00.000-05:002009-02-12T12:28:00.000-05:00Thank you! This was killing me...Thank you! This was killing me...Riley Cranehttps://www.blogger.com/profile/17984716656916146451noreply@blogger.com