[ NeznamTkoSam @ 18.02.2005. 22:13 ] @
Kad pokusam kompilirati Managed C++ projekt, uvijek mi se pojavi poruka: (Exec error:Launching failed) ![]() |
[ NeznamTkoSam @ 18.02.2005. 22:13 ] @
[ leka @ 19.02.2005. 16:43 ] @
Pa moras podesiti toolset sa kojim ce CDT raditi. Uglavnom se radi o GNU GCC (MinGW) ili Cygwin-u. Dakle, prosto receno, moras da "naucis" CDT gde se nalazi GNU Make, GNU GCC i GNU Binutils...
Najlakse je da MinGW /bin direktorijum stavis u sistemski PATH... [ NeznamTkoSam @ 19.02.2005. 20:14 ] @
Kada 'build command' postavima na 'C:\Dev-Cpp\bin\mingw32-make.exe', onda se desi ovo:
Citat: **** Incremental build of configuration Debug for project cpp_proj **** C:\Dev-Cpp\bin\mingw32-make.exe all 'Building file: ../main.cpp' C:\Dev-Cpp\bin\mingw32-make.exe -I"C:\Dev-Cpp\include" -O0 -g -Wall -omain.o ../main.cpp C:\Dev-Cpp\bin\mingw32-make.exe: invalid option -- O C:\Dev-Cpp\bin\mingw32-make.exe: invalid option -- 0 C:\Dev-Cpp\bin\mingw32-make.exe: invalid option -- g Usage: C:\Dev-Cpp\bin\mingw32-make.exe [options] [target] ... Options: -b, -m Ignored for compatibility. -B, --always-make Unconditionally make all targets. -C DIRECTORY, --directory=DIRECTORY Change to DIRECTORY before doing anything. -d Print lots of debugging information. --debug[=FLAGS] Print various types of debugging information. -e, --environment-overrides Environment variables override makefiles. -f FILE, --file=FILE, --makefile=FILE Read FILE as a makefile. -h, --help Print this message and exit. -i, --ignore-errors Ignore errors from commands. -I DIRECTORY, --include-dir=DIRECTORY Search DIRECTORY for included makefiles. -j [N], --jobs[=N] Allow N jobs at once; infinite jobs with no arg. -k, --keep-going Keep going when some targets can't be made. -l [N], --load-average[=N], --max-load[=N] Don't start multiple jobs unless load is below N. -n, --just-print, --dry-run, --recon Don't actually run any commands; just print them. -o FILE, --old-file=FILE, --assume-old=FILE Consider FILE to be very old and don't remake it. -p, --print-data-base Print make's internal database. -q, --question Run no commands; exit status says if up to date. -r, --no-builtin-rules Disable the built-in implicit rules. -R, --no-builtin-variables Disable the built-in variable settings. -s, --silent, --quiet Don't echo commands. -S, --no-keep-going, --stop Turns off -k. -t, --touch Touch targets instead of remaking them. -v, --version Print the version number of make and exit. -w, --print-directory Print the current directory. --no-print-directory Turn off -w, even if it was turned on implicitly. -W FILE, --what-if=FILE, --new-file=FILE, --assume-new=FILE Consider FILE to be infinitely new. --warn-undefined-variables Warn when an undefined variable is referenced. This program built for i686-pc-mingw32 Report bugs to <[email protected]> C:\Dev-Cpp\bin\mingw32-make.exe: *** [main.o] Error 2 Build complete for project cpp_proj [ leka @ 19.02.2005. 20:41 ] @
Izgleda da si i za kompajler podesio da "pomrcina" koristi GNU Make: C:\Dev-Cpp\bin\mingw32-make.exe -I"C:\Dev-Cpp\include" -O0 -g -Wall -omain.o ../main.cpp - Za kompajliranje/linkanje naravno treba da podesis da se koristi C:\Dev-Cpp\bin\mingw32-g++.exe ili C:\Dev-Cpp\bin\mingw32-gcc.exe .
[ NeznamTkoSam @ 20.02.2005. 07:33 ] @
Kad stavim na mingw32-gcc.exe, onda mi je output
Citat: **** Full rebuild of configuration Debug for project cpp **** C:\Dev-Cpp\bin\mingw32-gcc.exe clean all mingw32-gcc.exe: clean: No such file or directory mingw32-gcc.exe: all: No such file or directory mingw32-gcc.exe: no input files Build complete for project cpp Citat: **** Full rebuild of configuration Debug for project cpp **** C:\Dev-Cpp\bin\mingw32-g++.exe clean all mingw32-g++.exe: clean: No such file or directory mingw32-g++.exe: all: No such file or directory mingw32-g++.exe: no input files Build complete for project cpp ![]() ![]() ![]() [ leka @ 20.02.2005. 15:04 ] @
Evo kako ja to radim:
1) Ubacim MinGW-ov /bin direktorijum u PATH sistemsku promenljivu: http://dejan.lekic.org/gfx/ss/snimak016.png 2) Iz istog prozora gde sam setovao PATH startujem pomrcinu (Eclipse :) (kao sto se vidi sa slike) 3) U MinGW-ovom /bin direktorijumu NE postoji make.exe, vec mingw32-make.exe (postoji logican razlog za ovo, ali nema potrebe da sada diskutujemo zasto je to tako), tako da se za uspesno "izgradjivanje" (eng. "build") projekta mora podesiti ispravna GNU Make komanda: http://dejan.lekic.org/gfx/ss/snimak013.png 4) Da bi se program izvrsio kako treba treba podesiti Run opcije (ovo nema veze sa MinGW-om zapravo, ali ljudi ne znaju da ovo treba podesiti): http://dejan.lekic.org/gfx/ss/snimak014.png . "ectest" Run konfiguracija se dobije kada se klikne na "New" taster (eng. "button") u Run... dijalogu . Uspesno kompajliran program: http://dejan.lekic.org/gfx/ss/snimak015.png Podesavanje pomrcine bi trebalo da sa manje/vise truda zna SVAKO ko RAZUME kako radi MAKE/KOMPAJLER/LINKER kombinacija. "VisualSTUDIO ljudi" (tacnije svi koji koriste slicne alate) uglavnom ne znaju kako se njihovi projekti kompajliraju, linkaju "ispod haube", tako da uglavnom imaju problema kada im ustreba da nekada nesto podese ili (ne daj Boze) da napisu svoj Makefile i "bildaju" projekat iz konzole... [ NeznamTkoSam @ 20.02.2005. 18:41 ] @
Hvala dejane, iako sam ja to vec rijesio.
Mozes mi jos samo reci zasto, kad ima gresaka u programu, nema nista u prozoru Problems? Copyright (C) 2001-2025 by www.elitesecurity.org. All rights reserved.
|