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 133213 - Copied C++ Project Settings are wrong/confused (preprocessors)
Summary: Copied C++ Project Settings are wrong/confused (preprocessors)
Status: RESOLVED DUPLICATE of bug 136535
Alias: None
Product: cnd
Classification: Unclassified
Component: Project (show other bugs)
Version: 6.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: Thomas Preisler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-18 16:13 UTC by dustin_mccartney
Modified: 2008-09-20 06:00 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
C Compiler Prefs showing empty Preprocessor (36.21 KB, image/png)
2008-04-18 16:14 UTC, dustin_mccartney
Details
CPP Compiler prefs showing empty Preprocessor Defines (36.34 KB, image/png)
2008-04-18 16:14 UTC, dustin_mccartney
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dustin_mccartney 2008-04-18 16:13:38 UTC
Build: Netbeans 6.1 RC 1

Problem:
Incorrect project "Preprocessor Definitions" are being used.  For each target platform, I have 3 debug levels: Debug,
ReleaseDebug, and Release.  Each of these defines debug-level specific Preprocessors.  The Preprocessors are as follows:

Linux_x86-Debug = PFX2_DEBUG
Linux_x86-ReleaseDebug = PFX2_RDEBUG
Linux_x86-Release = <nothing>

When I build some projects using "Release", they are incorrectly using Preprocessors defined in Debug, which is causing
link errors.  When building "Release", the console displays (Note that Makefile_CONF=Linux_x86-Release and g++
erroneously invokes -DPFX2_DEBUG):

/usr/bin/make -f nbproject/Makefile-Linux_x86-Release.mk SUBPROJECTS= .build-conf
make[1]: Entering directory `/home/dmccartney/workspace/C++/Examples/Example_OpenGL'
cd ../../PFXEngine && /usr/bin/make  -f Makefile CONF=Linux_x86-Release
<cut to make smaller>
mkdir -p
build/Linux_x86-Release/GNU_4.3.0-Linux-x86/_ext/home/dmccartney/workspace/C++/Examples/Example_OpenGL/../../OpenGL/src
g++    -c -g -O -Wall -DPFX2_DEBUG -I../../PFXEngine/include -I../../OpenGL/include -I../../OpenGL/include/GL
-I/usr/include/GL -o
build/Linux_x86-Release/GNU_4.3.0-Linux-x86/_ext/home/dmccartney/workspace/C++/Examples/Example_OpenGL/../../OpenGL/src/MaterialOpenGLRenderData.o
../../OpenGL/src/MaterialOpenGLRenderData.cpp

Also note the attached screen shots show that the Linux_x86-Release project setting does not have ANYTHING defined for
Preprocessor Definitions.

* This is completely preventing some projects from compiling *
Comment 1 dustin_mccartney 2008-04-18 16:14:20 UTC
Created attachment 60419 [details]
C Compiler Prefs showing empty Preprocessor
Comment 2 dustin_mccartney 2008-04-18 16:14:53 UTC
Created attachment 60420 [details]
CPP Compiler prefs showing empty Preprocessor Defines
Comment 3 dustin_mccartney 2008-04-18 16:33:05 UTC
I have been playing with this and it seems to be related to the Project Configurations "Copy" function.  If I "Copy" any
existing Configuration and edit that copy's actual project data, regardless of what the new "Copy" has for project
settings, at compile-time, the "Copy" seems to be referencing/using the _first_ Project Configuration listed in the
Configurations dialog.  For example, I have:

Linux_x86-Debug
Linux_x86-ReleaseDebug

If I "Copy" _either_ Linux_x86-Debug or Linux_x86-ReleaseDebug to create Linux_x86-Release, when building
"Linux_x86-Release", it erroneously uses Linux_x86-Debug.  So I have:

Linux_x86-Debug
Linux_x86-ReleaseDebug
Linux_x86-Release (which uses Linux_x86-Debug to build)

I have deleted some of my project configurations and am manually re-creating them (without using Configurations "Copy"
command) and it _seems_ to be working so far.  *crosses fingers*
Comment 4 Thomas Preisler 2008-09-19 21:47:22 UTC
problem (re)confirmed. Someting is wrong in the master chain of CC/C configurations. May not have time to fix it for 6.5
Comment 5 Thomas Preisler 2008-09-19 22:27:00 UTC

*** This issue has been marked as a duplicate of 136535 ***
Comment 6 Quality Engineering 2008-09-20 06:00:58 UTC
Integrated into 'main-golden', will be available in build *200809200201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/467f8f4437db
User: Thomas Preisler <thp@netbeans.org>
Log: #133213 Copied C++ Project Settings are wrong/confused (preprocessors)