怎样在UNIX C编程中动态调用函数
时间:2006-02-22 来源:hello386
我要在一个main函数中读配置文件,按照配置文件中的交易码调用不同的子处理函数,子函数均编译为.o文件,配置文件中有子函数的名字,如下格式: 1001 QueryPwd 1002 QueryAcc 请问该如何调用? 我拟采用类似windows编程中的LoadLibrary将所有.o文件load到main函数中,然后用指向函数的指针调用不同的子函数,但不知道具体实现过程,有何更好的办法望不吝赐教。<IFRAME name=google_ads_frame marginWidth=0 marginHeight=0 src="http://pagead2.googlesyndication.com/pagead/ads?client=ca-pub-3859774587941782&dt=1140591845510&lmt=1119358268&format=728x90_as&output=html&url=http%3A%2F%2Fwww.5iv.net%2F072%2Fhow122310.htm&color_bg=FFFFFF&color_text=000000&color_link=0000FF&color_url=FFFFFF&color_border=FFFFFF&ref=http%3A%2F%2Fwww.linuxc.net%2Fviewthread.php%3Ftid%3D841%26fpage%3D1&cc=243&u_h=768&u_w=1024&u_ah=740&u_aw=1024&u_cd=16&u_tz=480&u_java=true" frameBorder=0 width=728 scrolling=no height=90 allowTransparency> ![]() |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
我要在一个main函数中读配置文件,按照配置文件中的交易码调用不同的子处理函数,子函数均编译为.o文件,配置文件中有子函数的名字,如下格式: 1001 QueryPwd 1002 QueryAcc 请问该如何调用? 我拟采用类似windows编程中的LoadLibrary将所有.o文件load到main函数中,然后用指向函数的指针调用不同的子函数,但不知道具体实现过程,有何更好的办法望不吝赐教。<IFRAME name=google_ads_frame marginWidth=0 marginHeight=0 src="http://pagead2.googlesyndication.com/pagead/ads?client=ca-pub-3859774587941782&dt=1140591845510&lmt=1119358268&format=728x90_as&output=html&url=http%3A%2F%2Fwww.5iv.net%2F072%2Fhow122310.htm&color_bg=FFFFFF&color_text=000000&color_link=0000FF&color_url=FFFFFF&color_border=FFFFFF&ref=http%3A%2F%2Fwww.linuxc.net%2Fviewthread.php%3Ftid%3D841%26fpage%3D1&cc=243&u_h=768&u_w=1024&u_ah=740&u_aw=1024&u_cd=16&u_tz=480&u_java=true" frameBorder=0 width=728 scrolling=no height=90 allowTransparency> ![]() |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
相关阅读 更多 +