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 183558

Summary: Now C/C++ UnitTests works on Solaris only
Product: cnd Reporter: soldatov <soldatov>
Component: -- Other --Assignee: nnnnnk <nnnnnk>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 6.x   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:

Description soldatov 2010-04-06 12:16:08 UTC
Now C/C++ UnitTests works on Solaris only.

Scenario:
- Create C/C++ Application with main.c file
- Create "C Simple Test"
- Run test
==>
...
build/Debug/GNU-Linux-x86/tests/newCSimpleTest.o build/Debug/GNU-Linux-x86/main_nomain.o  
gmake[1]: Leaving directory `/export/NB/CppApplication_3'
build/Debug/GNU-Linux-x86/main_nomain.o: In function `main':
/export/NB/CppApplication_3/main.c:14: multiple definition of `main'
build/Debug/GNU-Linux-x86/tests/newCSimpleTest.o:/export/NB/CppApplication_3/newCSimpleTest.c:24: first defined here
/usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/bin/ld: Warning: size of symbol `main' changed from 147 in build/Debug/GNU-Linux-x86/tests/newCSimpleTest.o to 18 in build/Debug/GNU-Linux-x86/main_nomain.o
collect2: ld returned 1 exit status
gmake[1]: *** [build/Debug/GNU-Linux-x86/tests/TestFiles/f1] Error 1
gmake: *** [.build-tests-impl] Error 2
Comment 1 soldatov 2010-04-06 12:17:15 UTC
Linux:
vs157455@ifdefqe-02:~> nm /export/NB/CppApplication_3/build/Debug/GNU-Linux-x86/main.o
0000000000000000 T main
Comment 2 soldatov 2010-04-06 12:20:22 UTC
Windows (Cygwin):

00000000 b .bss
00000000 d .ctors
00000000 d .data
00000000 d .dtors
00000000 r .gcc_except_table
00000000 r .rdata
00000000 N .stab
00000000 N .stabstr
00000000 t .text
00000000 t .text$_ZN3CpuD1Ev
00000000 t .text$_ZN4DiskD1Ev
00000000 t .text$_ZN6MemoryD1Ev
00000000 t .text$_ZN6SystemD1Ev
00000000 t .text$_ZN8CustomerC1ERKS_
00000000 t .text$_ZN8CustomerD1Ev
00000000 t .text$_ZN9__gnu_cxx13new_allocatorI8CustomerEC2Ev
00000000 t .text$_ZN9__gnu_cxx13new_allocatorI8CustomerED2Ev
         U __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc
         U __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c
         U __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKSbIS4_S5_T1_E
         U __ZTV3Cpu
         U __ZTV4Disk
         U __ZTV6Memory
         U __ZdlPv
00000000 T __ZdlPvS_
         U __ZlsRSoRK6System
         U __ZlsRSoRK8Customer
         U __Znwj
00000000 T __ZnwjPv
         U ___cxa_begin_catch
         U ___cxa_end_catch
         U ___cxa_rethrow
         U ___gxx_personality_sj0
         U ___main
         U __alloca
00000eb4 T _main
         U _strtol
         U _toupper