|
This thread is locked; no one can reply to it. |
1
2
|
How to edit ld.so.conf? |
SonShadowCat
Member #1,548
September 2001
|
Since im getting a shared lib violation I need to copy a path into ld.so.conf. Problem is I dont know how. Ive looked into the emacs command but I cant figure out how to use it( ive read the docs). Can someone help me figure out how to edit the file? |
Steve Terry
Member #1,989
March 2002
|
as far as I know it's standard text, just add a new line with the path... and use pico instead, just type pico ld.so.conf on the command line, ctrl-x lets you save and exit. More specifically it's ctrl-x then y then enter. ___________________________________ |
SonShadowCat
Member #1,548
September 2001
|
Apparently I dont have pico o.O new line with the path?? Edit: No pico on the cd. What must I do master? |
Steve Terry
Member #1,989
March 2002
|
I thought it went: path1 at lest that's what it was when I last opened it.. I think... but anyway the paths were seperated by new lines. ___________________________________ |
SonShadowCat
Member #1,548
September 2001
|
I tried opening the file with KEdit, Kate, and KWrite. It wont save, it says I dont have write permission, im guessing that means root priveledges. How do I get around this? Login as root? |
Steve Terry
Member #1,989
March 2002
|
you can log in as root.. or alternatively run su on the command line, followed by your password. ___________________________________ |
SonShadowCat
Member #1,548
September 2001
|
ok, I logged in as root and edited the file. Now I get the same problem as before( I posted before about it but no more people replied), after I compile a source file, I try to run the program but it says it cant find the program, wth? Im looking right at, where the hell could it be? |
Matthew Leverton
Supreme Loser
January 1999
|
After you edit the file, you probably need to type 'ldconfig' as root anywhere you feel like. |
SonShadowCat
Member #1,548
September 2001
|
umm, do I type that anywhere or in the dir where ld.so.conf was? |
Steve Terry
Member #1,989
March 2002
|
You can type that at any point on teh command line just like any program. ___________________________________ |
SonShadowCat
Member #1,548
September 2001
|
I reread his post and figured that out -.- Heh, it seems none of the code I wrote in windows works now, it spits out large amounts of errors I'm dumb!. Is programming with allegro in linux any different than doing it in windows? Will I have to change the code alot? |
Steve Terry
Member #1,989
March 2002
|
if you were compiling with MingW32 and not using any DOS specific header files.. then no code will have to change at all.. what kinds of errors.. did you put END_OF_MAIN() at the end of main?? ___________________________________ |
PyroBoy
Member #725
October 2000
|
All of my code has been portable to/from DOS, Windows, Linux Though i am using gcc on all platforms and i remember the cross platform stuff like adding END_OF_MAIN() to the end of the main function . |
SonShadowCat
Member #1,548
September 2001
|
Example: Vector undeclared even though I included vector. Parse error before '>' token. Ive looked at the code and it looks fine, it even compiles and works on windows. What could be wrong? And no, not even I make such foolish mistakes as to leave out END_OF_MAIN(); -.- P.S.Where is the damn calculator? Its not on the mandrake cd and I cant find it installed anywhere. An OS without a calculator, how weird ><! |
Steve Terry
Member #1,989
March 2002
|
hmm... try g++, gpp, cc?? I don't know never got those errors before, are you compiling a .cpp program or .c. Well since it's vector I will assume .cpp. Sorry SSC.. maybe post the source and complete output errors I may be able to help then... the only thing I can think of is maybe it's a windows text file and the new lines in linux are different from teh new lines in windows.. ___________________________________ |
SonShadowCat
Member #1,548
September 2001
|
Heres an example of I program I just wrote that wont compile:
ErrorS: Ios undeclared |
Steve Terry
Member #1,989
March 2002
|
hmm not a c++ freak, but maybe add the line using namespace std; or something like that.. shoot I think I really need to go read some C++ books again.. been a while.. ___________________________________ |
23yrold3yrold
Member #1,134
March 2001
|
#include <fstream>, not <fstream.h>! >_< -- |
SonShadowCat
Member #1,548
September 2001
|
holy crap ><! I put in the namespace thing And now when I compile I get a butt load of undefined references, Every little bit of code I used in Error_Log created a undefined reference error Example: /tmp/cc8vlITR.o(.text+0x27): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::endl<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&) Whats in C++'s unholy name is this? I get around 10-15 errors like this, all pointing to Error_Log. I beseach you linux gurus, help me! |
23yrold3yrold
Member #1,134
March 2001
|
Are you linking with the C++ standard library? Which means you're compiling with gpp/g++ (NOT gcc) or explicitly linking in -lstdlib++ or something like that (not sure). -- |
SonShadowCat
Member #1,548
September 2001
|
I did not know that sam I am. I had a feelings I wasnt supposed to use gcc... So I just replace gcc with g++? |
23yrold3yrold
Member #1,134
March 2001
|
Or gpp, yes (not sure which Linux uses). Give it a go; worth a shot, just filling out my word count at this point .... -- |
SonShadowCat
Member #1,548
September 2001
|
hmm well it compiled with no errors or warnings, but I get the same problem I got before( cant find the program). Ill look through old posts to fix it ^^ |
Steve Terry
Member #1,989
March 2002
|
ahhh don't just type "program" on teh command line, linux doesn't have the path set to teh current working directory. Instead use ./program and it will run beautifully.. I hope::) ___________________________________ |
SonShadowCat
Member #1,548
September 2001
|
It says its unable to find a usable VT o.O This didnt happen before, I could just click on the program and it would work, I wonder what I screwed up. |
|
1
2
|