Code::Blocks Forums

User forums => Help => Topic started by: Anonymous on February 17, 2005, 03:07:44 pm

Title: "Command execution failed..."
Post by: Anonymous on February 17, 2005, 03:07:44 pm
First, thanks to developers for great IDE.

Second, problem:
I'm truing to compile wxWidgets from codeblocks, using Microsoft Visual C++ Toolkit 2003 compiler. I imported project, changed secttings apporiately, etc, it mostly compiles. But:
After compiling quite many files (but not all), i get  "Command execution failed..." error

I tried starting compiling again, and got that:
Code

Project   : wxWindows
Compiler  : Microsoft Visual C++ Toolkit 2003 (called directly)
Directory : C:\wxWindows-2.4.2\src\
--------------------------------------------------------------------------------
Switching to target: default
Command execution failed...


What exactly it means, and what to do with it? Seems that it's codeblocks-related thing.
Title: Re: "Command execution failed..."
Post by: prr on February 17, 2005, 04:33:35 pm
Hi
in Setting/Configure Plugins/Compiler
select the correct compiler,
click on the "Other" tab and
set "Compiler Logging" combo to "Full Command Line"
than post again the compiler log

tnx, walter
Title: "Command execution failed..."
Post by: Anonymous on February 17, 2005, 04:38:06 pm
Fixed it... rc wasn't in path. Thanks for "full command line" tip.
Title: "Command execution failed..."
Post by: mandrav on February 17, 2005, 06:02:38 pm
When "Command execution failed" appears, switch to the "Code::Blocks Debug" message tab. It contains the failed command line.
To display this tab, if it is not visible, go to Settings/Environment (you will have to restart CB to show it).

Yiannis.
Title: "Command execution failed..."
Post by: mandrav on February 17, 2005, 06:08:25 pm
Another thing: I wanted to create a project file for wx compilation but haven't found the time yet. If you succeed and you want to contribute, send me the working project file you created so that I can put it on a web page (along with project files for other compilers). I was planning on putting together a small HOWTO for wx compilation, but this would simplify things a lot...

Today I created the GCC project file for wx :)

Thanks,
Yiannis.
Title: "Command execution failed..."
Post by: Anonymous on February 18, 2005, 12:11:29 am
thanks again.

I finally compiled wx from commandline using make with bat file i wrote:

Code

set WXWIN=X:\
set MSVC=C:\Program Files\Microsoft Visual C++ Toolkit 2003
set MSSDK=C:\Program Files\Microsoft SDK
set INCLUDE=%MSVC%\include;%MSSDK%\include
set LIB=%MSVC%\lib;%MSSDK%\lib
set PATH=%MSVC%\bin;%MSSDK%\bin;%MSSDK%\bin\win64;%PATH%
rem  create fake drive x:
rem ntsubst x: C:\wxWindows-2.4.2
subst  x: C:\wxWindows-2.4.2
x:
cd \src
rem you need to get nmake and rc from somewhere. IIRC i used ones from msvc6.0
rem nmake -f makefile.vc FINAL=1 cleanall
nmake -f makefile.vc FINAL=1 BUILD=release SHARED=1 RUNTIME_LIBS=dynamic all
rem nmake -f makefile.vc FINAL=1 BUILD=release SHARED=0 RUNTIME_LIBS=dynamic all


But i haven't sucesed to compile DLL yet, only statically linked lib. Some piece of wx documentation is missing so i don't sure how to compile DLL

Maybe i'll copypaste some compiler parameters from makefiles and try compiling it from code::blocks again. I had to do it to compile demos and samples to work with static lib.
Title: "Command execution failed..."
Post by: mandrav on February 18, 2005, 09:00:06 am
Quote
But i haven't sucesed to compile DLL yet, only statically linked lib

You just have to add WXMAKINGDLL=1 in the nmake command line  :mrgreen:

Yiannis.
Title: "Command execution failed..."
Post by: Anonymous on February 18, 2005, 11:06:47 am
Tried that... Looked at makefiles today, and found mistake in src/makefile.vc , it contains
Code

cd msw
nmake -f makefile.vc FINAL=$(FINAL)
cd $(THISDIR)

and WXMAKINGDLL is not passed any further, heh.

Invoked src/msw/makefile.vc directl, got "missing delayimp.lib"... removed delayed DLL loading stuff and compiled ok. Examples works. (except always needed to remove odbc32.lib and odbccp32.lib from linker options . Have no idea why everyone link with unnecessary libs...)
Title: "Command execution failed..."
Post by: Anonymous on February 18, 2005, 11:15:29 am
BTW, i found small bug:

When importing microsoft visual c++ project, it asks what compiler to use. I choose "microsoft visual c++ toolkit 2003" . Then it asks to "convert compiler/linker command line switches to GCC's switches , yes/no?" . I choose "no" . Then i open project->build options , and see that while in project settings itself, visual c++ toolkit is selected, in "default target" ,GCC is selected. It prevents things from compiling.
Title: "Command execution failed..."
Post by: mandrav on February 18, 2005, 12:13:56 pm
I 'll fix this asap. Thanks.

Yiannis.