Linker issue?
Josh
moonburntm at gmail.com
Mon Jun 17 06:15:34 PDT 2013
I've copied the source code from vibe.d's mongodb example into an
Eclipse DDT project, and I can't seem to get it to compile, even
though I *think* I've made the build options resemble what vibe
uses to build.
build.rf:
-od"bin"
-of"bin\TestProg.exe"
-I"src"
-I"C:\D\vibe.d\source"
-I"C:\D\vibe.d\import"
-I"C:\D\vibe.d\lib\win-i386"
"src\Test.d"
C:\D\vibe.d\lib\win-i386\eay.lib
C:\D\vibe.d\lib\win-i386\event2.lib
C:\D\vibe.d\lib\win-i386\ssl.lib
ws2_32.lib
Building with Eclipse gives:
-------- Build Commands: --------
-od"bin"
-of"bin\TestProg.exe"
-I"src"
-I"C:\D\vibe.d\source"
-I"C:\D\vibe.d\import"
-I"C:\D\vibe.d\lib\win-i386"
"src\Test.d"
C:\D\vibe.d\lib\win-i386\eay.lib
C:\D\vibe.d\lib\win-i386\event2.lib
C:\D\vibe.d\lib\win-i386\ssl.lib
ws2_32.lib
OPTLINK (R) for Win32 Release 8.00.13
Copyright (C) Digital Mars 1989-2010 All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
bin\TestProg.obj(TestProg)
Error 42: Symbol Undefined _D4vibe4data4bson4Bson6__initZ
bin\TestProg.obj(TestProg)
Error 42: Symbol Undefined
_D4vibe4data4bson4Bson6__ctorMFNcAyaE4vibe4data4bson4Bson4TypeZS4vibe4data4bson4Bson
bin\TestProg.obj(TestProg)
Error 42: Symbol Undefined
_D4vibe2db5mongo5mongo14connectMongoDBFAyaZC4vibe2db5mongo6client11MongoClient
bin\TestProg.obj(TestProg)
Error 42: Symbol Undefined _D4vibe4data4json4Json8toStringMxFZAya
bin\TestProg.obj(TestProg)
Error 42: Symbol Undefined
_D4vibe4data4bson4Bson6toJsonMxFZS4vibe4data4json4Json
bin\TestProg.obj(TestProg)
Error 42: Symbol Undefined
_D4vibe2db5mongo6cursor11MongoCursor7opApplyMFDFKkKS4vibe4data4bson4BsonZiZi
bin\TestProg.obj(TestProg)
Error 42: Symbol Undefined
_D4vibe2db5mongo6cursor11MongoCursor6__dtorMFZv
bin\TestProg.obj(TestProg)
Error 42: Symbol Undefined
_D4vibe4data4bson4Bson6__ctorMFNcxHAyaS4vibe4data4bson4BsonZS4vibe4data4bson4Bson
bin\TestProg.obj(TestProg)
Error 42: Symbol Undefined
_D4vibe2db5mongo8database13MongoDatabase7opIndexMFAyaZS4vibe2db5mongo10collection15MongoCollection
bin\TestProg.obj(TestProg)
Error 42: Symbol Undefined _D4vibe4core3log7__arrayZ
bin\TestProg.obj(TestProg)
Error 42: Symbol Undefined
_D4vibe4core3log10ss_loggersOAC4vibe4core3log6Logger
bin\TestProg.obj(TestProg)
Error 42: Symbol Undefined
_D4vibe4core3log6rawLogFNbAyaiE4vibe4core3log8LogLevelAyaZv
bin\TestProg.obj(TestProg)
Error 42: Symbol Undefined _D4vibe4core3log8__assertFiZv
bin\TestProg.obj(TestProg)
Error 42: Symbol Undefined
_D4vibe4core14connectionpool8__assertFiZv
bin\TestProg.obj(TestProg)
Error 42: Symbol Undefined
_D4vibe4core4task4Task5fiberMNgFNbNdZNgC4vibe4core4task9TaskFiber
bin\TestProg.obj(TestProg)
Error 42: Symbol Undefined
_D4vibe2db5mongo6client11M€„ŽC€†�4lockConnectiñMFZS€…¶4core1ꀈšpool67__T16L€ƒ³ed€ŠµTC€Žé10€Š·15€†î€‰‘Z€’À
bin\TestProg.obj(TestProg)
Error 42: Symbol Undefined
_D4vibe4data4bson4Bson6__ctorMFNcnZS4vibe4data4bson4Bson
bin\TestProg.obj(TestProg)
Error 42: Symbol Undefined
_D4vibe2db5mongo6cursor11M€„ŽC€…�6__ctñMFNcC€�®lient€ˆ®€…�Ayai€�§10cñnectiñ5ReplyZS€¢÷
bin\TestProg.obj(TestProg)
Error 42: Symbol Undefined _D4vibe4core3log12__ModuleInfoZ
bin\TestProg.obj(TestProg)
Error 42: Symbol Undefined _D4vibe2db5mongo5mongo12__ModuleInfoZ
--- errorlevel 20
dmd is 2.063 on Windows 7.
I know both Eclipse and dmd work, as I can compile other programs
that just use Phobos. I'm sure it's something really obvious that
I can't see, but I haven't had much luck with external libs. The
same sort of thing happened when I used GtkD...
Any help is welcomed.
Thanks,
Josh
More information about the Digitalmars-d-learn
mailing list