GLUT: Fatal Error: out of memory - c++

I have an opengl implementation that runs fine on my desktop.
But even though i have it set up the exact same way on my laptop i get an "out of memory" error when i try to run it.
it is strange because on my desktop the application only takes up 200mb ram and i have 2gb available on the laptop
any ideas what might cause this?
btw im running the application through Visual Studio 2012 Ultimate and using the glut setup suggested in the first answer of this post: How to fix this Error: #include <gl/glut.h> "Cannot open source file gl/glut.h"

Check the encoding of your file
(http://lists.apple.com/archives/mac-opengl/2006/Jun/msg00070.html)
Ensure you're using the same runtime environment
(have you installed the same glut.dll on your laptop?)
Finally, I have a question:
What do you mean "running the application through Visual Studio"? Do you hit Ctrl+F5?

I found the solution, it is rather dumb.
I had set up "main" as "Entry Point" in "Project Preferences -> Linker -> Advanced" because it was necessary on my desktop.
I removed this so i had a blank "Entry Point" and my code runs fine ^^
posting in case someone needs this info

Related

How do I fix a 'cannot open source file' error on MS Visual Studio 2022

Forgive me if I leave out important information, I'm a brand new programmer, and this is my first time using Stack Overflow.
I just downloaded MS Visual Studio, and was testing it by making a basic Console App that outputs "Hello world", but when I tried to run the program, it gave me a message that said "There were build errors. Would you like to continue and run the last successful build?" Then, when I pressed yes I got 478 errors, nearly all of which were "E1696 cannot open source file "filename"", or, "E0282 global source has no "filename"." Is there anyone who has encountered a similar problem, and if so, do you know what is causing it / how to fix it?

Why doesn't the c++ file run in visual studio

So I tried making a basic game on the console using screen buffers, I was able to create it and make a square move in the canvas, but for my next project I looked up a website with the ASCII characters and pasted a couple into a comment at the end of the c++ file, when I ran the file visual studio prompted:
I clicked yes and it didn't run anymore.
Also I recently have installed an extension for visual studio (before it didn't run, the extension works fine but I don't know if the extension may have caused this as I didn't tried running it with the extension downloaded and applied), when I open visual studio and open a file it says:
The last record in the ActivityLog xml file, has a type of error and it's description is:
Microsoft.VisualStudio.Composition.CompositionFailedException: Expected 1 export(s) with contract name "Microsoft.VisualStudio.CppSvc.Internal.CodeAnalysis.ICodeAnalysisService" but found 0 after applying applicable constraints.
at Microsoft.VisualStudio.Composition.ExportProvider.GetExports(ImportDefinition importDefinition)
at Microsoft.VisualStudio.Composition.ExportProvider.GetExports[T,TMetadataView](String contractName, ImportCardinality cardinality)
at
Microsoft.VisualStudio.Composition.ExportProvider.GetExport[T,TMetadataView](String contractName)
at
Microsoft.VisualStudio.Composition.ExportProvider.GetExport[T](String contractName)
at
Microsoft.VisualStudio.Composition.ExportProvider.GetExportT
at
Microsoft.VisualStudio.Composition.ExportProvider.GetExportedValueT
at Microsoft.VisualStudio.ComponentModelHost.ComponentModel.GetServiceT
at Microsoft.VisualStudio.VC.ManagedInterop.<>c.<Initialize>b__52_15()
at
System.Lazy`1.CreateValue()
at
System.Lazy`1.LazyInitValue()
at
System.Lazy`1.get_Value()
at
Microsoft.VisualStudio.VC.CodeAnalysis.ResultTaggerProvider.CreateTagger[T](ITextBuffer buffer)
at
Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1.GatherTaggers(ITextBuffer textBuffer)
--- End of stack trace from previous location where exception was thrown ---
at
Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
I have Visual Studio 2017
So why does running the file (with the local windows debugger button) say that there were build errors? And how can I fix it?
When it prompts the build error, and I click no it usually shows the errors but in this case it doesn't, yes will just run the last "successful" build (although I haven't changed the file since I have finished it before this error message started popping up)
Also there is no error in my code as I was able to run it before the build error kept appearing and I haven't touched the file since(only now to show the problems are)
Thanks for your time! if anything was unclear because of my English, comment and I'll try to clarify it
I fixed the error by deleting ComponentModelChache folder located at:
C:\Users\%userName%\AppData\Local\Microsoft\VisualStudio\15.0
15.0 is the version of your visual studio so it varies depending on the version you're using, %userName% is a replacement for the user you're logged in as

C++ Builder 10.3.3 [ilink32 Error] Fatal: Could not open .\Win32\Debug\TabbedApplication.exe (program still running?)

In C++Builder 10.3.3, when running my application, it stops the process and pops up with an error:
Unable to create process: Access denied
I don't know why this happens, and for the life of me I can't figure out what it is talking about.
I tried to build the solution to see if the error was occurring there, and it appears this is the case. After building the solution, the compiler stops the process and a fatal error pops up:
[ilink32 Error] Fatal: Could not open.\Win32\Debug\TabbedApplication.exe (program still running?)
Does anyone know what this error means, and how to fix it?
I added a new target platform in my project in the right
I added windows 64 bit and it worked
hope it helps
I've been getting this messages for months (even with previous verions of RAD studio) and i haven't found a solution yet.
I have used a process explorer and the process is not running but if i close and reopen the IDE the file is not locked anymore.
So i think the problem it's related with the "debugger" that stills is locking the file even when the IDE stopped the debugging process.
I have tried even the "unlocker" utility but it doesn't detect any process is locking the file ...
For know we have to wait until the debugger release the file.
These is the configuration i have tried in the registry:
HKCU\Software\Embarcadero\BDS\20.0\Debugging\Embarcadero Debuggers\Evaluators
[dedfault] REG_SZ dcc32260.dll
com32x.dll REG_SZ -1
dcc32260.dll REG_SZ 0

LNK1168: cannot open debug\file.exe for writing

I have qt project but if I edit my code, Qt creator throws out this error
:-1: error: LNK1168: cannot open debug\GettingStarted.exe for writing
I'm not able even to delete the debug folder (i.e. as an administrator). I have to log off and then come back. What is the problem and how can I solve it?
Go to the task manager Ctrl+Alt+Del.
look for the name of your running application in your case GettingStarted.exe.
right click --> end process or just press Suppr . This will kill the running process.
Go back to your code and run the application again
In my simple case (Qt only, no external libs, same error LNK1168) the Task manager showed nothing useful to kill.
Only total reboot has helped and error is gone.
All the methods mentioned here has not helped except reboot. There is no any ProjectName.exe in Task Manager.
You can go to C:\Users\user-name\source\repos\ProjectName\Debug\ folder and rename ProjectName.exe. You can't delete this file at that time, but It can be renamed. It can only be deleted after reboot.
I know this is an old thread but I was stumbling in the same problem also. Finding it in task manager is tricky, and I started to grow tired of having to restart my PC every time this happened.
A solution would be to download Process Explorer and there you can search for running tasks. In my case I was having the following error:
1>LINK : fatal error LNK1168: cannot open C:Out\Build\VS12_app\Debug\platform_test.exe for writing [C:Build\VS12_app\platform_test.vcxproj]
I searched for C:Out\Build\VS12_app\Debug\platform_test.exe in Process Explorer, killed it and I was able to compile.

"Cannot Open a.exe" Error in C++

I'm trying to compile my C++ program, but when I press the "Build" button, it displays the following error message:
c:/gnat/2010/bin/../libexec/gcc/i686-pc-mingw32/4.3.6/ld.exe:
cannot open output file a.exe: Invalid
argument collect2: ld returned 1 exit
status
This is not the first time it has done this. It seems to do this most when I have been editing the same project a lot and building it often, almost as if something has been flooded, or overloaded, or something.
I had fixed it before, I believe, by restarting my PC, but I can't afford to keep restarting my PC every time this occurs.
I thought this was just a one-time problem, but it has continued to happen and so I thought I'd look for more help on this.
I found another SO question that I thought had the same error message/problem as I had. However, when I tried the solutions listed on afore-linked question, nothing helped.
Has anyone else had this issue? Or does anyone know how I can fix this issue (besides restarting my computer every time)?
I am developing in jGrasp also, if that helps any.
EDIT: I just wanted to add that I thought it might be that my previous executable was still running in the background, but even if I close my IDE, it still won't let me delete the executable, because it says it is still running.
I checked my process explorer to see if the a.exe was still running, but there's absolutely nothing in my processes that has to do with jGrasp or a.exe
I guess your executable is still running. It's the only reason I think about... I guess the best is to check on your task manager (process Explorer is your friend ;)).
In Visual Studio Code, go to Settings -> Search for "clear previous" in the search bar and check on the box named "clear previous output". :)
It is happening because your previous output is already running in the background. And VS Code offers a feature to close that on every run.
EDIT: it's nothing to do with collect2.exe.
Do you get any other error text, like for example 'permission denied errors' etc.
http://max.berger.name/howto/cdt/ar01s05.jsp
It is beacause the .exe is still running. If you're on Windows use the command line del -f a.exe and if you're on linux use rm -rf ./a.out
I have the same problem, was worried for hours. I disabled my avg antivirus and it worked.