Issues compiling for Release vs Debug

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

Issues compiling for Release vs Debug

218 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by tss on Fri Aug 01 09:15:06 MST 2014
Hello everyone.

I'm trying to compile a project using LPCXpresso for Release, and I am getting a linker error because not all the code is getting compiled in Release, whereas it is on Debug.

Basically, I have code in {Project Dir}/driver/ that are all compiled during the "make all" phase when compiling for Debug.
When I compile for Release, the "make all" phase does not compile these files and therefore when it goes to compile my main program I get lots of linker errors for functions in those files that were skipped.

I have "Automatically generate makefiles" enabled, and checked the makefiles left behind in /Debug and /Release after running the compiles. I noticed that the Release makefile does not have the line "-include driver/subdir.mk" included, so I assume this is the issue.

I've gone over the build settings for Release and Debug several times, and can find nothing different (other than things you would expect, such as debug verbosity level) so I am not sure what is causing this line to be omitted from the automatically generated makefile for Release.

If anyone has any information for me on this, it'd be greatly appreciated!
0 Kudos
1 Reply

181 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Fri Aug 01 11:19:19 MST 2014
So it sounds like you must have missed a setting somewhere in project properties, such that the Release build is missing something that is there for Debug. Go through each pane in the Project Properties, switching between Debug and Release whilst on each pane, and double check the differences.

Another possibility is that your "driver" folder, or the individual files within it, may be excluded from the Release build.

http://www.lpcware.com/content/faq/lpcxpresso/project-vs-file-properties

You are just going to have to do some careful comparisons - or else export and post your project.

http://www.lpcware.com/content/faq/lpcxpresso/how-importexport-projects

Regards,
LPCXpresso Support
0 Kudos