LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-09-2004, 02:57 PM   #16
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,570

Rep: Reputation: 171Reputation: 171

The problem is that the command:
Code:
gcc -o conftest -march=athlon-tbird -mcpu=athlon-tbird -Os -s -pipe -fomit-frame-pointer -DNDEBUG -DG_DISABLE_ASSERT /usr/local/lib conftest.c 1>&5
is wrong. '/usr/local/lib' should not be there. I think it may be connected with your environmental variables. Could you please post results of:
echo $CFLAGS
echo $LDFLAGS
echo $CC
 
Old 10-10-2004, 05:52 AM   #17
eomerek
LQ Newbie
 
Registered: Aug 2003
Location: Warsaw, Poland
Distribution: Mandrake 10
Posts: 18

Original Poster
Rep: Reputation: 0
Code:
[root@xxx root]# echo $CFLAGS
-march=athlon-tbird -mcpu=athlon-tbird -Os -s -pipe -fomit-frame-pointer -DNDEBUG -DG_DISABLE_ASSERT
[root@xxx root]# echo $LDFLAGS
/usr/local/lib
[root@xxx root]# echo $CC

[root@xxx root]#
So what should I have in '$LDFLAGS'?? Can I make it empty??
 
Old 10-10-2004, 10:05 AM   #18
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,284

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
Yes, just 'unset LDFLAGS' from the command prompt should do the trick.
 
Old 10-10-2004, 02:26 PM   #19
eomerek
LQ Newbie
 
Registered: Aug 2003
Location: Warsaw, Poland
Distribution: Mandrake 10
Posts: 18

Original Poster
Rep: Reputation: 0
Whoooaa! Everything works! It was so simple....
THANKS!!!
 
Old 06-13-2006, 02:30 PM   #20
will824
Member
 
Registered: Jun 2003
Location: Medellin Colombia
Distribution: Gentoo
Posts: 35

Rep: Reputation: 15
This worked out for me

I had the same problem and in my case it went away when I removed
-ftree-vectorize
from the CFLAGS in /etc/make.conf

Hope this helps
 
Old 02-22-2007, 12:58 AM   #21
diggity_55
LQ Newbie
 
Registered: Feb 2007
Posts: 2

Rep: Reputation: 0
I just installed Ubuntu 6.10 and fixed this problem by installing libc6-dev as described in http://www.ubuntuforums.org/showthread.php?t=190193

It looks like development libraries aren't installed by default in Ubuntu. That makes sense, but I had assumed otherwise after finding gcc was installed.
 
Old 02-25-2007, 08:34 PM   #22
elsint
LQ Newbie
 
Registered: Feb 2007
Posts: 1

Rep: Reputation: 0
Quote:
Originally Posted by diggity_55
I just installed Ubuntu 6.10 and fixed this problem by installing libc6-dev as described in

It looks like development libraries aren't installed by default in Ubuntu. That makes sense, but I had assumed otherwise after finding gcc was installed.
Indeed,

I had the same problem when compiling PHP5,

I'm using OpenSUSE 10.2; I installed C++ developer libraries and that resolved the problem.

Thanks for the posts here.
 
Old 04-20-2007, 10:55 AM   #23
RedNeckTech
LQ Newbie
 
Registered: Jun 2006
Location: Below the Mason-Dixon Line
Posts: 3

Rep: Reputation: 0
Similar problem different fix

I also received the error "C compiler cannot create executables" while setting up Squid on a Slackware distro. The problem turned out to be that I didn't install the GNU C Libraries package. I used Slackware's package tool to install glibc-2.3.5-i486-5 from slackware/l on the iso, and everything worked just fine. I hope this helps someone!
 
Old 05-04-2007, 07:22 PM   #24
mirex
LQ Newbie
 
Registered: May 2007
Posts: 3

Rep: Reputation: 0
Hi

this can be caused by many problems, as this error is probably meaning that output executable target file cannot be created for some reason.

In my case right now it was caused by wrong compiler parameter.
I use KDevelop for unix (c++ dev tool).

After output "see config.log" I went to look at it; I missed the correct one, as there was one in project directory, which is not the correct one; correct one for me was in /debug/ subdirectory, because I was building Debug target.

inside I searched for the error message, "cannot create executables" and I saw that I was compiling my program with command:
gcc -o target _UNIX -D _UNIX ... something more

problem in my case was the first "_UNIX", which is invalid parameter for compiler. I realized that I have entered it incorrectly into Linker flags in KDevelopment project options. After I removed it everything compiled allright. (second, -D _UNIX is correct, as it specifies something like #define _UNIX for compiler)

So I suggest to see the config.log for your project and find the problem inside it. It can take some time.
 
Old 08-19-2007, 12:32 AM   #25
Justin.Buser
LQ Newbie
 
Registered: Aug 2007
Posts: 4

Rep: Reputation: 0
gcc c++ support

gcc doesn't come with a c++ compiler by default, never listen to all these retards who are telling you to do this that and the other thing. People tend to like to answer questions even if they don't really know the answer:

yum install gcc-c++

Last edited by Justin.Buser; 08-19-2007 at 12:33 AM.
 
Old 01-08-2008, 02:08 AM   #26
osjak
LQ Newbie
 
Registered: Mar 2007
Posts: 5

Rep: Reputation: 0
Quote:
Originally Posted by Justin.Buser View Post
gcc doesn't come with a c++ compiler by default, never listen to all these retards who are telling you to do this that and the other thing. People tend to like to answer questions even if they don't really know the answer:

yum install gcc-c++
This did it. Thank you!
 
Old 02-03-2008, 12:59 AM   #27
trebek
Member
 
Registered: Feb 2005
Location: Costa Rica
Distribution: Ubuntu, gOS, Debian & Slack 12
Posts: 426

Rep: Reputation: 30
I am facing the same problem right now, trying to install the simple musictracker plugin to pidgin. Weird thing is, i've compiled stuff in that same location, cause it's where i download and keep all the installers. I will try to install this libc-dev to see what happens, must be similar to that debian package, cause i am using kubuntu 7.10 at the moment.

Hope everyone figures it out to.

Hey there again, didn't want to make another post since mine was the last. Good news!!! The problem was solved. I looked up libc-dev with apt and the result showed a package called libc6-dev, which i assumed had to be the right one for my distribution, and probably the 6 meant that it was some version of the package. Anyways, it went on by and just ran into another problem that i will not mention here, cause it's got nothing to do with this.

Thanks for the help. U all kick ass!!!

Last edited by trebek; 02-03-2008 at 01:04 AM.
 
Old 12-03-2008, 12:07 PM   #28
carlosrp
LQ Newbie
 
Registered: Oct 2004
Location: Asunción
Distribution: SuSE
Posts: 1

Rep: Reputation: 0
I had the same problem and solved it by installing the package gcc-c++ (at least that's its name under opensuse11.0).

Hope it works for you.
 
Old 12-13-2010, 09:14 AM   #29
saif iqbal
LQ Newbie
 
Registered: Dec 2010
Posts: 1

Rep: Reputation: 0
Unhappy my problem

#include<iostream>
using namespace std;
int main()
int machine1[15];
int machine2[15];
{
cout<<"machine1"<<endl;
cin>>machine1;
cout<<"machine2"<<endl;
cin>>machine2;
}
{
sum M1=sumM1+Machine1[i].
sum M2=sumM2+Machine2[i].
return 0;}




this programme made me. but it is not running. plz help me. how can i run this programme.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
C compiler cannot create executables packets Linux - Security 3 05-03-2010 05:30 PM
C++ compiler cannot create executables notmatt Linux - Newbie 4 09-30-2004 07:59 AM
C compiler cannot create executables w0lv3rin3 Linux - Software 4 08-07-2004 10:44 AM
My C compiler cannot create executables, help rbmako69 Linux - Software 15 06-16-2004 02:22 PM
C compiler cannot create executables londonboi Debian 2 09-23-2003 02:41 AM


All times are GMT -5. The time now is 08:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration