I have just formatted my PC and installed a fresh version of Developer Studio 3.3(Build Version 3.3.0.201501281210).
I downloaded the applicable OS and Firmware for my old applications but now I get the following error on all NULL entries in all projects an source files the have a NULL used in them:
Symbol ‘NULL’ could not be resolved
My error is different than that in the sense that F3 does not link to the declaration of NULL. So NULL is not declared. If I am correct the declaration should be in stddef.h but never before have I had to declare stddef.h or stdio.h in my SW projects. And I can not find the stddef.h yet.
I could just declare NULL myself, but would prefer having it the old way where NULL is already declared. I am also afraid that the problem will have further repercussions than just the NULL.
Any suggestions on how to fix this? Maybe I have not set some properties correctly?
As always, you are the first to respond…thanks in advance.
I am not exactly sure how I would know, but I guess a compiler error, I will attach a screenshot that might help answer.
I now see some more errors:
Type bool gives the same not resolved error.
Definitions like ADL_PORT_UART1 also give the error if the “Allow heuristic resolutions of includes” is ticked, when unticked they are resolved. NULL and bool still not resolved even when unticked. This setting was suggested as a fix in the previous post I mentioned.
Sorry for the slow reply. I only remember seeing the error in the code itself, not in compiler output. My first Windows 8 re-install was unsuccessful…so I have done a second with Win8.1. I will let you know if the problem is still there after the re-install is complete.
Sorry that could have been a bit misleading. I can’t believe the image inserts don’t work for this site…anyway.
The project is marked with the red X because of the error. Example error line: if(position != NULL)
The line of code is marked, with the NULL underlined in red, and when hovering over the NULL I get the error which is Symbol ‘NULL’ could not be resolved.
But in the Build Console I only see some warning’s like implicit declarations that have not been attended to…
Interesting that in the project explorer view, the only source files marked with errors are the one’s that I have opened. Only after opening the file to view, do the error’s come to light.
Hopefully this helps explain where the error originates?
Thanks for the response. So this is what I am working on:
So step 1 is easy, and it is set to Use active build configuration which if I understand everything correctly is [Target]_ARM_EABI_GCC_DEBUG
Step 2, rebuild the index…how do I do that?
A few extra comments:
I don’t remember having the Release and Debug build config options previously, only remember seeing Debug.
Could this have anything to do with the Java JRE or JDK, and whether they are being utilized correctly?
I have been scratching around to try and fix the error. Tried lots of useless things…but have an update. I would like to understand more of the problem, but have a kind of a solution.
I recreated the project with a new name, copied all the files in src and inc from the old project and hit build. No errors… The only difference, and this is where the problem exists, is the build config. The new project the build config is called Target_GCC_Debug and the old is [Target]_ARM_EABI_GCC_Debug
Maybe the old build config isn’t part of my new version of Dev Studio, but then why was it still part of the project settings? Why could I not select the new build config’s in project properties? Or maybe I am just missing it somewhere…
So I am now trying to fix an old project by adding Target_GCC_Debug to the build config and removing the old EABI config’s. Then rebuild the index. But no success yet
Anyway, I guess I can recreate all my projects and copy the source files and rebuild. Maybe I was just blind to the problem from the beginning that the build config’s that I had didn’t actually exist in this version, but how was I supposed to just see that?
It’s true that default config names were changed between DS 2 ([Target]_ARM_EABI_GCC_Debug) and DS 3 (Target_GCC_Debug) to get something shorter and simpler, but this is only a matter of config names, and I don’t think this is the root cause of your problem.
I guess your project was originally created in DS 2 (any idea with which precise version?), and it just sounds like the indexer is failing to find symbols coming from the toolchain.
We’ll give a try here, just to check if this is an isolated problem or if we can reproduce it.
Did you open DS3 over your old (DS2) workspace or create a completely separate (new) workspace for DS3?
I’ve had some grief in the past when migrating from one version of DS to another - the workspace and metadata used by DS changes between versions and is not backwards compatible.
When I install a new version of DS, I also create a new workspace for that version. I also don’t bother importing the projects - instead I create a new project in the new workspace, then copy the source and include files into the workspace using the operating system tools. It gets a bit tedious so re-create a complex project, but this is the best way I’ve found to avoid the issues when changing versions.