Unsolved Cant build files
-
I created c project and when i go to add existing file and choose my file.c nothing happened i also try to delete main.c and add again my file and nothing?
-
Hi and welcome to devnet,
How did you create your project ?
-
File / New file or project / non qt project/ plain c application
is it wrong ? Thank you for helping
-
No, that's fine. What exact error are you getting ?
-
I dont get error , i creat project and right click add existing file and nothing change , only main.c is there, i tryed to delete main.c and add existing file again but nothing happend!?
-
This is what i get
20:20:25: Running steps for project untitled2...
20:20:25: Starting: "/usr/bin/make" clean
rm -f C.o Reseni.o Zadaci.o iz.o Chapter.o 9.o -.o Zadatak.o 6.o
rm: invalid option -- '.'
Try 'rm --help' for more information.
Makefile:496: recipe for target 'clean' failed
rm -f *~ core *.core
make: [clean] Error 1 (ignored)
20:20:26: The process "/usr/bin/make" exited normally.
20:20:26: Elapsed time: 00:00. -
Can you show your .pro file ?
-
How can i show .pro file ?
i also got this message.
:-1: error: No rule to make target '../Desktop/C', needed by 'C.o'. Stop.
-
@kzzmzz
Just double click it and it will open. Copy paste it here.Also , you seem to be on linux. You have gcc and build tools installed?
-
TEMPLATE = app
CONFIG += console
CONFIG -= app_bundle
CONFIG -= qtSOURCES += main.c
../Desktop/C Reseni Zadaci iz Knjiga/Chapter-9-Zadatak-6.cyes i have gcc installed
When im making new file everything is ok, i can build, debuge etc
but when i want to add my old c files i cant
-
Just for test.
rename it to
myfile.c and put it next to main.c ( in same folder)
Then add it.
I suspect it might be path related. -
Still nothing
:-1: error: No rule to make target '../Desktop/C', needed by 'C.o'. Stop.
-
But if you renamed the file,
why does it talk
about C.o ?
should be myfile.o or Chapter-9-Zadatak-6.o ? -
I have added another folder on desktop test and i copyed myfile.c and now i can add the file but still cant build or run?
-
@kzzmzz
well it surely works so im not sure why it fails in your setup.
Could u zip your test project and let me see it ? -
At the very least your are missing quotes in your .pro files.
../Desktop/C Reseni Zadaci iz Knjiga/Chapter-9-Zadatak-6.c
each space tells qmake that what follows is a new file hence your errors with the "strange" paths. -
-
22:02:17: Running steps for project Chapter-9-Zadatak-7...
22:02:17: Configuration unchanged, skipping qmake step.
22:02:17: Starting: "/usr/bin/make"
make: *** No rule to make target '../Desktop/C', needed by 'C.o'. Stop.
22:02:17: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project Chapter-9-Zadatak-7 (kit: Desktop Qt 5.6.1 GCC 64bit)
When executing step "Make"
22:02:17: Elapsed time: 00:00 -
Hi
Your project just worked here.
Complaining about you have 2 main functions -
so there must be something wrong with your setup
since it wont compile in your place.Can you create a Default Qt Gui project and run it ?
-
yes i can run default and change it and run again, but the problem is with new files that i want to add. Im still google for solution :)