正在摸索中,IDE:Code::Blocks 10.5,先是创建Dynamic Link Library,纠缠于一些参数,编译出来,但是最终在IIS里运行时显示内存错误,于是没办法,创建了个shared library,最终设置了一些参数后运行成功,同时搞明白了编译和链接的变量设置
1、菜单 - Settings - Compiler and debugger,编译器选择Borland C++ Compiler (5.5, 5.82),我使用的是BCC 5.5,toolchain executables 选项卡中,Compiler's installation directory选择安装路径,然后按Auto-detect按钮,检测不出,但是Program Files却识别出来,Debugger没有,因为同时安装了MinGW GCC 4.4,于是设置为gdb.exe为Debugger。
2、Search directories选项卡,设置好 BCC的INCLUDE和LIB目录。
3、Other settings选项卡,点击Advanced options按钮,会有个提示,不知道什么意思,看不懂英文,但是按确定继续,默认打开commands选项卡,command选择link object files to dynamic library,命令宏为:
$linker -q $libdirs -Tpd $link_options $link_objects,$exe_output,,$libs,,$link_resobjects
因为isapi需要引用个def文件,所以设置一个$def_input变量,将命令宏变为