Using different MinGW version problem

General questions regarding the usage of CodeLite
nezos
CodeLite Veteran
Posts: 59
Joined: Wed Dec 31, 2014 6:36 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Using different MinGW version problem

Post by nezos »

If i set the active the active project compiler to CodeLite 4.8.1 and run the command through the shell it compiles with no errors.

If i change the compiler to 4.9.1

I rerun the command:
X:\MyPrograms\_codelitehello>C:\Windows\System32\cmd.exe /c "X:\MyPrograms\Dev\MinGW-4.8.1\bin\mingw32-make.exe -e -f Makefile"
"----------Building project:[ codelitehello - Debug ]----------"
mingw32-make[1]: Entering directory 'X:/MyPrograms/codelitehello'
a messagebox appears : Title("collect2.exe - Application Error"), Msg("The application was unable to start correctly (0xc000007b). Click OK to close the application.

and then the usual:
codelitehello.mk:76: recipe for target 'Debug/main.cpp.o.d' failed
mingw32-make[1]: *** [Debug/main.cpp.o.d] Error 1
mingw32-make[1]: Leaving directory 'X:/MyPrograms/codelitehello'
Makefile:4: recipe for target 'All' failed
mingw32-make: *** [All] Error 2
To my understanding, somehow the makefile works only with the Codelite provided compiler. The only thing i can imagine is that the code behind it

I also tried to put the codelite path to the windows %PATH%, still nothing.
Last edited by nezos on Thu Jan 01, 2015 1:38 am, edited 1 time in total.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Using different MinGW version problem

Post by eranif »

nezos wrote:codelitehello.mk:76: recipe for target 'Debug/main.cpp.o.d' failed
mingw32-make[1]: *** [Debug/main.cpp.o.d] Error 1
mingw32-make[1]: Leaving directory 'X:/MyPrograms/codelitehello'
Makefile:4: recipe for target 'All' failed
mingw32-make: *** [All] Error 2
Is this the output from the CMD? or when running from within codelite?
If this is from within codelite, can you try to run the build from within a CMD shell opened from _within_ codelite (see the image attached in my previous post)

Can you also attach the generated makefile? (note ,there are 2 makefiles: one named "Makefile" and the other one should be codelitehello.mk - post them both here)

Eran
Make sure you have read the HOW TO POST thread
nezos
CodeLite Veteran
Posts: 59
Joined: Wed Dec 31, 2014 6:36 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Using different MinGW version problem

Post by nezos »

The makefiles:
codelitehello.txt
Makefile.txt
The output i posted was from the shell window i opened from within codelite.
You do not have the required permissions to view the files attached to this post.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Using different MinGW version problem

Post by eranif »

nezos wrote:The output i posted was from the shell window i opened from within codelite.
It looks truncated. Can you post the entire output ? (starting from the build command until it ends)

Eran
Make sure you have read the HOW TO POST thread
nezos
CodeLite Veteran
Posts: 59
Joined: Wed Dec 31, 2014 6:36 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Using different MinGW version problem

Post by nezos »

It was truncated cause a messagebox appeared during the execution. Here it is as a whole:
X:\MyPrograms\codelitehello>C:\Windows\System32\cmd.exe /c "X:\AeroFS\MyPrograms\Dev\MinGW-4.8.1\bin\mingw32-make.exe -e -f Makefile"
"----------Building project:[ codelitehello - Debug ]----------"
mingw32-make[1]: Entering directory 'X:/MyPrograms/codelitehello'
codelitehello.mk:96: recipe for target 'Debug/main.cpp.o.d' failed
mingw32-make[1]: *** [Debug/main.cpp.o.d] Error 1
mingw32-make[1]: Leaving directory 'X:/MyPrograms/codelitehello'
Makefile:4: recipe for target 'All' failed
mingw32-make: *** [All] Error 2
Strange thing is this time the messagebox title mentioned cc1plus.exe with the same error message.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Using different MinGW version problem

Post by eranif »

Can you post a download link for the this toolchain? I would like to download it and install it here for testing

Eran
Make sure you have read the HOW TO POST thread
nezos
CodeLite Veteran
Posts: 59
Joined: Wed Dec 31, 2014 6:36 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Using different MinGW version problem

Post by nezos »

The file is x86_64-4.9.1-release-posix-seh-rt_v3-rev3.7z

can be downloaded from:
http://sourceforge.net/projects/mingw-w ... posix/seh/
direct link:
http://sourceforge.net/projects/mingw-w ... z/download

I also tried a newer version, getting the same problem:

File: x86_64-4.9.2-release-posix-seh-rt_v3-rev1.7z
download from: http://sourceforge.net/projects/mingw-w ... posix/seh/
Direct link: http://sourceforge.net/projects/mingw-w ... z/download
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Using different MinGW version problem

Post by eranif »

Your toolchain is broken (a bit) there is nothing wrong with codelite :P

Some of the binaries from the download link you provided are trying to load 32bit DLLs which will result in error code (0xc000007b)
For example: try double clicking on this binary in the installation folder you have (open windows explorer and d-click it):

X:/MinGW/libexec\gcc\x86_64-w64-mingw32\4.9.2\cc1obj.exe

Running depends.exe on this executable shows that it tried to load LIBWINPTHREAD-1.DLL of 32 bit this caused the error 0xc000007b

Two ways to fix this:
1. Within codelite, set the bin folder to be the first in path by adding this: Settings->Environment variables

Code: Select all

PATH=X:\MinGW\bin;$PATH
-- OR --
2. Copy the binary X:\MinGW\bin\LIBWINPTHREAD-1.DLL and place it inside this folder: X:\MinGW\libexec\gcc\x86_64-w64-mingw32\4.9.2

This should fix your problem ( I tried both methods and it worked for me )
Another thing, if you wish to debug your program you should also update the compiler toolchain to point to the 64 bit version of gdb:
Settings->Build Settings->Compiler-><your compiler> -> Gdb
and set it to:

Code: Select all

X:\MinGW\bin\gdb.exe
Eran
Make sure you have read the HOW TO POST thread
nezos
CodeLite Veteran
Posts: 59
Joined: Wed Dec 31, 2014 6:36 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Using different MinGW version problem

Post by nezos »

Thank you very much Eran, it worked by adding the path to the environment parameters.

It seems though that codelite does not take into account the system settings. I tried to build a wxwidgets project. Although i had defined in the system settings WXCFG and WXWIN, only after adding them to the environment parameters build successfuly.

But, i bumped to another, last i hope, problem. The produced exe file cannot be run. I used dependency walker to check why i got the "Debugger exited with the following error string: During startup program exited with code 0xc0000135". I found that the 32bit version of COMCTL32.DLL is referenced! Do i need to alter an option in codelite or a manifest or something where i can define that i need a 64bit built? Any last, i hope, ideas.

PS: By clicking the OK button after altering the options does not always save the changes i make! I might need 2 or 3 times to save any changes. Pressing the apply button usually helps.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Using different MinGW version problem

Post by eranif »

nezos wrote: is referenced! Do i need to alter an option in codelite or a manifest or something where i can define that i need a 64bit built? Any last, i hope, ideas
There is nothing in codelite that affects this.
This simply means that one of your DLLs requires a 32 bit DLL (for some reason...) Which DLL requires it?

Make sure you are using the correct version of depends (you must use the 64 bit version or else you will get wrong results)
How did you build your wxWidgets? is it a self compiled with this toolchain?

I will give it a try when I'll get home (I will build wxWidgets with the 4.9.2 toolchain and see whats the problem)

last:
Can you post here the output of your build?

Eran
Make sure you have read the HOW TO POST thread
Post Reply