Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
1 View

Why won't my project build, it used to

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
Highlighted
Black Belt
1 View

It would be more useful to

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.

Steve (aka "Doctor Fortran") - https://stevelionel.com/drfortran
0 Kudos
Highlighted
Beginner
1 View

Thanks, Steve.  I changed

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

0 Kudos
Highlighted
Black Belt
1 View

Now that it builds, the build

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. 

Steve (aka "Doctor Fortran") - https://stevelionel.com/drfortran
0 Kudos
Highlighted
Beginner
1 View

I don't see how it can be the

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?

0 Kudos
Highlighted
Black Belt
1 View

/STACK:50000000

/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.

Steve (aka "Doctor Fortran") - https://stevelionel.com/drfortran
0 Kudos
Highlighted
Beginner
1 View

Is there a way to check how

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.

0 Kudos
Highlighted
Valued Contributor II
1 View

copying run time dll's around

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

 

0 Kudos
Highlighted
Beginner
1 View

The relevant DLL's are my own

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

0 Kudos
Highlighted
Black Belt
1 View

What you did was ok.

What you did was ok.
Steve (aka "Doctor Fortran") - https://stevelionel.com/drfortran
0 Kudos