编译环境:
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 ==========
-