Author Topic: It seems that this file...  (Read 5894 times)

Offline fonderkarma113

  • Single posting newcomer
  • *
  • Posts: 3
It seems that this file...
« on: December 08, 2014, 08:56:32 am »
Good evening,

Sorry for posting about this topic but I cannot find anything useful, and to be honest, I'm fairly new with, well everything, including forums. So, sorry if this is infringing upon the guidelines posted.

I receive the prompt "It seems that this file has not yet been built" and am unable to "compile" (uncertain with any terminology). I select "yes" and nothing happens aside from receiving the prompt again.

I tried my best to search the forums on the problem some users run into regarding "It seems that this file has not yet been built." prompt appearing over and over, but haven't managed to find anything applicable to me or worse, apply said information to my problem.

Here are some of the results I found from my search:

1) http://forums.codeblocks.org/index.php/topic,14789.msg99151.html#msg99151
2) http://forums.codeblocks.org/index.php/topic,16045.0.html
3) http://forums.codeblocks.org/index.php/topic,18545.msg126914.html#msg126914
4) http://forums.codeblocks.org/index.php/topic,18602.msg127366.html#msg127366

I just re-downloaded the program this morning after encountering aforementioned problem. I downloaded the binary release codeblocks-13.12mingw-setup.exe from Sourceforge.net.
I actually acquired Code: :Blocks some time in September and had no problems with it then, but I got busy with school then illness and had to put it on hold. Obviously, when I came back to it last night I ran into problems.

I am very uncertain with what I should/can try to do. Any and all help would be greatly appreciaed, thank you for your time.

Offline eckard_klotz

  • Almost regular
  • **
  • Posts: 201
Re: It seems that this file...
« Reply #1 on: December 08, 2014, 11:01:42 am »
Hello Fonderkarma113.

I think I had this message some-when in the past. But I'm not able to remember under what conditions and the information, you gave, makes it not easy to get a clear picture about your case.

How ever, I assume that this is a message of your build-executable (what means the compiler or linker). You have seen it as build-message but you should see it also in the build log. In this 2 tabs you will find more information about the context (file, line, parameters used to call the compiler or linker, ...) where the problem occurs. This may give you a hint.

Quote
"It seems that this file has not yet been built" and am unable to "compile"

I assume that this is a message of the compiler.
  • Before a source-file will be compiled, the compiler tries to compare the time-stamp of the associated object-file with the time-stamp of the source and the included headers. In the case that the object-file exists and is younger than its defining sources, the source will not be compiled again to save build-time.
  • So the first part of the message tells you that the object-file was not found. What is not really a problem since this usually happens if you build your sources the very first time or you cleaned your object-folders.
  • But it means that the files have to be compiled now and this is only possible if all necessary sources are known by the compiler and can be found from it.
  • I think the message that the tool is "unable to compile" means that the compiler is not able to find the source.

In the case my guess is right, what can you do?
  • Since the the build-tools are called by Code::Blocks it is essential, that you ensure that all your project-sources are known by Code::Blocks with their real name and location. You can check this in the project browser. In the case that a file was moved or renamed you will get a changed symbol a disrupted piece of paper.
  • Perhaps the name of a folder or file was changed (maybe for accident) and now it contains a space around the dot you can not see.
  • May be you have changed the attachment (c <-> cpp).
  • You may have changed cases (upper case <-> lower case) for some letters.
  • An other possibility is that the name of the file or folder now contains a lower case "L" instead of an upper case "i" (l != I)
    or an upper case "o" instead of a Zero  (O != 0).
  • If you are working in a greater project and the source, you want to compile, was given by an other programmer, it may be that he decided to move the content to other files and to delete the source from the project. So the file will be removed, if you resynchronize sandbox (if you use a source integrity tool like SVN or MKS or ...).
  • May be you will get the same, if you have no access-rights to a net folder or a folder created by an other user on your computer.
  • ...


I hope this gives you some ideas, where to search for the reason of your problems. If this brings no access than pleas try to find some information from the provider of your build-tool (compiler, linker,...) to learn what the messages really mean.

Best regards,
                      Eckard.


 

Offline fonderkarma113

  • Single posting newcomer
  • *
  • Posts: 3
Re: It seems that this file...
« Reply #2 on: December 08, 2014, 04:41:44 pm »
Hello Eckard,

Thanks for the reply.   :)

And sorry I was fairly vague, I made the assumption this problem was well-known and more of an annoyance for senior members.

Here is a screen-cap of the problem (this is also a "technique" I have only recently learned, hahaha):

http://i.imgur.com/BVie7rm.png

Selecting "Yes", seems to do nothing other than immediately bring up the prompt again.

Selecting "No", brings up this command prompt: http://i.imgur.com/peZPvqS.png , which if I follow the "instructions" brings me here: http://i.imgur.com/bNiFlRe.png .

Selecting "Cancel", closes the prompt and nothing noticeable occurs.

I should mention I am an extreme beginner (some people may recognize that message) and am fairly computer-illiterate.

But I believe the problem is encountered when I try to run/compile the uh, program. No prompt/error appears when I select build.

I looked through all of your suggestions (thank you for those), but the problem occurs on a brand new file, as in I don't think there were any instances of file corruption/etc.
Also, as you can see the coding (correct term?) is ridiculously simple so I'm assuming the problem isn't there either. (I double-checked that line 5 ends with a semi-colon as some image quality was lost.)

I should also mention I had some difficulty acquiring a "compiler" (?) when I re-downloaded Code: :Blocks, but should have one, assuming the steps I mentioned in my first post included one.

I downloaded the binary release codeblocks-13.12mingw-setup.exe from Sourceforge.net.

Can't think of anything else to add. Thanks again for your time and help.  :-X

Offline eckard_klotz

  • Almost regular
  • **
  • Posts: 201
Re: It seems that this file...
« Reply #3 on: December 08, 2014, 05:31:12 pm »
Hello Fonderkarma113.

Your screen shot showed me where to search for the reason. Your file is only called test1 without an attachment.
Try it out with the attachment test1.c or test1.cpp and it should result in the behaviour you expect.

Using the right file attachment is a very important thing since the build-tool decides usually what kind of compiler should be used by evaluating the attachment.
  • .c    results in a simple c-compilation and cpp keywords like namespace or class will be reported as errors
  • .cpp results in a cpp-compilation and some codings possible in c are not allowed anymore (for example calculations with enums)
  • .pas results in a pascal-compilation as long as your tool-suit supports this other programming language
  • but what kind of compiler should be used without an attachment ?

Don't forget Code::Blocks is only the editor and it can be used for diverse programming languages. Thus its on you to ensure that the build tools know what to do. Furthermore I recommend you to work with a project in the workspace what is still empty in your screen shot. If you are really new in programming, than use the project-wizard to set up  a simple not empty console-application that comes along with a "hello world" source.

Some pages should find your interest:

I hope this solves your current problem and helps for the next steps.

Best regards,
                      Eckard.

Offline fonderkarma113

  • Single posting newcomer
  • *
  • Posts: 3
Re: It seems that this file...
« Reply #4 on: December 08, 2014, 08:10:03 pm »
Good morning Eckard,

It worked!  :D I ended the file name with .c and everything turned out just fine.

Can't believe it was that "simple". I can tell you right now I would've never figured that out.

Thanks a lot Eckard, I will definitely be sure to look at those links you posted. That tutorial definitely sounds helpful, hahahaha.
I'll get right on it... When I wake up, haha, time for bed.

Here is the culmination of all your guidance, Eckard: http://i.imgur.com/zgGRGdo.png

Now to not make SkyNet! Just kidding, enough bad jokes. Thanks again, and good night.  :)