Making a project without a main.cpp file ?

General questions regarding the usage of CodeLite

Making a project without a main.cpp file ?

Postby Nosferax on Fri Feb 05, 2010 9:00 pm

Hi,

I can't make a project without a main.cpp file... Say I wanted to put the main function in a different file called project.cpp ... I get the following error

Code: Select all
*** No rule to make target `main.cpp', needed by `Debug/main.o'.  Stop.


Is it bad practice to put the main function in a different file? Is there a way around this?

Thanks!
Nox
Nosferax
 
Posts: 15
Joined: Fri Feb 05, 2010 2:59 am

Re: Making a project without a main.cpp file ?

Postby eranif on Sat Feb 06, 2010 2:58 am

Did you renamed the main.cpp file into something else?
If you did, a "rebuild" will fix this

Eran
User avatar
eranif
Site Admin
 
Posts: 1876
Joined: Wed Feb 06, 2008 7:29 pm

Re: Making a project without a main.cpp file ?

Postby Nosferax on Sun Feb 07, 2010 9:27 pm

Toying a bit with the files got me around this.

But at first, no I didn't rename the file main.cpp to notmain.cpp. I simply erased main.cpp and added premade files into the directory. Once I renamed notmain.cpp back to main.cpp and then back to notmain.cpp it worked.
Nosferax
 
Posts: 15
Joined: Fri Feb 05, 2010 2:59 am


Return to Using CodeLite

Who is online

Users browsing this forum: No registered users and 1 guest

cron