This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 183532 - Can't launch any C++ application if MinGW toolchain is selected
Summary: Can't launch any C++ application if MinGW toolchain is selected
Status: VERIFIED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: execution (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P2 normal (vote)
Assignee: Andrew Krasny
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2010-04-06 08:23 UTC by soldatov
Modified: 2010-04-20 09:20 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description soldatov 2010-04-06 08:23:19 UTC
I have Cygwin, MSYS and MinGW on some Windows XP machine

Scenario:
- Create Arguments sample (select MinGW toolchain)
- Run it
==> ok
- Create Welcome sample (select MinGW toolchain)
- Run it
==> run fails

/cygdrive/c/Documents and Settings/tester/My Documents/NetBeansProjects/Welcome
3/dist/Debug/MinGW-Windows/welcome_3.exe: error while loading shared libraries:
libgcc_s_dw2-1.dll: cannot open shared object file: No such file or directory
Press [Enter] to close the terminal ...
Comment 1 soldatov 2010-04-07 14:51:04 UTC
Cygwin 1.7 conflicts with new mingw from Qt.
It is not a common case (can't reproduce with minimal cygwin and standard MinGW), therefore I downgrade this bug to P3
Comment 2 Alexander Simon 2010-04-07 20:07:11 UTC
I have a same problem with cygwin tool collection:
/cygdrive/c/DOCUME~1/Alex/LOCALS~1/Temp/dlight_Alex/e6fbea3c/dlight3056995797177
550389termexec.sh: line 3: /cygdrive/c/Documents and Settings/Alex/Мои документы
/NetBeansProjects/CppApplication_2/"C:/Documents and Settings/Alex/Мои документы
/NetBeansProjects/CppApplication_2/dist/Debug/Cygwin_4.x-Windows/cppapplication_
2": No such file or directory
/cygdrive/c/DOCUME~1/Alex/LOCALS~1/Temp/dlight_Alex/e6fbea3c/dlight3056995797177
550389termexec.sh: line 3: exec: /cygdrive/c/Documents and Settings/Alex/Мои док
ументы/NetBeansProjects/CppApplication_2/"C:/Documents and Settings/Alex/Мои док
ументы/NetBeansProjects/CppApplication_2/dist/Debug/Cygwin_4.x-Windows/cppapplic
ation_2": cannot execute: No such file or directory
Press [Enter] to close the terminal ...
Comment 3 soldatov 2010-04-07 20:39:05 UTC
in latest MinGW (4.4?) or MinGW from Qt path to libgcc_s_dw2-1.dll should be added into Path

Workaround: Program can be built with -static-libgcc flag
Comment 4 soldatov 2010-04-08 09:52:37 UTC
MinGW+MSYS only

More simple scenario:
- Create C/C++ Application with such C file (not C++):
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char** argv) {
    char *v1 = getenv("PATH");
    char *v2 = getenv("Path");
    printf("%s\n", (v1!=NULL)?v1:"null");
    printf("%s\n", (v2!=NULL)?v2:"null");
    return (EXIT_SUCCESS);
}
- Run it
==> terminal appeares and it contains:
C:\msys\1.0\bin;C:\msys\1.0\bin
C:\msys\1.0\bin;C:\msys\1.0\bin

My PATH environment variable is missed (path to dll's from MinGW or Qt)
Comment 5 Alexander Pepin 2010-04-14 12:38:34 UTC
It's a regression caused by the fix for bug #181386
Comment 6 Andrew Krasny 2010-04-19 19:02:51 UTC
http://hg.netbeans.org/cnd-main/rev/58b7b66b7bb7

Valera, 
please verify.
Comment 7 soldatov 2010-04-20 09:05:38 UTC
original problem is fixed
Comment 8 Andrew Krasny 2010-04-20 09:20:54 UTC
thanks!