• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1019
  • Last Modified:

Command line warning D4024

I'm using VC 6.0 with all service packs installed.
I must have done something to the project settings but I can't find what  it is.

When I do a Clean and Re-Build All I get this message twice.

Command line warning D4024 : unrecognized source file type 'WIN32', object file assumed
Command line warning D4027 : source file 'WIN32' ignored

Any idea where to begin on fixing this....

The output exe works fine.
0
hansw77041
Asked:
hansw77041
  • 9
  • 7
  • 4
  • +2
1 Solution
 
jkrCommented:
Well, as the docs put it: http://msdn2.microsoft.com/en-us/library/ms938409.aspx - which file in your project does that apply to?
0
 
jkrCommented:
Hmm, have you tried to to incorporate a file from a different development evnvironemnt (Dev-C++, MinGW) into your Visual Studio project?
0
 
hansw77041Author Commented:
Not that I'm aware of.

The setting I added to the linker options was to increase the stack.

I tried removing the change and the error message did not go away !  I'm also not convinced that it happened when I added the stack size to the linker option because D4024 only appears when I do a Clean and re-build all.  So whatever I did it could have been hours or days before I did a Clean Rebuild all !

I've not added files other than those that Class Wizard adds.  


0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
jkrCommented:
Anyway, when you open your .vcproj file with a text editor, do you find any references to "win32" and what are these? (well, that is, more to  a file extension than a compiler setting(definiton)
0
 
hansw77041Author Commented:
If you mean the sections like this:

<File
                        RelativePath="StdAfx.cpp"
                        >
                        <FileConfiguration
                              Name="Debug|Win32"
                              >
                              <Tool
                                    Name="VCCLCompilerTool"
                                    PreprocessorDefinitions=""
                                    UsePrecompiledHeader="1"
                              />
                        </FileConfiguration>
                        <FileConfiguration
                              Name="Release|Win32"
                              >
                              <Tool
                                    Name="VCCLCompilerTool"
                                    PreprocessorDefinitions=""
                                    UsePrecompiledHeader="1"
                              />
                        </FileConfiguration>

I've stepped through each one and the file mentioned has a .cpp extension.


0
 
evilrixSenior Software Engineer (Avast)Commented:
If you are completely at a loss and looking for a quick solution (no pun intended) it may be simpler just to create a new project file from scratch and add all the existing file. Assuming you've not made any drastic changes to the default project settings this shouldn't be too arduous a task and will, at least, set you back to a common frame of reference.
0
 
hansw77041Author Commented:
OK I'll think about doing that.. however it's a bog project and old... I'd hate to spend time and find out it requires more work to do what you say...

I agree this is an option.
0
 
evilrixSenior Software Engineer (Avast)Commented:
>> I'd hate to spend time and find out it requires more work to do what you say
The thing to do is just give it a try. If you discover it's a big task then abort. Meanwhile, consider posting you project files (in .txt form) here for analysis.
0
 
itsmeandnobodyelseCommented:
If it happens for clear and rebuild-all only, it most likely is because the Debug (or Release) subdirectory of the project contains a file (or directory) named 'WIN32'. The IDE creates some kind of makefile out of the xml data stored in the .vcproj, but there is no rule how to handle files with no extension in case of 'clear'. That's why the first warning comes. The second warning is because the module to actually delete the file refuses it because of the *unknown* file extension.

To get rid of all, you can close your project and delete both Debug and Release subdirectory. With the next build the message should be gone.

Regards, Alex

P.S. check your directories before delete whether they were not (mis)used for other purposes.
0
 
hansw77041Author Commented:
Alex,
OK I tried it. I closed VC and renames the debug and release folders.
Did a rebuild and VC made the new folders.
However this suggestion helped nail down one thing: The Warnings
Command line warning D4024 : unrecognized source file type 'WIN32', object file assumed
Command line warning D4027 : source file 'WIN32' ignored
only happen in Degub Build... I'd not noticed that before. !

0
 
evilrixSenior Software Engineer (Avast)Commented:
Can you post the project file here? Meanwhile, did you try my suggestion of creating a new one?
0
 
hansw77041Author Commented:
No not yet. I'd prefer to understand why rtaher than Shot Gun.
As I mentioned the EXE is OK... so it's just an annoying issue
0
 
evilrixSenior Software Engineer (Avast)Commented:
>> No not yet. I'd prefer to understand why rtaher than Shot Gun.
Well, once you've got a new one you can then diff with the old one to figure out why. This was one of the reasons I suggested it; otherwise, you're just guessing.
0
 
evilrixSenior Software Engineer (Avast)Commented:
...once you have a working project file you can use something like WinMerge to compare new with old to spot where the problem lies.

http://winmerge.org/downloads/index.php
0
 
hansw77041Author Commented:
OK that looks promising... I'll make time for it tonight... got to run.....
0
 
evilrixSenior Software Engineer (Avast)Commented:
>> I'll make time for it tonight... got to run.....
Okidoky. Have a good evening :)
0
 
itsmeandnobodyelseCommented:
>>>> Command line warning D4024 : unrecognized source file type 'WIN32', object file assumed
>>>> Command line warning D4027 : source file 'WIN32' ignored
>>>> only happen in Degub Build... I'd not noticed that before.

Hmmm. Can you make a 'Search in Files' for WIN32 where you only look for the *.vcproj file of the project. I wonder whether the snipet of the project file you posted above *really* is the only occurrence of WIN32 (actually it should repeat for *any* source entry).

What I am (we were) looking for was an entry like

<File
                        RelativePath="Win32"
                        >
                        <FileConfiguration
                              Name="Debug|Win32"
                              >
                              <Tool
                                    Name="xxxx"
                                    PreprocessorDefinitions=""
                                    UsePrecompiledHeader="1"
                              />
                        </FileConfiguration>

where the WIN32 was defined as a 'relative path' (and not in the configuration where WIN32 is ok).

Or post the .vcproj file as already was requested by jkr and evilrix.

Regards, Alex
0
 
hansw77041Author Commented:
I started creating a new project and frankly it turned into a mess. It's not a usable solution as far as I'm concerned.
It maybe OK for someone that has done things like that on a regular basis but it's another learning curve that I just don't need or want.

Post the vcproj file is also not an option.  I tend to use file names that are very verbose and do not want to expose the product that this
code is used with.  I know there are no secrets in it, but anyone reading the vcproj could use some of the file names to do a quick google search the related product and
that I'm not prepared to expose.

So as no one has given a definitive answer as to how to what the issue is an how to fix it quickly,  I'll leave the question open for a while to see if anyone happens
to have solved the problem before.

Thanks for the suggestions.

0
 
evilrixSenior Software Engineer (Avast)Commented:
>> So as no one has given a definitive answer as to how to what the issue is an how to fix it quickly,
Well, without the project file to look at all we can do is conjecture and, as you've seen, that's not very helpful.
0
 
hansw77041Author Commented:
One issue I just realized several people are asking for vcproj file and I found one !  but only because I had at some time i the past inadvertently opened the project with VC2005 (bad mistake)

I did state very clearly in the original message I'm using VC6  

Quote from original question: "I'm using VC 6.0 with all service packs installed. " end quote.

So that led me to taking another approach because I certainly do not want to continue this project in VS2005 (I hate the IDE it sucks, there is no Class Wizard) so I found a more practical solution:

I restored the project from backup until I found the last version that did not produce the error, and then I then copied the the VC project files (.clw.dep.dsp.dsw.mak.ncb.opt.plg.reg)  into the offending current project and the error went away.

Thanks for all the help I think I found a solution although it would have been more informative to know what I did wrong that caused the error!
0
 
itsmeandnobodyelseCommented:
>>>> I did state very clearly in the original message I'm using VC6
It was my fault. I joined the thread after you posted parts of the .vcproj. For a VC6 project the .dsp is the only source for settings and though a converted .vcproj could have 'inherited' the issue, it makes less sense to search for problems in the .vcproj when a .dsp was available.

>>>> Well, without the project file to look at all we can do is conjecture
Indeed. The only reason for us to ask for the project file is that it *most likely* contains a corrupted source definition pointing to a file or directory named 'WIN32'. It is only "most likely" cause there is a rare chance that the .dsp contains a general rule for deleting files where a folder named 'WIN32' was mistaken for a target to delete.

>>>> then I then copied the the VC project files (.clw.dep.dsp.dsw.mak.ncb.opt.plg.reg)  
The .dep.mak.ncb.opt.plg.aps are temporary files that *neither* should  be stored *nor* being restored.

Nevertheless restoring of a backup is a good idea and it gives you the the chance to use Windiff to compare the restored .dsp with the .dsp that caused the error. I would bet some beers that you could find the issue when doing so.



0
 
itsmeandnobodyelseCommented:
>>>> Delete with refund
Hmmm. There were a lot of valid suggestions here in that thread. The author helped himself by restoring a backup, but he stated 'it would have been more informative to know what I did wrong that caused the error!". But, he doesn't give feedback to the further suggestions I made. Then, the wrong posting of a vcproj file was the asker's fault who should have known that VC6 writes a .dsp but not a .vcproj.

Regards, Alex
0
 
NetminderCommented:
Closed, 500 points refunded.
Netminder
Site Admin
0
 
hansw77041Author Commented:
Alex,
To quote you " Then, the wrong posting of a vcproj file was the asker's fault"  

That's BS and does not make any sense at all.

Someone injected a suggestion about vcproj and that was the FAULT OF THE PERSON THAT POSTED THAT SUGGESTION for not reading the Original Question and thread and thereby adding confusion to the whole deal... Hardly my fault.  

If you read the very first line of my question I stated VERY CLEARLY :

"I'm using VC 6.0 with all service packs installed. " 

The Restore from backup fixed this problem.




0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 9
  • 7
  • 4
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now