Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
26730 Discussions

Why won't my project build, it used to

Brian_Murphy
New Contributor II
88 Views

I'm using visual studio 2010.  My console project used to build, but I broke it.  I've attached the output from the failed build.  Can someone tell me how to fix it?

I've tried making a 32 bit Debug build with everything set to Debug Multithreaded and it just won't build.

Thanks,

Brian M.

0 Kudos
9 Replies
Steve_Lionel
Black Belt Retired Employee
88 Views

It would be more useful to see the buildlog.htm, The output pane doesn't tell us what it was doing. If I had to guess I'd say that you have the project property Fortran > Libraries > Disable default library search directives set to Yes.

Brian_Murphy
New Contributor II
88 Views

Thanks, Steve.  I changed that setting in the project and its subprojects, and it now builds successfully.  However, when I try to run the console app from inside VS or from a command prompt, I get "the application was unable to start correctly (0cx0150002)".  Do you know what that means?  I've attached the BuildLog.html in case that helps.

Thanks

Steve_Lionel
Black Belt Retired Employee
88 Views

Now that it builds, the build log is less useful. The error you have now has many possible causes. One of the more common is that you've exceeded the 2GB total static code and data limit in Windows. 

Brian_Murphy
New Contributor II
88 Views

I don't see how it can be the 2 GB thing.  It was building and running until I fiddled with some settings trying to get around another problem.  Now that I've tried to go back to what I had, I can't get it to run.  What else could it possibly be?

Steve_Lionel
Black Belt Retired Employee
88 Views

/STACK:50000000

This is the first thing that jumps out at me. It is "only" 50 million, but stack reserve space takes away from the 2GB static code/data. and you may be cutting it too close. This is one of the things that can trigger the error you saw. Try cutting it down to 20000000 and see what happens. I might recommend as an alternative Fortran > Optimization > Heap Arrays > 0. This will reduce stack usage.

What else did you "fiddle" with? It's not fair to withhold such information from us.

Brian_Murphy
New Contributor II
88 Views

Is there a way to check how close it is to the 2GB limit?

I found a different solution.  It was not having the latest DLL files in the EXE's working folder.  The overall project has a console EXE and several supporting DLL's (all fortran).  When I run it from the VS debugger, the working directory is the root folder of the EXE project.  The error message "unable to start correctly" went away after I simply updated the DLL's in that folder with the latest builds.  So as usual, it was self-inflicted pain.  I think I have VS post-build steps copying the DLL's, but those evidently need fixing.

andrew_4619
Honored Contributor I
88 Views

copying run time dll's around is a recipe for a bad meal. Look at this for starters https://software.intel.com/en-us/fortran-compiler-developer-guide-and-reference-redistributing-libraries-when-deploying-applications

 

Brian_Murphy
New Contributor II
88 Views

The relevant DLL's are my own, not the Intel libraries.  So it is my understanding that they must be copied so the EXE can load them at run time. 

If I wanted to embed MY.DLL into the console EXE, how is that done?  I also have A.DLL that calls routines in B.DLL.  If I wanted to embed B.DLL into A.DLL, how is that done?

Thanks

Steve_Lionel
Black Belt Retired Employee
88 Views
What you did was ok.
Reply