string IP = HttpContext.Current.Request.Params["HTTP_CLIENT_IP"] ?? HttpContext.Current.Request.UserHostAddress;
Используйте
g++ test.cpp
вместо этого, так как это - код C++.
<час> Или, если Вы действительно хотите использовать gcc
, добавляют -lstdc++
к командной строке, как так:
gcc test.cpp -lstdc++
Выполнение md5
против эти a.out
произведенный согласно каждому сценарию показывает, что это - тот же вывод.
, Но, да, g++
, вероятно, делает Ваш мир более простым местом.
The .cpp
extension causes gcc
to compile your file as a C++ file. (See the GCC docs.)
Try compiling the same file, but rename it to have a .c
extension:
mv test.cpp
gcc test.c
Alternatively, you can explicitly specify the language by passing -x c
to the compiler:
gcc -x c -c test.cpp -o test.o
If you run nm test.o
on these C-language versions, you'll notice that ___gxx_personality_v0
is not listed as a symbol.
(And if you run the same command on an object file generated with gcc -c test.cpp -o test.o
, the ___gxx_personality_v0
symbol is present.)