TEMPLATE = app
CONFIG += console
CONFIG -= app_bundle
CONFIG -= qt
SOURCES += main.cpp
QMAKE_LFLAGS += /LARGEADDRESSAWARE
do i just have to put this in the .pro file of my project "main"?
TEMPLATE = app
CONFIG += console
CONFIG -= app_bundle
CONFIG -= qt
SOURCES += main.cpp
QMAKE_LFLAGS += /LARGEADDRESSAWARE
do i just have to put this in the .pro file of my project "main"?
If you are running on a 32-bit Windows system then you will not be able to allocate 4GB either in a single block or in pieces: your process is limited to 3GB:
http://msdn.microsoft.com/en-us/libr...#memory_limits
If you are running a 64-bit Windows executable then you should not need to do anything special.
i have a 64 bit operating system, but the program still crashes
Added after 29 minutes:
I am using QTCREATOR, btw.
Last edited by bmn; 22nd February 2014 at 20:07.
A 64-bit operating system is not the same as a 64-bit executable. A 32-bit executable on a 64-bit OS has the same limits as a 32-bit application on a 32-bit OS.
Assuming you are actually running a 64-bit executable then it may be there is no contiguous block of 4GB to allocate, that you are using structures with 32-bit int size limits, that you doing something unrelated that crashes... My crystal ball is out for polishing. Perhaps you could share what your program is doing, where and how it "crashes"?
This has nothing to do with QtCreator, which is just a fancy text editor that can run your code through a C++ compiler.
Last edited by ChrisW67; 22nd February 2014 at 23:20.
Bookmarks