News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Keep getting "It seems that this project has not been built yet."

Started by IceColdBeer, July 20, 2010, 02:37:39 PM

Previous topic - Next topic

IceColdBeer

Hi,

I have a project which builds a DLL.     Code blocks is setup to run an executable which loads the DLL.

Each time I hit run, a dialog box appears saying "It seems that this project has not been built yet.   Do you want to build it now?".  I click yes, the project builds successfully.

Hit execute again, then a dialog box appears again saying "It seems that this project has not been built yet.   Do you want to build it now?".

How does Code Blocks determine whether the project has already been built?  As I think there maybe a config file marked read only somewhere.

Thanks.
ICB.




oBFusCATed

(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

IceColdBeer

Quote from: oBFusCATed on July 20, 2010, 05:20:08 PM
OS, CB, Gcc versions please?

Hello,

OS = Windows 7 (32 bit)
CB = 10.05
GCC was installed from MinGW 5.6.1

oBFusCATed

Quote from: IceColdBeer on July 20, 2010, 07:50:41 PM
GCC was installed from MinGW 5.6.1
Try newer gcc, that one might be broken on vista/7, TDM release of the compiler is pretty good, you can try that one.
Also I think your version is 5.1.6...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

IceColdBeer

Yes, typo, I meant MinGW-5.1.6.

Looks like MinGW-5.1.6 is the latest version.

gcc - version 3.4.5 (mingw-vista special r3)
mingw32-make - GNU Make 3.81

I don't think it is a compiller issue as the project compiles and links.  The output DLL is produced successfully.   My question was how CB determines whether the project needs to be built again...

stahta01

IIRC, That message means it can not find the EXE to run.

Edit: See what "Project" -> "Set Program Arguments" setting are.

Edit2: Please try using "Build" instead of "Build and Run" and does the message still appear?

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

IceColdBeer


Quote from: stahta01 on July 21, 2010, 02:30:01 PM
Edit: See what "Project" -> "Set Program Arguments" setting are.

"This target provides the projects main executable" is not ticked.

If I choose Build and then select Run seperately, the problem still occurs.


IceColdBeer

Nothing is failing as the DLL is generated successfully, what I can't understand is why it wants to keep rebuilding it as no source has been updated.

The question is how Code Blocks determines whether to do a rebuild or not?   If it looks at the date the executable created, then it will older than the source because the project is building a DLL and not an EXE.    Is this a bug in Code Blocks?

stahta01

User can not be helped by me; deleted posts to save space.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

IceColdBeer



Turning on compiler logging isn't going to help as the build is successful.

I believe this problem is caused because Code Blocks is looking at the EXE creation date instead of the DLL creation date.

My question was how Code Blocks determines whether to do a rebuild?   Please stop replying with turning on full compiler logging, what has it got to do with the compiler?   The compiler doesn't tell Code Blocks whether to rebuild does it !

If you don't know, please don't post back  - Thanks.

Jenna

Before the message, you should see: "Checking for existence: ...".

Make sure the dll exists in the place C::B looks for it.

EDIT:
And make sure you have no spaces or special characters in the path and the dll is on the same drive as MinGW.

Or better update your MinGW installation (I suggest TDM's build: http://tdm-gcc.tdragon.net/, or the one provided with C::B 10.5 [TDM MinGW gcc4.4]).

IceColdBeer

Quote from: jens on July 21, 2010, 08:08:09 PM
Before the message, you should see: "Checking for existence: ...".

Make sure the dll exists in the place C::B looks for it.

And make sure you have no spaces or special characters in the path and the dll is on the same drive as MinGW.

The DLL name contains no whitespaces or unusual characters.     Putting the DLL on the same drive as MinGW isn't really going to help - but thanks anyway.

Ok, did the following:

1)  Deleted the generated DLL from the previous build.
2)  Build->Clean
3)  Build->Build
4)  ||=== Build finished: 0 errors, 13 warnings ===|
5)  DLL created successfully 22/07/2010 10:43
6)  Go to Build->Run  and:
    "It seems that this project has not been built yet.   Do you want to build it now?"

Quote from: jens on July 21, 2010, 08:08:09 PM
Or better update your MinGW installation (I suggest TDM's build: http://tdm-gcc.tdragon.net/, or the one provided with C::B 10.5 [TDM MinGW gcc4.4]).

We don't even know if MinGW tools are used to determine whether the rebuild needs to be done, so could be a waste of time upgrading.

* * * *

Code Blocks is using a GNU makefile to build the project and displays the following in the build log box when building:
"Using makefile: makefile"

This means I can also build the project outside of Code Blocks by just calling "mingw32-make.exe".

My question was how Code Blocks determines whether to do a rebuild?     Does it use the MinGW tools to check or does it just check the date of the EXE or DLL internally without MinGW?      I don't believe CB is using "mingw32-make.exe" to determine whether to do a rebuild, as it would have to wait for the string "is up to date" from mingw32-make.exe and this would mean starting the build in order to deteremine whether the build was upto date or not.

Jenna

Sorry to say, but it seems you don't really want help.
Quote from: jens on July 21, 2010, 08:08:09 PM
Before the message, you should see: "Checking for existence: ...".

Make sure the dll exists in the place C::B looks for it.
The message "Checking for existence:" is quite clear and tells you how (and where) C::B looks for the dll.
If it is not there, please fix your configuration in the projects properties for the appropriate targets ("Output filename" is where you have to look at).

You did not write that you use a custom makefile until your last post, but this is really important, a makefile does things C::B can not know about, because it bypasses C::B's own build-system.

In my previous post I told you what to do, but it seems you know it better.

Quote from: IceColdBeer on July 22, 2010, 10:53:59 AM
We don't even know if MinGW tools are used to determine whether the rebuild needs to be done, so could be a waste of time upgrading.
Yes, in custom makefile they are used, but theat's not the cause for your problem.

It's a waste of our time, if users who want help do not give important information as it should be done automatically if anyone asks for help (not only here, but in any help forum or any other situation).


IceColdBeer

Yes, I should have mentioned that I was using my own makefile (sorry), but the original question was

Quote from: IceColdBeer on July 20, 2010, 02:37:39 PM
How does Code Blocks determine whether the project has already been built?

I've had a list of responses asking to turn on compiler logging and upgrade the MinGW tools etc.  which has side tracked this thread.

Quote from: jens on July 22, 2010, 12:20:12 PM
Sorry to say, but it seems you don't really want help.

I only wanted to know how Code Blocks determines whether the project has already been built?    Once I know that, I can look into the problem.   I thought I'd be taking to a developer on CB on this thread who could give me a quick answer.

I don't think it something anyone would know unless they'd written that part of the software in CB.

It looks like I'm going to have to live with the message ("It seems that this project has not been built yet.   Do you want to build it now?"), but it's no big deal and can just say no.    

I think Code Blocks is a great piece of Software Engineering :)

Jenna

Quote from: IceColdBeer on July 22, 2010, 12:47:12 PM
I thought I'd be taking to a developer on CB on this thread who could give me a quick answer.

I am a developer of C::B and you still did not do what I told you (and I gave you the answers you asked for):
Quote from: jens on July 22, 2010, 12:20:12 PM
[...]
Quote from: jens on July 21, 2010, 08:08:09 PM
Before the message, you should see: "Checking for existence: ...".

Make sure the dll exists in the place C::B looks for it.
The message "Checking for existence:" is quite clear and tells you how (and where) C::B looks for the dll.
If it is not there, please fix your configuration in the projects properties for the appropriate targets ("Output filename" is where you have to look at).


[...]
Quote from: IceColdBeer on July 22, 2010, 10:53:59 AM
We don't even know if MinGW tools are used to determine whether the rebuild needs to be done, so could be a waste of time upgrading.
Yes, in custom makefile they are used, but theat's not the cause for your problem.
[...]