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 270068 - MSYS2: in IDE only dlopen() fails on relative paths
Summary: MSYS2: in IDE only dlopen() fails on relative paths
Status: RESOLVED WORKSFORME
Alias: None
Product: cnd
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 8.2
Hardware: PC Windows 8.1
: P3 normal (vote)
Assignee: Alexander Simon
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-14 10:02 UTC by soldatov
Modified: 2017-03-22 12:38 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
test project (24.45 KB, application/zip)
2017-03-14 10:02 UTC, soldatov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description soldatov 2017-03-14 10:02:16 UTC
Created attachment 163830 [details]
test project

This test scenario fails on Windows/MSYS2 only. Executable file works nicely without IDE, but in NetBeans 'dlopen' fails.

Scenario:
- unpack attached project
- build project
- launch project
==> "Library not found!!!" message appears

I use such code in order to check file:
    FILE* f = fopen("dlopenLibrary/libtestlibrary.dll", "r");
    if (f == NULL) {
        puts("File not found!!!\n");
        return 0;
    } else {
        fclose(f);
    }

    void* lib = dlopen("dlopenLibrary/libtestlibrary.dll", RTLD_LAZY);
    if (lib == NULL) {
        puts("Library not found!!!\n");
        return 0;
    }
Comment 1 Alexander Simon 2017-03-22 12:38:13 UTC
It seems bug was fixed while fixing bug #269974