cygwin下用cmake编译mysql客户端

发布于 2024-10-18 06:03:46 字数 1643 浏览 1 评论 0原文

我需要一个用于 Eclipse Helios/Perl EPIC 的 mysql 客户端,在 windows7 下运行。 Perl5.10 在同一台机器上的 cygwin 下运行。我真的很难在 cygwin 下使用 cmake 编译 mysql 源代码。我还阅读了从 "configure" 到 "cmake" 的转换指南。

这是我在之前的几十个变体中尝试的最后一个测试:

库和源准备

apt-cyg install make cmake gcc4-core gcc4-g++ libncurses-devel libncursesw-devel readline libstdc++6 libstdc++6-devel  
mkdir -p /usr/local/src  
mkdir -p /usr/local/mysql  
cd /usr/local/src  
wget http://dev.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.9.tar.gz/from/http://mirrors.ircam.fr/pub/mysql/  
find . -type f -name "*.tar.gz" -exec tar -zxvf {} \;  
find . -type d -name "mysql-*" -exec cd {} \;  

构建/安装

CC=gcc; CFLAGS=-O3 ; CXX=gcc ; CXXFLAGS=-O3; export CC CFLAGS CXX CXXFLAGS  

cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DWITH_EMBEDDED_SERVER=0 -DWITH_LIBEDIT=0 -DISABLE_SHARED=1   

构建停止在 86% 时,

[ 86%] Building CXX object sql/CMakeFiles/mysqld.dir/main.cc.o  
Linking CXX executable mysqld.exe  
Creating library file: libmysqld.dll.a  
libsql.a(mysqld.cc.o):mysqld.cc:(.rdata$_ZTV12Comp_creator[vtable for Comp_creator]+0x10): undefined reference to `___cxa_pure_virtual'  
collect2: ld returned 1 exit status  
make[2]: *** [sql/mysqld.exe] Error 1  
make[1]: *** [sql/CMakeFiles/mysqld.dir/all] Error 2  

我阅读了数百个线程,但由于缺乏编译技能而盲目阅读。

也许还有一个替代或更好的解决方案来从 Eclipse 运行托管在 Debian 虚拟机(作为我的 Windows 机器上的来宾)中的现有 mysql 调试服务器。?

非常欢迎提出建议。

提前谢谢

I need a mysql-client for Eclipse Helios/Perl EPIC, running under windows7. Perl5.10 is running under cygwin on the same machine. I'm really strugglying to compile mysql sources with cmake under cygwin. I have also read the transition guide from "configure" to "cmake".

Here is the last test I tried among dozen of previous variants :

Libraries and source Preparation :

apt-cyg install make cmake gcc4-core gcc4-g++ libncurses-devel libncursesw-devel readline libstdc++6 libstdc++6-devel  
mkdir -p /usr/local/src  
mkdir -p /usr/local/mysql  
cd /usr/local/src  
wget http://dev.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.9.tar.gz/from/http://mirrors.ircam.fr/pub/mysql/  
find . -type f -name "*.tar.gz" -exec tar -zxvf {} \;  
find . -type d -name "mysql-*" -exec cd {} \;  

Build/Install

CC=gcc; CFLAGS=-O3 ; CXX=gcc ; CXXFLAGS=-O3; export CC CFLAGS CXX CXXFLAGS  

cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DWITH_EMBEDDED_SERVER=0 -DWITH_LIBEDIT=0 -DISABLE_SHARED=1   

Build is stopped at 86% with

[ 86%] Building CXX object sql/CMakeFiles/mysqld.dir/main.cc.o  
Linking CXX executable mysqld.exe  
Creating library file: libmysqld.dll.a  
libsql.a(mysqld.cc.o):mysqld.cc:(.rdata$_ZTV12Comp_creator[vtable for Comp_creator]+0x10): undefined reference to `___cxa_pure_virtual'  
collect2: ld returned 1 exit status  
make[2]: *** [sql/mysqld.exe] Error 1  
make[1]: *** [sql/CMakeFiles/mysqld.dir/all] Error 2  

I read 100's of threads but blindly as lacking compilation skills.

Maybe is there also an alternative or better solution to run my existing mysql debugging server hosted in a Debian's VM (as guest on my windows machine) from Eclipse.. ?

Suggestions are more than welcome.

Thx in advance

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

葬花如无物 2024-10-25 06:03:46

嗯,看起来没有绝对需要这样做来在 Eclipse 中使用 Perl Epi,因为 cygwin Perl 已经嵌入了 DBI 模块(要与 CPAN 一起加载)。所以这是解决这个问题的一种方法。

hum, looks like that there is no absolute need to do that to use perl epic with Eclipse, as cygwin perl embeds already the DBI modules (to be loaded with CPAN). So it's a way to get around this problem.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文