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 191645

Summary: CPPUnit link problem
Product: cnd Reporter: mortennobel
Component: ProjectAssignee: nnnnnk <nnnnnk>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P3    
Version: 7.0   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: Screen shot of unit test link options

Description mortennobel 2010-11-04 16:02:48 UTC
When creating a CPPUnit test for a C++ project the linker -> additional options is ignored.

Example: Create a OpenGL/glut project on the OS/X platform with the linker -> additional options set to '-framework GLUT -framework OPENGL'

Gives the following compile output (Note that the linker does not include the additional option in the commandline):

[...]
g++ -arch x86_64 -arch x86_64    -o build/Debug/GNU-MacOSX/tests/TestFiles/f1 build/Debug/GNU-MacOSX/tests/tests/newtestclass.o build/Debug/GNU-MacOSX/tests/tests/newtestrunner.o build/Debug/GNU-MacOSX/src/render_e/math/Vector4_nomain.o build/Debug/GNU-MacOSX/src/render_e/Camera_nomain.o build/Debug/GNU-MacOSX/src/main_nomain.o build/Debug/GNU-MacOSX/src/render_e/RenderBase_nomain.o build/Debug/GNU-MacOSX/src/render_e/textures/TextureMemoryDataSource_nomain.o build/Debug/GNU-MacOSX/src/render_e/math/Mathf_nomain.o build/Debug/GNU-MacOSX/src/render_e/SceneObject_nomain.o build/Debug/GNU-MacOSX/src/render_e/Transform_nomain.o build/Debug/GNU-MacOSX/src/render_e/textures/TextureDataSource_nomain.o build/Debug/GNU-MacOSX/src/render_e/textures/TextureGroup_nomain.o build/Debug/GNU-MacOSX/src/render_e/math/Quaternion_nomain.o build/Debug/GNU-MacOSX/src/render_e/math/Matrix44_nomain.o build/Debug/GNU-MacOSX/src/render_e/textures/Texture_nomain.o build/Debug/GNU-MacOSX/src/render_e/math/Vector3_nomain.o lib/libGLEW.a -lcppunit lib/libGLEW.a 
Undefined symbols:
  "_glOrtho", referenced from:
      render_e::Camera::Setup()    in Camera_nomain.o
  "_glutCreateWindow", referenced from:
      __nomain(int, char**)in main_nomain.o
[...]

Product Version = NetBeans IDE Dev (Build 201011030000)
Operating System = Mac OS X version 10.6.4 running on x86_64
Java; VM; Vendor = 1.6.0_22
Runtime = Java HotSpot(TM) 64-Bit Server VM 17.1-b03-307
Comment 1 mortennobel 2010-11-04 16:28:56 UTC
Created attachment 102803 [details]
Screen shot of unit test link options