ÇëÎÊÎÒдµÄc³ÌÐòÔõôÓÐÕâô¶àµÄwarning£¿£¿
warningÓÐ8¸ö£¬µ«ÊDz»Öªµ½ÊÇÔõô»ØÊ£¬warning¾ßÌåÈçÏ£º
newNode1=(graph)malloc(sizeof(struct node));¶ÔÓ¦µÄΪ£º
incompatible implicit declaration of built-in function 'malloc'
int M=ceil(1.35*n*(log(n)/log(2)));¶ÔÓ¦µÄwaringΪ£º
incompatible implicit declaration of built-in function 'ceil'
incompatible implicit declaration of built-in function 'log'
ÇëÎÊÈçºÎÈ¥µôÕâЩwarning£¿£¿
Íü¼ÓÍ·ÎļþÁ˰É
#include <math.h>
#include <malloc.h>
ΪʲôÎÒ¼ÓÁË#include <malloc.h>»á±¨´í£¿Ëµno such file or directory
¿´Äãʲôϵͳ£¬ANSI±ê×¼µÄÓ¦¸ÃÊÇ <stdlib.h>,
»¹ÓС°int M=ceil(1.35*n*(log(n)/log(2)))¡±µÈºÅÁ½±ßµÄÀàÐͲ»Ò»Ñù£¬MΪintÐÍ£¬log()º¯ÊýÔÐÍΪdouble log(double x).
Ïà¹ØÎÊ´ð£º
ÔÚueÖдÓÔ¶³ÌunixÓöþ½øÖÆ·½Ê½ÏÂÔØcÎļþµ½±¾µØ£¬ÐÞ¸ÄÖ®ºóÓöþ½øÖÆ·½Ê½ÉÏ´«µ½unixÖУ¬ÔÙÓÃvi´ò¿ª¸ÃÎļþ£¬Ã¿ÐкóÃæ¾Í»áÓÐÒ»¸ö^MµÄ»»Ðзû£¬Èç¹û²ÉÓÃascii·½Ê½ÏÂÔØ£¬¶þ½øÖÆ·½Ê½ÉÏ´«µÄ»°¾ÍûÓÐ^M£¬ÄÇÇëÎÊÕâÑù»á¶Ô³ÌÐòÎļþ ......
±àÒëÆÕͨµÄcûÎÊÌâ°¡£¬µ«±àÒëjavahÉú³ÉµÄ¾Í±¨´í£º
gcc -O0 -g3 -Wall -c -fmessage-length=0 -oHelloWorld.o ..\HelloWorld.c
gcc -otest.exe HelloWorld.o
d:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../. ......
ΪʲôCдµÄDLLÎļþC¡¢PBÄܵ÷ÓÃVB²»Äܵ÷Óã¿
VBÀïΪʲôÓеÄDLLÖ±½Óͨ¹ýÒýÓÿÉÒÔʹÓã¿ÓеÄÐèҪͨ¹ýdeclareÉêÃ÷Íⲿº¯Êý£¿ÕâЩDLLÓÐʲô²î±ð£¿
1¡¢ÎªÊ²Ã´PBÄÜͨ¹ýDECLAREÉùÃ÷¶øVB²»ÐУ¿
2¡¢Èç¹ûÕâ¸ödllÖÐµÄ ......
ÎÒÓÃPHPÀ©Õ¹Cʱ£¬ÓõÄÊÇÔ´ÂëextĿ¼ÏµÄ./ext_skel
×îºó±àÒë×ÜÊDz»ÄÜÉú³ÉÀ©Õ¹Ä£¿éµÄ.so¶¯Ì¬¿â£¬ÎÒÓõİ汾ÊÇ5.3.0£¬
ÕâÊÇÔõô»ØÊ£¬¸ßÊÖ½â´ðÏÂ
²»ÄÜÉú³ÉʱÓÐɶÌáʾÐÅÏ¢£¿
ÔËÐÐÁË/ext_skel --extname=Ä ......
C/C++ code:
void p1(const char **pname)
{
const char *name = "test1";
*pname = name;
}
void p2(const char **pname)
{
char *name = "test2";
*pname = name ......