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 255870 - Properties -> Linker -> Add Library -> Add Project uses wrong toolchain
Summary: Properties -> Linker -> Add Library -> Add Project uses wrong toolchain
Status: NEW
Alias: None
Product: cnd
Classification: Unclassified
Component: Project (show other bugs)
Version: 8.2
Hardware: All Solaris
: P3 normal (vote)
Assignee: Alexander Simon
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-12 12:01 UTC by danilasergeyev
Modified: 2017-04-03 10:09 UTC (History)
0 users

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 danilasergeyev 2015-10-12 12:01:50 UTC
If user specifies some tool chain for the C/C++ dynamic library and then adds this library to C/C++ application, then after he'll run clean & build command the wrong tool chain will be used to build dynamic library.
 
Say you have 2 tool cains GNU_1 and GNU_2.
1) Create C/C++ Dynamic Library project
2) Select GNU_1 toolchain
3) Create newfile.c and newfile.h files
4) Clean&Build project
5) Create C/C++ Application project with main.c
6) Select GNU_2 toolchain
7) Add CppDynamicLibrary_1 project into Linker|Libraries|Add Project
8) Add ../CppDynamicLibrary_1 into Build|C Compiler|Include Directories field
9) Modify main.c file. In my case it contains:
#include <newfile.h>
int main(int argc, char** argv) {
    foo();
    return (0);
}
10) Clean&Build project

Result -> IDE won't use GNU_1 tool chain to build dynamic library
Comment 1 Alexander Simon 2017-04-03 10:09:48 UTC
Use full path to compiler in Dynamic Library project:
Project properties->C Compiler->Tool:
Change gcc -> full path to GNU_1 gcc compiler