pro*c±à¶Ô²½Öè
step one£º½«.pcÎļþÔ¤±àÒëΪ.c
[ecif@localhost zyctest]$ proc sample1.pc
ÏÔʾÐÅÏ¢£º
Pro*C/C++: Release 10.2.0.1.0 - Production on Tue Apr 13 14:07:05 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
System default option values taken from: /home/oracle/oracle/product/10.2.0/db_1/precomp/admin /pcscfg.cfg
step two£º±àÒë.cÎļþ£¬Éú³ÉÄ¿±êÎļþ
gcc -L$ORACLE_HOME/precomp/public -I/home/oracle/oracle/product/10.2.0/db_1/precomp /public/ -c sample1.c
Ìáʾ¾¯¸æ£º
sample1.c: In function `main':
sample1.c:236: warning: return type of 'main' is not `int'
step three£ºÁ´½ÓÄ¿±êÎļþ£¬Éú³É¿ÉÖ´ÐгÌÐò
gcc -L$ORACLE_HOME/lib -lclntsh -o sample1 sample1.o
¾¯¸æ£º
sample1.o(.text+0x381): In function `main':
: warning: the `gets' function is dangerous and should not be used.
step four£ºÖ´ÐÐÎļþ
./sample1
ÔÚÖ´ÐÐ./samle1³öÏÖ£º
error while loading shared libraries: /oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1: cannot restore segment prot after reloc: Permission denied
½â¾öµÄ°ì·¨ÊÇ£º
chcon -t texrel_shlib_t /oracle/product/10.2.0/db_1/lib/*.so
Ïà¹ØÎĵµ£º
ÔÚnetbeansÖбà¼C/C++ÊÇÒ»ÖÖ²»´íµÄÑ¡Ôñ£¬ÏÂÃæÎÒ¾Í˵һÏÂÕû¸öÁ÷³ÌµÄÅäÖÃ
1.ÏÈÏÂÔØMinGW
ÕâÊDZàÒëc/c++µÄ±àÒëÆ÷£¬ÔÚwindowsÏÂÖ±½ÓÒÔ.exeµÄ·½Ê½ÔËÐУ¬ÏÂÒ»²½µÄ²Ù×÷£¬Ò»Ö±µ½°²×°Íê³É¡£
2.ÏÂÔØmsys
ÕâÊǺÍMinGWͬ²½Ê¹ÓÃ
3.ÅäÖû·¾³
ÔÚÎҵĵçÄÔ->ÊôÐÔ->¸ß¼¶->»·¾³±äÁ¿ÖÐÉèÖÃMinGWºÍmsysĿ¼ÖÐbinËùÔڵķ¾¶
4.²âÊÔ
ÓÃÃüÁîÐз½Ê½Ê ......
1.3 µ¥Ôª²âÊÔÄܲúÉúÄÄÐ©Ð§Òæ£¿
µ¥Ôª²âÊÔµÄÐ§ÒæÒѾµÃµ½¹ã·ºµÄÈÏͬ£¬ÏÖÔÚµÄÎÊÌâÒѾ²»ÊÇÓÐûÓбØÒª×ö£¬Öµ²»ÖµµÃ×ö£¬¶øÊÇÈçºÎ¶à¿ìºÃÊ¡µØ×öºÃµ¥Ôª²âÊÔ£¬ËùÒÔ£¬¹ØÓÚÐ§Òæ£¬ÕâÀïÖ»ÊǼòµ¥µÄ½éÉÜһϡ£
Ð§ÒæÒ»£¬±£Ö¤´úÂëÖÊÁ¿
Ö»Óе¥Ôª²âÊÔ²ÅÄÜÍêÕû¼ì²â´úÂëµ¥ÔªµÄ¹¦Ä ......
C++ÓïÑÔ·½ÃæµÄÊé¼®
³õѧÕß½¨Òé°´ÒÔÏÂ˳ÐòÔĶÁ
¡¶C++ Primer¡·
ΪC++ÐÂÊÖ¶øÐ´£¬Ò»±¾ “´ÓÈëÃŵ½¾«Í¨”µÄC++½Ì³Ì
Ëü²¢²»ÊʺÏÍêÈ«²»¶®C++µÄ³õѧÕߣ¬ÔÚÔĶÁÕâ±¾Êé֮ǰ£¬×îºÃÏÈÓÐÒ»µãC»òC++µÄ±³¾°ÖªÊ¶£¬»òÕßһЩÆäËûÓïÑԵıà³Ì¾Ñé
Ê¡ÂÔÁËһЩ¸ß¼¶C++ÌØÐÔµÄÌÖÂÛ£¬µ«ÈÔÈ»¿ÉÒԳƵÃÉÏÊÇÆù½ñΪֹ×îȫà ......
#include
void printptr(int *i){
printf("&i of printfptr = %#X\n",&i);
printf("i of printfptr = %#X\n",i);
printf("*i of printfptr = %d\n",*i);
printf("i+1 of printfptr = %#X\n",i+1);
printf("*(i + 1) of printfptr = %d\n",*(i ......