template with C linkage
template with C linkage
- Subject: template with C linkage
- From: Jeff Heyob <email@hidden>
- Date: Fri, 24 Feb 2006 14:26:56 -0500
Hi,
I have three templates that were developed under Codewarrior 8.3 that
generate a compiler error when building in Xcode 2.2.1 using GCC 3.3.
I am using GCC 3.3 to static link the system libraries to support
deployment back to MacOSX 10.2.8.
When using GCC 3.3, I get "error: template with C linkage".
When using GCC 4.0, the project builds successfully, but won't launch
on systems prior to MacOSX 10.3.9.
See the GCC 3.3 build output below.
--------------------------------------
cd "/Development/ InfoScribePP v2/InfoScribe Current"
setenv DISTCC_COMPILER "gcc version 3.3 20030304 (Apple
Computer, Inc. build 1819)"
setenv DISTCC_HOSTS Clayoquot.local./6
setenv DISTCC_SYSTEM "10.4.4 (ppc)"
setenv MACOSX_DEPLOYMENT_TARGET 10.2
/usr/bin/distcc /usr/bin/gcc-3.3 -x c++ -arch ppc -pipe -Wno-
trigraphs -fpascal-strings -fshort-enums -fasm-blocks -gfull -O0 -
Woverloaded-virtual -Wunused-parameter -Wunused-variable -Wunknown-
pragmas -fmessage-length=0 -mtune=G3 -Wno-deprecated-declarations -
Wno-invalid-offsetof -Wp,-header-mapfile,/Development/\ InfoScribePP\
v2/InfoScribe\ Current/build/aFileMerge.build/ISFileMerge_Debug/
ISFileMerge.build/ISFileMerge.hmap -Wno-multichar -Wno-long-double -
mdynamic-no-pic -fpch-preprocess -F/Development/\ InfoScribePP\ v2/
InfoScribe\ Current/build/ISFileMerge_Debug -Isource -Isource/
application -Isource/clear\ backup\ date -Isource/Crypt -Isource/data
\ compare -Isource/data\ extract -Isource/FileFixer -Isource/
ISFileMerge -Isource/ISFileMerge\ Bkup -Isource/ISFileSub -Isource/
ISFileUploader -Isource/ISPrefMod -Isource/ISXFileConverter -Isource/
kernel -Isource/mDNS -Isource/PowerPlant_Mods -Isource/PowerPlant_XC -
Isource/Utility -Isource/application/Archive\ files -Isource/
application/Document\ files -Isource/application/Export\ Files -
Isource/application/Network\ files -Isource/application/User\ Setup\
Files -Isource/mDNS/mDNSCore -Isource/PowerPlant_XC/_In_Progress -
Isource/PowerPlant_XC/Action_Classes -Isource/PowerPlant_XC/
Appearance_Classes -Isource/PowerPlant_XC/AppleEvent_Classes -Isource/
PowerPlant_XC/Array_Classes -Isource/PowerPlant_XC/Commander_Classes -
Isource/PowerPlant_XC/Feature_Classes -Isource/PowerPlant_XC/
File_and_Stream_Classes -Isource/PowerPlant_XC/Menu_Classes -Isource/
PowerPlant_XC/Pane_Classes -Isource/PowerPlant_XC/PowerPlant_Headers -
Isource/PowerPlant_XC/PowerPlant_Resources -Isource/PowerPlant_XC/
Standard_Dialogs -Isource/PowerPlant_XC/Support_Classes -Isource/
PowerPlant_XC/Utility_Classes -Isource/application/Document\ files/
Window\ Files -Isource/PowerPlant_XC/_In_Progress/_Carbon_Events -
Isource/PowerPlant_XC/_In_Progress/_Core\ Foundation -Isource/
PowerPlant_XC/Appearance_Classes/AM\ Implementations -Isource/
PowerPlant_XC/Appearance_Classes/Appearance\ Controls -Isource/
PowerPlant_XC/Appearance_Classes/Appearance\ Support -Isource/
PowerPlant_XC/Appearance_Classes/Std\ Implementations -Isource/
application/Document\ files/Window\ Files/DataLoaders -Isource/
application/Document\ files/Window\ Files/Text\ Window\ Files -
Isource/application/Document\ files/Window\ Files/TimeBase\ Window\
Files -Isource/application/Document\ files/Window\ Files/Variance -
Isource/application/Document\ files/Window\ Files/XY\ Window\ Files -
I- -I/Development/\ InfoScribePP\ v2/InfoScribe\ Current/build/
ISFileMerge_Debug/include -I/Development/\ InfoScribePP\ v2/InfoScribe
\ Current/build/aFileMerge.build/ISFileMerge_Debug/ISFileMerge.build/
DerivedSources -DMAC_OS_X_VERSION_MIN_REQUIRED=1020 -fconstant-
cfstrings -D__CONSTANT_CFSTRINGS__ -lstdc++ -DUSE_MACSTL -include /
Library/Caches/com.apple.Xcode.501/SharedPrecompiledHeaders/
ISTL_MachO_Util_Final_XC-drpkrlzsyvdnhbgpqqkvcrlhsomy/
ISTL_MachO_Util_Final_XC.h -c /Development/\ InfoScribePP\ v2/
InfoScribe\ Current/source/kernel/ISTL_Stream.cp -o /Development/\
InfoScribePP\ v2/InfoScribe\ Current/build/aFileMerge.build/
ISFileMerge_Debug/ISFileMerge.build/Objects-normal/ppc/ISTL_Stream.o
gcc-3.3: -lstdc++: linker input file unused because linking not done
In file included from source/kernel/ISTL_Stream.h:13,
from /Development/ InfoScribePP v2/InfoScribe
Current/source/kernel/ISTL_Stream.cp:8:
source/ISTL_LinkList.h:61: error: template with C linkage
In file included from source/Utility/MPThread.h:14,
from source/kernel/ISTL_Stream.h:19,
from /Development/ InfoScribePP v2/InfoScribe
Current/source/kernel/ISTL_Stream.cp:8:
source/ISTL_LinkListN.h:41: error: template with C linkage
source/ISTL_LinkListN.h:328: error: template with C linkage
distcc[18456] ERROR: compile /Development/ InfoScribePP v2/InfoScribe
Current/source/kernel/ISTL_Stream.cp on Clayoquot.local./6 failed
--------------------------------------
In searching for info online about template with C linkage, I found
references to "-lstdc++ -DUSE_MACSTL".
In the target compiler setting for Other C++ Flags, I added "-lstdc++
-DUSE_MACSTL". You can find it listed in the above options. This
"Other C++ Flags" setting did not have any effect on the "template
with C linkage" error.
I seem to have a quandary with GCC 3.3 and GCC 4.0.
Can anyone tell me how to solve GCC 3.3 and template with C linkage
errors?
Regards,
Jeff
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden