makefile problem. should be simple for advanced users [message #90002] |
Wed, 17 December 2003 12:50  |
Eclipse User |
|
|
|
Originally posted by: usenet.risse.org
Hi.
I just tried to install CDT and the mingw compiler to be able to code my
C (in this case not C++) stuff in Eclipse.
Neraly everything worked well, because i followed this really detailed
example here:
http://www.cs.umanitoba.ca/~eclipse/7-EclipseCDT.pdf
But when starting to build my project it happens. Somehow there is a
bug in the makefile, because Eclipse says:
Eclipse Error:
------------------------------------------------------------
Error launching builder (mingw32-make ?f c:\dev\HelloWorldC\makefile.txt
clean all ) (Exec error:Launching failed)
------------------------------------------------------------
Well. I rechecked all file and paths twice. Rechecked that I did
everything as explained, but it didnt work. gcc is in the path
and according to the tutorial setup appropriately and i used
tabs as explained in the cdt wiki wiki.
The Makefile:
------------------------------------------------------------
main : main.o
gcc -o main main.o -L C:/Programme/MinGW/lib/gcc-lib/mingw32/3.2.3/
-lstdc++
main.o : main.c
gcc -ggdb -c main.c
all :
${MAKE} main
clean :
-del main.o
------------------------------------------------------------
Somehow it seems this is a common Problem. I would love not to be in
need to do all this manually each time. Maybe there are Wizards for this
or we could cycle around makefiles by using Apache's Ant?
Setup:
------------------------------------------------------------
MS Windows XP Pro. (Jeah, I know - I know :)
Eclipse Platform 2.1.2
Eclipse CDT 1.2.0
MinGW 3.2.3
------------------------------------------------------------
Would be lovely if anyone could guide my though this last
step!! Seems like a dream to be able to code all my stuff
in one IDE. Keep going!
Yours,
--Matthias
|
|
|
Re: makefile problem. should be simple for advanced users [message #90046 is a reply to message #90002] |
Wed, 17 December 2003 16:36  |
Eclipse User |
|
|
|
Matthias H. Risse wrote:
>
> Hi.
>
> I just tried to install CDT and the mingw compiler to be able to code my
> C (in this case not C++) stuff in Eclipse.
>
> Neraly everything worked well, because i followed this really detailed
> example here:
>
> http://www.cs.umanitoba.ca/~eclipse/7-EclipseCDT.pdf
>
> But when starting to build my project it happens. Somehow there is a
> bug in the makefile, because Eclipse says:
>
>
> Eclipse Error:
> ------------------------------------------------------------
> Error launching builder (mingw32-make ?f c:\dev\HelloWorldC\makefile.txt
> clean all ) (Exec error:Launching failed)
> ------------------------------------------------------------
Just name the Makefile 'Makefile', without extension. Then you won't
need to say '-f <my_damn_long_path_to_the_makefile>'. make automatically
picks up Makefiles when they are called 'Makefile'.
Is that '?f' there written by your mail program or is that in your
build-command line?
>
> Well. I rechecked all file and paths twice. Rechecked that I did
> everything as explained, but it didnt work. gcc is in the path
> and according to the tutorial setup appropriately and i used
> tabs as explained in the cdt wiki wiki.
>
>
> The Makefile:
> ------------------------------------------------------------
> main : main.o
> gcc -o main main.o -L C:/Programme/MinGW/lib/gcc-lib/mingw32/3.2.3/ -lstdc++
1.) If you make plain C you don't need stdc++.
2.) When writing plain C use gcc, when writing C++ use g++ to compile,
and when doing so, throw that -L<mingw-path> and -lstdc++ in the above
line away. It's set by default from the two frontends. You only need to
set this specifically when doing more strange things in C/C++ like using
custom startup libraries.
3.) You executable will most likely be named main.exe instead of just
main (isn't that the windows way of executables naming?)
> main.o : main.c
> gcc -ggdb -c main.c
> all :
> ${MAKE} main
Again, Windows programs end in .exe.
> clean :
> -del main.o
And you usually want to clean the executable too. (-del main.exe main.o)
> ------------------------------------------------------------
>
>
> Somehow it seems this is a common Problem. I would love not to be in
> need to do all this manually each time. Maybe there are Wizards for this
> or we could cycle around makefiles by using Apache's Ant?
Why not using the Managed Make Builder, instead of Standard Make?
>
>
> Setup:
> ------------------------------------------------------------
> MS Windows XP Pro. (Jeah, I know - I know :)
> Eclipse Platform 2.1.2
> Eclipse CDT 1.2.0
> MinGW 3.2.3
> ------------------------------------------------------------
>
>
> Would be lovely if anyone could guide my though this last
> step!! Seems like a dream to be able to code all my stuff
> in one IDE. Keep going!
>
>
> Yours,
> --Matthias
>
Keep reading! ;)
Henning
|
|
|
Powered by
FUDForum. Page generated in 0.03194 seconds