CodeWarrior 6.4: "the file stdlib.h cannot be opened"

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

CodeWarrior 6.4: "the file stdlib.h cannot be opened"

5,676 Views
Ioline
Contributor I

Hello, I am a total newbie when it comes to CodeWarrior.  I have run across a problem in one of our very old projects.  The project compiles fine with CodeWarrior 6.4.  However, when I try and delete a file from the project screen, and then add it back, it claims it cannot find stdlib.h.  I find this odd cause it can find stdio.h, which is located in the same folder.

Can anyone help?

Labels (1)
0 Kudos
5 Replies

1,198 Views
J2MEJediMaster
Specialist I
OK, I'm guessing that you're using CodeWarrior for ColdFire 6.4. What version of CodeWarrior made the project that you're working with? It sounds like you're having a file path problem (that is, the information used to find header files in the directory trees).

First, check and see if the source file you're working with doesn't have a directory path--or part of one--hard-coded into it for stdlib.h. If it does, edit that out. If not, proceed a follows:

1) Make a copy of the old project directory and all of its files.
2) Open it with CW ColdFire 6.4.
3) Choose Remove Object Code.
4) Choose Reset Project Entry Paths.
5) Choose Re-search for Files.
6) Try building the project now.

Steps 4 and 5 essentially purge the project of its old directory tree info, and forces the IDE to look for these files again. The reason for making the duplicate project is in case this attempt makes things worse, you can always start over with the old one.

---Tom
0 Kudos

1,199 Views
tkvenki
Contributor III
I had the same problem.
But I got the solution by changing the access path.

THanks :smileyhappy:
0 Kudos

1,199 Views
Ioline
Contributor I

Thanks for your help...

 

Yes-I am using CodeWarrior for ColdFire 6.4.  I have no idea what version of CodeWarrior made the original project, as the code I am working with is many years old.  I just recently tried porting the code to 7.0 (later had to settle with 6.4).

 

The source file with the problem simply uses:

 

 #include <stdlib.h>

 

I tried removing the object code, resetting the entry paths, and re-searching for files (in that order).  I still get the same error.  I tried adding the compiler directory (MSL folder) to the project paths, and it still can’t find the file.

0 Kudos

1,199 Views
CrasyCat
Specialist III
Hello
 
Can you try the following:
  - Close CodeWarrior
  - Open a Windows Explorer
  - Browse for your project directory (location of the .mcp file).
  - Delete the data folder(called <Project>_Data, where <project> stands for your project name).
 
  - Restart CodeWarrior and try to build. Is it working better?
 - Can you also check your target AccessPaths directory. Do you have something like
   {Compiler}\E68K_Support\msl\MSL_C\MSL_Common\Include in the System Paths?
 
CrasyCat
0 Kudos

1,199 Views
Ioline
Contributor I
Forgot to say, but deleting the project data folder seemed to work.  Thanks!


Message Edited by Ioline on 2008-07-17 05:39 PM
0 Kudos