Hi All! I need to use C++ units (*.cpp) in my GPC projects. If I use C units (*.c) in my project (just like {$L socketmain.c}) it's ok but if I try to use {$L socketmain.cpp} then Pascal compiler tells me
gpc: ./socketmain.cpp: C++ compiler not installed on this system.
But it installed. Two things I tried to do: 1. Export environment variables CXX and CPP with "g++" value 2. Change *cpp_options in my gpc specs file. There was no such section before, so I inserted it into from gcc specs file. Now this section looks like:
*cpp_options: %{C:%{!E:%eGNU C does not support -C without using -E}} %{std*} %{nostdinc*} %{C} %{v} %{I*} %{P} %{$} %I %{MD:-M -MF %W{!o: %b.d}%W{o*:%.d%*}} %{MMD:-MM -MF %W{!o: %b.d}%W{o*:%.d%*}} %{M} %{MM} %W{MF*} %{MG} %{MP} %{MQ*} %{MT*} %{M|MD|MM|MMD:%{o*:-MQ %*}} %{!no-gcc:-D__GNUC__=%v1 -D__GNUC_MINOR__=%v2 -D__GNUC_PATCHLEVEL__=%v3} %{!undef:%{!ansi:%{!std=*:%p}%{std=gnu*:%p}} %P} %{trigraphs} %c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}} %{fno-inline|O0|!O*:-D__NO_INLINE__} %{ffast-math:-D__FAST_MATH__} %{fshort-wchar:-U__WCHAR_TYPE__ -D__WCHAR_TYPE__=short\ unsigned\ int} %{fshow-column} %{fno-show-column} %{fleading-underscore} %{fno-leading-underscore} %{foperator-names} %{fno-operator-names} %{ftabstop=*} %{remap} %{g3:-dD} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*&U*&A*} %{i*} %Z %i %{E:%{!M*:%W{o*}}}
But nothing changed. What have I do to compile projects with C++ files? I have not ideas for the present, please give them to me:)
Software versions: Linux: RedHat (kernel 2.5.52) gpc: gpc version 2.1 (20020510), based on 2.95.3 20010315 (release) gcc: gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-110)
mailto:marny@rambler.ru