LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-18-2008, 03:35 AM   #1
emab
LQ Newbie
 
Registered: Aug 2008
Posts: 12

Rep: Reputation: 0
Question Kdevelop doesn't compile my c++ program


Recently i've installed KDevelop to compile my c++ programs easily!
I can compile and make exe file bye command easily(format of my drive is Ext3):

+------------------------------------------------+
| |
|omid@linux-z0yp:~/src> g++ -o test test.cpp |
|omid@linux-z0yp:~/src> ./test |
|Hello world! |
| |
+------------------------------------------------+

but i can't copile with KDevelop! it says:

+---------------------------------------------------------------+
| |
|> installing -c |
|> checking wether build envirounment is sane... yes |
|> checking for a thread-safe mkdir -p... /bin/mkdir -p |
|> checking for gawk... gawk |
|> checking wether make sets $(MAKE)... yes |
|> checking for C++ compiler default output fle name... |
|> configure: error: C++ compiler cannot create executables |
|> see 'config.log' for more details |
|>*** Exited with status: 77 *** |
| |
+---------------------------------------------------------------+

i think i must change some of its options... if will be really pleasant if anybody can help me!
Thanks
 
Old 08-18-2008, 04:12 AM   #2
emab
LQ Newbie
 
Registered: Aug 2008
Posts: 12

Original Poster
Rep: Reputation: 0
Continue

here is my config.log
Code:
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by configure, which was
generated by GNU Autoconf 2.61.  Invocation command line was

  $ /home/omid/test/configure 

## --------- ##
## Platform. ##
## --------- ##

hostname = linux-z0yp
uname -m = i686
uname -r = 2.6.25.5-1.1-pae
uname -s = Linux
uname -v = #1 SMP 2008-06-07 01:55:22 +0200

/usr/bin/uname -p = unknown
/bin/uname -X     = unknown

/bin/arch              = i686
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo      = unknown
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /usr/bin
PATH: /sbin
PATH: /usr/sbin
PATH: /usr/local/sbin
PATH: /opt/kde3/sbin
PATH: /root/bin
PATH: /usr/local/bin
PATH: /bin
PATH: /usr/bin/X11
PATH: /usr/X11R6/bin
PATH: /usr/games
PATH: /opt/kde3/bin
PATH: /usr/lib/jvm/jre/bin
PATH: /usr/lib/mit/bin
PATH: /usr/lib/mit/sbin
PATH: /usr/lib/qt3/bin


## ----------- ##
## Core tests. ##
## ----------- ##

configure:1971: checking for a BSD-compatible install
configure:2027: result: /usr/bin/install -c
configure:2038: checking whether build environment is sane
configure:2081: result: yes
configure:2109: checking for a thread-safe mkdir -p
configure:2148: result: /bin/mkdir -p
configure:2161: checking for gawk
configure:2177: found /usr/bin/gawk
configure:2188: result: gawk
configure:2199: checking whether make sets $(MAKE)
configure:2220: result: yes
configure:2531: checking for C++ compiler version
configure:2538: i586-mingw32msvc-c++ --version >&5
/home/omid/test/configure: line 2539: i586-mingw32msvc-c++: command not found
configure:2541: $? = 127
configure:2548: i586-mingw32msvc-c++ -v >&5
/home/omid/test/configure: line 2549: i586-mingw32msvc-c++: command not found
configure:2551: $? = 127
configure:2558: i586-mingw32msvc-c++ -V >&5
/home/omid/test/configure: line 2559: i586-mingw32msvc-c++: command not found
configure:2561: $? = 127
configure:2584: checking for C++ compiler default output file name
configure:2611: i586-mingw32msvc-c++    conftest.cpp  >&5
/home/omid/test/configure: line 2612: i586-mingw32msvc-c++: command not found
configure:2614: $? = 127
configure:2652: result: 
configure: failed program was:
| /* confdefs.h.  */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "test"
| #define VERSION "0.1"
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:2659: error: C++ compiler cannot create executables
See `config.log' for more details.

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_env_CCC_set=
ac_cv_env_CCC_value=
ac_cv_env_CC_set=set
ac_cv_env_CC_value=i586-mingw32msvc-c
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_CXXCPP_set=
ac_cv_env_CXXCPP_value=
ac_cv_env_CXXFLAGS_set=
ac_cv_env_CXXFLAGS_value=
ac_cv_env_CXX_set=set
ac_cv_env_CXX_value=i586-mingw32msvc-c++
ac_cv_env_F77_set=
ac_cv_env_F77_value=
ac_cv_env_FFLAGS_set=
ac_cv_env_FFLAGS_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_path_install='/usr/bin/install -c'
ac_cv_path_mkdir=/bin/mkdir
ac_cv_prog_AWK=gawk
ac_cv_prog_make_make_set=yes

## ----------------- ##
## Output variables. ##
## ----------------- ##

ACLOCAL='${SHELL} /home/omid/test/missing --run aclocal-1.10'
AMDEPBACKSLASH=''
AMDEP_FALSE=''
AMDEP_TRUE=''
AMTAR='${SHELL} /home/omid/test/missing --run tar'
AR=''
AUTOCONF='${SHELL} /home/omid/test/missing --run autoconf'
AUTOHEADER='${SHELL} /home/omid/test/missing --run autoheader'
AUTOMAKE='${SHELL} /home/omid/test/missing --run automake-1.10'
AWK='gawk'
CC='i586-mingw32msvc-c'
CCDEPMODE=''
CFLAGS=''
CPP=''
CPPFLAGS=''
CXX='i586-mingw32msvc-c++'
CXXCPP=''
CXXDEPMODE=''
CXXFLAGS=''
CYGPATH_W='echo'
DEFS=''
DEPDIR=''
DSYMUTIL=''
ECHO='echo'
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
EXEEXT=''
F77=''
FFLAGS=''
GREP=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
LDFLAGS=''
LIBOBJS=''
LIBS=''
LIBTOOL=''
LN_S=''
LTLIBOBJS=''
MAKEINFO='${SHELL} /home/omid/test/missing --run makeinfo'
NMEDIT=''
OBJEXT=''
PACKAGE='test'
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
RANLIB=''
SED=''
SET_MAKE=''
SHELL='/bin/sh'
STRIP=''
VERSION='0.1'
ac_ct_CC=''
ac_ct_CXX=''
ac_ct_F77=''
am__fastdepCC_FALSE=''
am__fastdepCC_TRUE=''
am__fastdepCXX_FALSE=''
am__fastdepCXX_TRUE=''
am__include=''
am__isrc=''
am__leading_dot='.'
am__quote=''
am__tar='${AMTAR} chof - "$$tardir"'
am__untar='${AMTAR} xf -'
bindir='${exec_prefix}/bin'
build=''
build_alias=''
build_cpu=''
build_os=''
build_vendor=''
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE}'
dvidir='${docdir}'
exec_prefix='NONE'
host=''
host_alias=''
host_cpu=''
host_os=''
host_vendor=''
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh='$(SHELL) /home/omid/test/install-sh'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
mkdir_p='/bin/mkdir -p'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='NONE'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

#define PACKAGE_NAME ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PACKAGE_STRING ""
#define PACKAGE_BUGREPORT ""
#define PACKAGE "test"
#define VERSION "0.1"

configure: exit 77
i think the problem is here:

Code:
configure:2531: checking for C++ compiler version
configure:2538: i586-mingw32msvc-c++ --version >&5
/home/omid/test/configure: line 2539: i586-mingw32msvc-c++: command not found
configure:2541: $? = 127
configure:2548: i586-mingw32msvc-c++ -v >&5
/home/omid/test/configure: line 2549: i586-mingw32msvc-c++: command not found
configure:2551: $? = 127
configure:2558: i586-mingw32msvc-c++ -V >&5
/home/omid/test/configure: line 2559: i586-mingw32msvc-c++: command not found
configure:2561: $? = 127
configure:2584: checking for C++ compiler default output file name
configure:2611: i586-mingw32msvc-c++    conftest.cpp  >&5
/home/omid/test/configure: line 2612: i586-mingw32msvc-c++: command not found
configure:2614: $? = 127
configure:2652: result: 
configure: failed program was:

wat should i do?!

Last edited by emab; 08-18-2008 at 04:15 AM.
 
Old 08-18-2008, 06:01 AM   #3
graemef
Senior Member
 
Registered: Nov 2005
Location: Hanoi
Distribution: Fedora 13, Ubuntu 10.04
Posts: 2,379

Rep: Reputation: 148Reputation: 148
When you selected the project type I suspect that you requested win32, hence the request for the i586-mingw32msvc-c++ compiler.

You may be able to change this (without having to create a new project) by going to Project > Project Options > Configure Options > C++ and select the compiler you wish to use.
 
Old 08-18-2008, 02:25 PM   #4
emab
LQ Newbie
 
Registered: Aug 2008
Posts: 12

Original Poster
Rep: Reputation: 0
Lightbulb Thank u

Thank u, thank u, thank u... :-*


I just entered "g++" as compiler command in C++ tab
 
Old 08-18-2008, 05:55 PM   #5
graemef
Senior Member
 
Registered: Nov 2005
Location: Hanoi
Distribution: Fedora 13, Ubuntu 10.04
Posts: 2,379

Rep: Reputation: 148Reputation: 148
No worries, now you can start to enjoy the occasional frustrations of C++
 
Old 08-18-2008, 08:07 PM   #6
ta0kira
Senior Member
 
Registered: Sep 2004
Distribution: FreeBSD 9.1, Kubuntu 12.10
Posts: 3,078

Rep: Reputation: Disabled
If you want to write console applications in Linux for Windows, you can compile the final .exe after testing in Linux with DJGPP. This will allow you to use most glibc functions in Windows, but it won't do Windows GUIs. It's really a great program if you have console applications that don't have dependencies other than the standard Linux C functions, plus you don't have to go through the headache of creating a Windows cross-compiler.
ta0kira

PS DJGPP runs under Windows, so you'd have to transfer your code to Windows from Linux for the final step. I think you need to install some version of make and maybe bash for it to work with KDevelop projects, so maybe if you have a really simple application! Admittedly not the solution for most projects, but a great solution for some, like command-line tools.

Last edited by ta0kira; 08-18-2008 at 08:10 PM.
 
  


Reply



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
kdevelop 3.5.1 won't compile binarybob0001 Linux - Software 2 11-19-2008 11:09 AM
can't compile kdevelop from source gaddargarson Slackware 5 06-30-2006 06:08 AM
Kdevelop saying I can't compile C++ programs tmchardy Programming 6 03-08-2006 08:45 PM
kdevelop compile problems Phalloides Linux - Software 0 01-22-2005 09:04 AM
kdevelop doesn't run the programs I compile frogbert Linux - Software 2 12-10-2004 04:02 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:44 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
Open Source Consulting | Domain Registration