尝试仅在Debian 9上编译Eiffel_18.07 / examples / store / esql /我遇到以下错误:
In file included from od243.c:202:0,
from big_file_C8_c.c:42:
/opt/Eiffel_18.07/library/store/dbms/rdbms/odbc/Clib/odbc.h:27:17: fatal error: sql.h: No such file or directory
#include <sql.h>
^
compilation terminated.
Makefile:36: recipe for target 'big_file_C8_c.o' failed
make[1]: *** [big_file_C8_c.o] Error 1
Makefile:72: recipe for target 'C8/Cobj8.o' failed
make: *** [C8/Cobj8.o] Error 2
make: *** Waiting for unfinished jobs....
apt-get install unixodbc unixodbc-dev odbc-postgresql
让我进一步去
gcc: error: /opt/Eiffel_18.07/library/store/spec/linux-x86-64/lib/libodbc.a: No such file or directory
Makefile:177: recipe for target 'esql' failed
当我尝试进入/opt/Eiffel_18.07/library/store/dbms/rdbms/odbc/Clib
时,我将能够生成一些代码来使它在/opt/Eiffel_18.07/library/store/install
之后进入/opt/Eiffel_18.07/library/store/dbms/rdbms/odbc/Clib
,并尝试sudo /opt/Eiffel_18.07/studio/spec/linux-x86-64/bin/finish_freezing -library
cp: cannot stat '/usr/include/eiffelstudio-18.07/config.sh': No such file or directory
Can't find config.sh.
Makefile.SH: 6: .: Can't open ./config.sh
作为埃菲尔铁塔的粉丝,它似乎并没有开箱即用,而且我也没有找到足够的文档来使其正常运行:-()
答案 0 :(得分:1)
以下是一系列步骤,使我可以在 Ubuntu 16.04 上构建示例:
下载 EiffelStudio 并将其解压缩到新目录中(让我们将绝对路径表示为#ES#
)。
设置环境变量:
export ISE_EIFFEL=#ES#
export ISE_PLATFORM=linux-x86-64
export PATH=$PATH:$ISE_EIFFEL/studio/spec/$ISE_PLATFORM/bin
这些命令假定为bash
,在使用另一个shell时将其替换为等效项。
安装软件包unixodbc-dev
:
sudo apt-get install unixodbc-dev
编译Eiffel库 store 的C代码:
cd ${ISE_EIFFEL}/library/store/dbms/rdbms/odbc/Clib
finish_freezing -library
注意:除非将 EiffelStudio 安装到没有普通用户写入权限的路径,否则无需在finish_freezing
之前为sudo
加上前缀。否则(例如,对于 Debian 9 上问题的原始发布者,其中 EiffelStudio 已安装在/opt
下),必须提高权限:>
sudo -i
cd ${ISE_EIFFEL}/library/store/dbms/rdbms/odbc/Clib
finish_freezing -library
exit
编译示例esql
:
cd ${ISE_EIFFEL}/examples/store/esql
ec -c_compile -config esql.ecf -target esql_odbc
运行已编译的可执行文件:
./EIFGENs/esql_odbc/W_code/esql
答案 1 :(得分:0)
以root身份登录改变了我的问题,而不仅仅是对finish_freezing命令进行了sudo
sudo -i
然后
cd ${ISE_EIFFEL}/library/store/dbms/rdbms/odbc/Clib
finish_freezing -library