FastDB编译记录之流水账

解决fastdb编译问题并成功编译多个组件
文章详细记录了解决fastdb不同版本编译问题的过程,包括使用fastdb-371.zip解压后重新编译,解决头文件不匹配问题,以及通过添加Ws2_32.lib解决子组件subsql编译失败的问题。最终,成功编译了cli、fastdb和subsql组件。

编译环境:

win7专业版, vc6.0 sp5,fastdb-3.71.tar.gz

 

编译结果:

--------------------Configuration: cli - Win32 Debug--------------------
Compiling...
database.cpp
d:\projects\fastdb\src\database.cpp(5358) : error C2248: 'reservedChain' : cannot access protected member declared in class 'dbDatabase'
        d:\projects\fastdb\inc\database.h(1194) : see declaration of 'reservedChain'
d:\projects\fastdb\src\database.cpp(5360) : error C2248: 'reservedChain' : cannot access protected member declared in class 'dbDatabase'
        d:\projects\fastdb\inc\database.h(1194) : see declaration of 'reservedChain'
d:\projects\fastdb\src\database.cpp(5365) : error C2248: 'reservedChain' : cannot access protected member declared in class 'dbDatabase'
        d:\projects\fastdb\inc\database.h(1194) : see declaration of 'reservedChain'
d:\projects\fastdb\src\database.cpp(5366) : error C2248: 'reservedChain' : cannot access protected member declared in class 'dbDatabase'
        d:\projects\fastdb\inc\database.h(1194) : see declaration of 'reservedChain'
Error executing cl.exe.

cli.lib - 4 error(s), 0 warning(s)

 ====================================================================================================================

到fastdb官网上一看(官网地址:http://www.garret.ru/fastdb.html)发现:

  • Download most recent sources for Windows: fastdb-371.zip
  • Download most recent sources for Unix: fastdb-3.71.tar.gz

    显然,我用的是for Unix的在编译,显然有些define的头就不一样,所以通过不了!

  • 用fastdb-371.zip解压出来的再次编译:

    Deleting intermediate files and output files for project 'cli - Win32 Debug'.
    --------------------Configuration: cli - Win32 Debug--------------------
    Compiling...
    cli.cpp
    w32sock.cpp
    stdtp.cpp
    repsock.cpp
    Generating Code...
    Creating library...

    cli.lib - 0 error(s), 0 warning(s)

    Deleting intermediate files and output files for project 'fastdb - Win32 Release'.
    --------------------Configuration: fastdb - Win32 Release--------------------
    Compiling...
    class.cpp
    compiler.cpp
    stdtp.cpp
    container.cpp
    cursor.cpp
    server.cpp
    database.cpp
    xml.cpp
    file.cpp
    hashtab.cpp
    localcli.cpp
    query.cpp
    repsock.cpp
    symtab.cpp
    sync.cpp
    ttree.cpp
    rtree.cpp
    w32sock.cpp
    wwwapi.cpp
    Generating Code...
    Creating library...

    fastdb.lib - 0 error(s), 0 warning(s)

     

    --------------------Configuration: subsql - Win32 Release--------------------
    D:\Projects\fastdb\inc\compiler.h(16): Could not find the file regex.h.
    D:\Projects\fastdb\inc\compiler.h(29): Could not find the file compiler.dd.
    D:\Projects\fastdb\inc\file.h(19): Could not find the file zlib.h.
    D:\Projects\fastdb\inc\config.h(15): Could not find the file acconfig.h.
    D:\Projects\fastdb\inc\sync_unix.h(15): Could not find the file unistd.h.
    D:\Projects\fastdb\inc\sync_unix.h(21): Could not find the file sys/time.h.
    D:\Projects\fastdb\inc\sync_unix.h(29): Could not find the file sys/ipc.h.
    D:\Projects\fastdb\inc\sync_unix.h(35): Could not find the file semaphore.h.
    D:\Projects\fastdb\inc\sync_unix.h(37): Could not find the file sys/sem.h.
    D:\Projects\fastdb\inc\sync_unix.h(41): Could not find the file sys/mman.h.
    D:\Projects\fastdb\inc\sync_unix.h(44): Could not find the file sys/shm.h.
    D:\Projects\fastdb\inc\sync_unix.h(46): Could not find the file sys/mman.h.
    D:\Projects\fastdb\inc\sync_unix.h(61): Could not find the file pthread.h.
    D:\Projects\fastdb\inc\sync_unix.h(830): Could not find the file synch.h.
    D:\Projects\fastdb\inc\fastdbShim.h(11): Could not find the file vkiWrap.h.
    D:\Projects\fastdb\inc\fastdbShim.h(14): Could not find the file sockLib.h.
    D:\Projects\fastdb\inc\fastdbShim.h(15): Could not find the file selectLib.h.
    D:\Projects\fastdb\inc\fastdbShim.h(16): Could not find the file vxWorks.h.
    D:\Projects\fastdb\inc\fastdbShim.h(17): Could not find the file ioLib.h.
    D:\Projects\fastdb\inc\fastdbShim.h(18): Could not find the file sys/times.h.
    D:\Projects\fastdb\inc\fastdbShim.h(19): Could not find the file sys/times.h.
    D:\Projects\fastdb\inc\fastdbShim.h(21): Could not find the file socket.h.
    D:\Projects\fastdb\inc\fastdbShim.h(22): Could not find the file hostLib.h.
    D:\Projects\fastdb\inc\fastdbShim.h(23): Could not find the file sockLib.h.
    D:\Projects\fastdb\inc\fastdbShim.h(24): Could not find the file selectLib.h.
    D:\Projects\fastdb\inc\fastdbShim.h(26): Could not find the file sys/un.h.
    D:\Projects\fastdb\inc\fastdbShim.h(27): Could not find the file netinet/in.h.
    D:\Projects\fastdb\inc\fastdbShim.h(28): Could not find the file netinet/tcp.h.
    D:\Projects\fastdb\inc\fastdbShim.h(29): Could not find the file arpa/inet.h.
    D:\Projects\fastdb\inc\fastdbShim.h(32): Could not find the file unistd.h.
    D:\Projects\fastdb\inc\fastdbShim.h(39): Could not find the file netdb.h.
    Compiling...
    subsql.cpp
    Linking...
    LINK : warning LNK4075: ignoring /INCREMENTAL due to /OPT specification
    fastdb.lib(w32sock.obj) : error LNK2001: unresolved external symbol _WSAGetLastError@0
    fastdb.lib(w32sock.obj) : error LNK2001: unresolved external symbol _WSAStartup@8
    fastdb.lib(w32sock.obj) : error LNK2001: unresolved external symbol _listen@8
    fastdb.lib(w32sock.obj) : error LNK2001: unresolved external symbol _closesocket@4
    fastdb.lib(w32sock.obj) : error LNK2001: unresolved external symbol _bind@12
    fastdb.lib(w32sock.obj) : error LNK2001: unresolved external symbol _setsockopt@20
    fastdb.lib(w32sock.obj) : error LNK2001: unresolved external symbol _htons@4
    fastdb.lib(w32sock.obj) : error LNK2001: unresolved external symbol _htonl@4
    fastdb.lib(w32sock.obj) : error LNK2001: unresolved external symbol _gethostbyname@4
    fastdb.lib(w32sock.obj) : error LNK2001: unresolved external symbol _socket@12
    fastdb.lib(w32sock.obj) : error LNK2001: unresolved external symbol _accept@12
    fastdb.lib(w32sock.obj) : error LNK2001: unresolved external symbol _connect@12
    fastdb.lib(w32sock.obj) : error LNK2001: unresolved external symbol _recv@16
    fastdb.lib(w32sock.obj) : error LNK2001: unresolved external symbol _select@20
    fastdb.lib(w32sock.obj) : error LNK2001: unresolved external symbol _send@16
    fastdb.lib(w32sock.obj) : error LNK2001: unresolved external symbol _shutdown@8
    fastdb.lib(w32sock.obj) : error LNK2001: unresolved external symbol _inet_ntoa@4
    fastdb.lib(w32sock.obj) : error LNK2001: unresolved external symbol _getpeername@12
    fastdb.lib(w32sock.obj) : error LNK2001: unresolved external symbol _gethostname@8
    Release\subsql.exe : fatal error LNK1120: 19 unresolved externals
    Error executing link.exe.

    subsql.exe - 20 error(s), 1 warning(s)

    看来cli和fastdb编译成功了,subsql还差点什么,今天就到这吧,明天再继续。。。

     ======================================================================================================================

    接昨天的继续:

    到网上一阵狂搜,发现说是因为需要的lib库没有加进去,据说是需要Ws2.lib 加了发现还是不行 无法引用这个库

    再搜 发现有人写“Ws2_32.lib”  ,感觉这个靠谱 (以前搞opengl的时候加库就有带32的) 于是试了下:

     

    编译,OK,搞定啦!! 哈哈啊!

    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

     

  • +++++++2014.7.11好久没上csdn了,发现fastdb官网已经更新到3.76版本了+++++++

  • +++++++于是把源码下下来,想编译一把++++++++++++++++++++++++++++++++++

  • 环境:win7 64专业版;vs 2010 专业版;fastdb-376.zip

  • 发现解压文件夹后 除了dsw文件,还有sln(vs2008版的)

  • 直接打开fastdb.sln进行vs2010转换成功(无错误,有几个警告)

  • 然后分别编译cli,fastdb,subsql,都比较顺利,估计是作者在这里面做了很多处理

  • 贴一个输出:

  • 1>------ Build started: Project: cli, Configuration: Debug Win32 ------

  • 1>Build started 2014/7/11 12:39:58.
    1>InitializeBuildStatus:
    1>  Creating ".\Debug\cli.unsuccessfulbuild" because "AlwaysCreate" was specified.
    1>ClCompile:
    1>  cli.cpp
    1>  repsock.cpp
    1>  stdtp.cpp
    1>  w32sock.cpp
    1>  Generating Code...
    1>Lib:
    1>  cli.vcxproj -> C:\Users\lxm\Desktop\fastdb\CLI\.\Debug\cli.lib
    1>FinalizeBuildStatus:
    1>  Deleting file ".\Debug\cli.unsuccessfulbuild".
    1>  Touching ".\Debug\cli.lastbuildstate".
    1>
    1>Build succeeded.
    1>
    1>Time Elapsed 00:00:01.43
    ========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========


(1)普通用户端(全平台) 音乐播放核心体验: 个性化首页:基于 “听歌历史 + 收藏偏好” 展示 “推荐歌单(每日 30 首)、新歌速递、相似曲风推荐”,支持按 “场景(通勤 / 学习 / 运动)” 切换推荐维度。 播放页功能:支持 “无损音质切换、倍速播放(0.5x-2.0x)、定时关闭、歌词逐句滚动”,提供 “沉浸式全屏模式”(隐藏冗余控件,突出歌词与专辑封面)。 多端同步:自动同步 “播放进度、收藏列表、歌单” 至所有登录设备(如手机暂停后,电脑端打开可继续播放)。 音乐发现与管理: 智能搜索:支持 “歌曲名 / 歌手 / 歌词片段” 搜索,提供 “模糊匹配(如输入‘晴天’联想‘周杰伦 - 晴天’)、热门搜索词推荐”,结果按 “热度 / 匹配度” 排序。 歌单管理:创建 “公开 / 私有 / 加密” 歌单,支持 “批量添加歌曲、拖拽排序、一键分享到社交平台”,系统自动生成 “歌单封面(基于歌曲风格配色)”。 音乐分类浏览:按 “曲风(流行 / 摇滚 / 古典)、语言(国语 / 英语 / 日语)、年代(80 后经典 / 2023 新歌)” 分层浏览,每个分类页展示 “TOP50 榜单”。 社交互动功能: 动态广场:查看 “关注的用户 / 音乐人发布的动态(如‘分享新歌感受’)、好友正在听的歌曲”,支持 “点赞 / 评论 / 转发”,可直接点击动态中的歌曲播放。 听歌排行:个人页展示 “本周听歌 TOP10、累计听歌时长”,平台定期生成 “全球 / 好友榜”(如 “好友中你本周听歌时长排名第 3”)。 音乐圈:加入 “特定曲风圈子(如‘古典音乐爱好者’)”,参与 “话题讨论(如‘你心中最经典的钢琴曲’)、线上歌单共创”。 (2)音乐人端(创作者中心) 作品管理: 音乐上传:支持 “无损音频(FLAC/WAV)+ 歌词文件(LRC)+ 专辑封面” 上传,填写 “歌曲信息
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值