cannot run c compiled programs


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users cannot run c compiled programs
# 1  
Old 11-27-2006
cannot run c compiled programs

iam in the way of making graphics using SDL.i copied from cd usign
mount -a /cdrom
cd /cdrom
cp SDL-1.2.11.tar.gz /usr/test
cd /usr/test
gunzip SDL-1.2.11.tar.gz
tar -xf SDL-1.2.11.tar
cd SDL-1.2.11
./configure
...
...
it stops at
checking whether the c compiler works...configure:error:cannnot run c compiled programs
if you meant to cross com[pile,use --host
see config.log

what to do now?it was working perfectly ..suddenly i dont what happen,please help me

-its in freebsd
# 2  
Old 11-28-2006
post that log

Make sure that C-Compiler location is there in PATH.
Also you can try adding "." in your PATH. PATH=$PATH:. ; export PATH
# 3  
Old 11-28-2006
permission denied

thanks for the reply but it says permission denied.i typed 'su' n tried again
PATH=$PATH;.; -> It says permission denied
Now i came to know that gcc is not creatinge a.out well.when i try to run a.out it says segementation fault(core dumped).what should i do now.help me
# 4  
Old 11-28-2006
You making mistake....
You sure you trying PATH=$PATH:. ; export PATH and NOT PATH=$PATH;. ; export PATH . There is difference of ":" and ";"
If it still not work then...
If you can manage then better you reinstall your O.S. There is high possibality of system curruption either due to Device-failure or it might be some hackers play-ground for now!!!

One lession for you is Be carefull while working in *NIX or BSD world; It is not M$ Windows :-)
# 5  
Old 03-13-2009
I know the message is very old but just for others looking for a solution....

I ran into this problem too. :-/
In my case it was the way I mounted my sw (software) filesystem.
Using the noexec or user option. The latter also implies noexec. See the manpage of the mount command.

Have a nice day
René
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Run program compiled in Ubuntu in centos

Will a program compiled in ubuntu 14.04 execute in Centos 7? That is to say a tarball or zip is downloaded from github and extracted, compiled, and make is all done in ubuntu 14.04, can I mv the program from ubuntu 14.04 to Centos 7, add it to path in Centos 7. And run it? Thank you :) (3 Replies)
Discussion started by: cmccabe
3 Replies

2. UNIX for Dummies Questions & Answers

Difference between inbuilt suid programs and user defined root suid programs under bash shell?

Hey guys, Suppose i run passwd via bash shell. It is a suid program, which temporarily runs as root(owner) and modifies the user entries. However, when i write a C file and give 4755 permission and root ownership to the 'a.out' file , it doesn't run as root in bash shell. I verified this by... (2 Replies)
Discussion started by: syncmaster
2 Replies

3. UNIX for Dummies Questions & Answers

how to run two unix/linux programs on two different cpu cores

Hi folks, I want to know how to run two unix programs on two different cpu cores on a 2-core or 4-core or 8-core CPU machine? Extending this how would i run four and eight unix programs on 4-core and 8-core machine respectively? If this can be done, how to know which program is assigned to... (1 Reply)
Discussion started by: kaaliakahn
1 Replies

4. Shell Programming and Scripting

Run multiple python programs sequentially.

I HAVE WRITTEN NINE PYTHON CODES TO PERFORM A TASK ........ I WISH TO RUN THEM SEQUENTIALLY. eg. code1__code2 >>>>>>>>code9.py TO GET DESIRED OUTPUT. PLS HELP ME WRITTING SHELL SCRIPT .. I HAVE TO DISTRIBUTE THESE CODE FOR BEING USED BY OTHERS. (2 Replies)
Discussion started by: upvan111
2 Replies

5. Shell Programming and Scripting

Interpretation of $variables inside programs run from a script

Hi, I am running a shell script that executes a program. Inside this program, variables are also referenced using a dollar symbol, eg. $a, $thething, and the shell script is misinterpreting them as variables relevant to the shell script rather than relevant to the program run from inside the... (2 Replies)
Discussion started by: TheBigH
2 Replies

6. UNIX for Dummies Questions & Answers

How to access/run c programs on Putty?

Hi all, I wrote a couple noobie programs and had them compiled over Putty (using gcc), but I don't know what command I should use to run them. Please assume that I'm a complete noob when it comes to programming and putty commands. Thank you for your help! (1 Reply)
Discussion started by: Recycalable
1 Replies

7. UNIX for Dummies Questions & Answers

Are programs like sys_open( ) ,sys_read( ) et al examples of system level programs ?

Are the programs written on schedulers ,thread library , process management, memory management, et al called systems programs ? How are they different from the programs that implement functions like open() , printf() , scanf() , read() .. they have a prefix sys_open, sys_close, sys_read etc , right... (1 Reply)
Discussion started by: vishwamitra
1 Replies

8. Solaris

how to compile and run java programs

Hi, I have installed Solaris 10 on a VMware. How to compile a java program as there is no javac in 'bin' directory. Thanks in advance for answers and sorry if the question is soo basic. (3 Replies)
Discussion started by: mayahari
3 Replies

9. Programming

Can C determine which OS it's being compiled on?

Hello all! I've searched the archives, google, documentation and I can't seem to find any answer regarding my question. Our code has to be lint free and due to the following lint warning ---> logical expression always true: op "||" <--- we are forced to #include <note.h > (which appears to be... (3 Replies)
Discussion started by: quattro20v
3 Replies

10. Programming

How to compile and run C++ programs in UNIX environment?

:( :confused: Does anybody here know how to compile and run C++ programs in UNIX enviroment? I am so confused. Any help on this would be greatly appreciated! Thanks! (5 Replies)
Discussion started by: Kahuashi
5 Replies
Login or Register to Ask a Question