Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Error while building codeblocks src code
anandamu16:
C:\Users\zbcqcm>gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/5.3.0/lto-wrapper.exe
Target: mingw32
Configured with: ../src/gcc-5.3.0/configure --build=x86_64-pc-linux-gnu --host=m
ingw32 --prefix=/mingw --disable-win32-registry --target=mingw32 --with-arch=i58
6 --enable-languages=c,c++,objc,obj-c++,fortran,ada --enable-static --enable-sha
red --enable-threads --with-dwarf2 --disable-sjlj-exceptions --enable-version-sp
ecific-runtime-libs --with-libintl-prefix=/mingw --enable-libstdcxx-debug --with
-tune=generic --enable-libgomp --disable-libvtv --enable-nls : (reconfigured) ..
/src/gcc-5.3.0/configure --build=x86_64-pc-linux-gnu --host=mingw32 --prefix=/mi
ngw --disable-win32-registry --target=mingw32 --with-arch=i586 --enable-language
s=c,c++,objc,obj-c++,fortran,ada --enable-static --enable-shared --enable-thread
s --with-dwarf2 --disable-sjlj-exceptions --enable-version-specific-runtime-libs
--with-libiconv-prefix=/mingw --with-libintl-prefix=/mingw --enable-libstdcxx-d
ebug --with-tune=generic --enable-libgomp --disable-libvtv --enable-nls
Thread model: win32
gcc version 5.3.0 (GCC)
ollydbg:
OK, I never see this error.
It looks like you are using a MinGW based GCC compiler (Not MinGW-w64based). Maybe the value _WIN32_WINNT is not correctly defined.
You can use the Macro debugging tool to see what is it's value. See http://stackoverflow.com/a/10227059/154911
stahta01:
--- Quote from: ollydbg on March 10, 2017, 03:11:43 pm ---OK, I never see this error.
It looks like you are using a MinGW based GCC compiler (Not MinGW-w64based). Maybe the value _WIN32_WINNT is not correctly defined.
You can use the Macro debugging tool to see what is it's value. See http://stackoverflow.com/a/10227059/154911
--- End quote ---
It likely too low of a value. As I told the last person with this question set to a good value.
Like below in the Project target define area of Compiler Settings.
--- Code: ---_WIN32_WINNT=0x0601
--- End code ---
Edit: Looks like the normal CB way is to set WINVER instead of _WIN32_WINNT directly.
--- Code: ---WINVER=0x0501
--- End code ---
Tim S.
anandamu16:
ok.
So you mean to say I should explicitly define it as
--- Quote ---_WIN32_WINNT=0x0601
--- End quote ---
"project->Build Options->Compiler Settings-> Defines"
I will try it. Thanks :)
Also any idea for this error ?
--- Quote ---Hi,
I am trying to build codeblocks src code. But whenever I try to build it, it shows me error in app.cpp file.
Is this error common to all or I am the one getting it. I have added a screenshot for reference
Build Log:
Code:
-------------- Build: src in Code::Blocks wx2.8.x (compiler: GNU GCC Compiler)---------------
mingw32-g++.exe -Wall -g -pipe -mthreads -fmessage-length=0 -fexceptions -Winvalid-pch -Wno-unused-local-typedefs -std=gnu++11 -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DcbDEBUG -DCB_PRECOMP -DWX_PRECOMP -DwxUSE_UNICODE -DBUILDING_PLUGIN -Wno-deprecated-declarations -Wno-unused-local-typedefs -std=gnu++11 -iquote.objs\include -I.objs\include -I. -IC:\wxMSW-2.8.12\wxMSW-2.8.12\include -IC:\wxMSW-2.8.12\wxMSW-2.8.12\lib\gcc_dll\mswu -Isdk\wxscintilla\include -Isdk\wxpropgrid\include -Iinclude\tinyxml -IC:\MinGW\include -Iinclude -Iinclude\scripting\include -Iinclude\scripting\sqplus -Iinclude\mozilla_chardet -Iinclude\mozilla_chardet\mfbt -Iinclude\mozilla_chardet\nsprpub\pr\include -Iinclude\mozilla_chardet\xpcom -Iinclude\mozilla_chardet\xpcom\base -Iinclude\mozilla_chardet\xpcom\glue -Iexchndl\win32\include -IC:\wxMSW-2.8.12\wxMSW-2.8.12\lib\gcc_dll\mswud -IC:\MinGW\include -ID:\nebo\codeblocks_wit_extra_feature\src\sdk\wxscintilla\include -ID:\nebo\codeblocks_wit_extra_feature\src\include -ID:\nebo\codeblocks_wit_extra_feature\src\include\tinyxml -c D:\nebo\codeblocks_wit_extra_feature\src\src\app.cpp -o .objs\src\app.o
D:\nebo\codeblocks_wit_extra_feature\src\src\app.cpp: In function 'void EnableLFH()':
D:\nebo\codeblocks_wit_extra_feature\src\src\app.cpp:822:62: error: 'HEAP_INFORMATION_CLASS' has not been declared
typedef BOOL (WINAPI *HeapSetInformation_t)(HANDLE, HEAP_INFORMATION_CLASS, PVOID, SIZE_T);
^
D:\nebo\codeblocks_wit_extra_feature\src\src\app.cpp:838:47: error: 'HeapCompatibilityInformation' was not declared in this scope
HeapSetInformation_func(h, HeapCompatibilityInformation, &HeapFragValue, sizeof(HeapFragValue));
^
Process terminated with status 1 (0 minute(s), 17 second(s))
2 error(s), 0 warning(s) (0 minute(s), 17 second(s))
On checking the location where HEAP_INFORMATION is defined, I get to know that it is defined in C;\MINGW\include\winnt.h. I am including this path in compiler (search directories/compiler -> C:\MINGW\include). But still this error is continued to come.
P.S: Yes, I have included winnt.h header file in app.cpp
But if I copy the HEAP_INFORMATION_CLASS enum from file "winnt.h" and paste it inside "app.cpp" it starts working fine.
Why I am experiencing this strange behaviour, Any idea?
--- End quote ---
sodev:
Fix your includes! You are including mswu and mswud subdirectories of wxWidgets, this is plain wrong, you must not specify them from two different build configurations. Plus you are including directories from two different CodeBlocks trees, one set uses relative paths, the other absolute paths to something on drive D.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version