Linker issue?

Josh moonburntm at gmail.com
Wed Jun 19 14:19:26 PDT 2013


On Tuesday, 18 June 2013 at 05:46:17 UTC, Aleksandar Ruzicic 
wrote:
> On Tuesday, 18 June 2013 at 02:02:52 UTC, Josh wrote:
>> I've added in wsock32.lib, the -J, and the 3 versions, and it 
>> gives the same output. I should mention that I can compile the 
>> examples fine with both vibe and dub by themselves, but 
>> apparently not inside Eclipse.
>>
>> Thanks for your help though Aleksandar.
>>
>> Josh
>
>
> I think that problem is that you're putting libs after your 
> source file. I have now rearranged input files (as that is the 
> only difference between your's and dub's build command that I 
> can see) so it looks now like this:
>
> rdmd --build-only --compiler=dmd -w -g -debug
> -version=LIBEV4
> -version=VibeLibeventDriver
> -version=Have_vibe_d
> -I<path>\source
> -I<path>\.dub\packages\vibe-d\import
> -I<path>\.dub\packages\vibe-d\source
> -J<path>\views
> source\app.d
> <path>\.dub\packages\vibe-d\lib\win-i386\eay.lib
> <path>\.dub\packages\vibe-d\lib\win-i386\ssl.lib
> <path>\.dub\packages\vibe-d\lib\win-i386\event2.lib
> wsock32.lib
> ws2_32.lib
> -ofgamesrv.exe
>
> (I've moved source\app.d before .libs)
>
> And Optlink responded with few pages of symbol undefined 
> errors! :)
>
> So, try putting your source file at the end of command line.

--------  Build Commands:  --------
-od"bin"
-of"bin\TestProg.exe"

-version=LIBEV4
-version=VibeLibeventDriver
-version=Have_vibe_d

-I"src"

-I"C:\D\vibe.d\source"
-I"C:\D\vibe.d\import"
-I"C:\D\vibe.d\lib\win-i386"

-J"src"

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
wsock32.lib

"src\Test.d"



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 
_D4vibe2db5mongo6cursor11MongoCursor7opApplyMFDFKkKS4vibe4data4bson4BsonZiZi
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 
_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 
_D4vibe4data4bson4Bson6__ctorMFNcAyaE4vibe4data4bson4Bson4TypeZS4vibe4data4bson4Bson
bin\TestProg.obj(TestProg)
  Error 42: Symbol Undefined 
_D4vibe2db5mongo5mongo14connectMongoDBFAyaZC4vibe2db5mongo6client11MongoClient
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 _D4vibe2db5mongo5mongo12__ModuleInfoZ
bin\TestProg.obj(TestProg)
  Error 42: Symbol Undefined _D4vibe4core3log12__ModuleInfoZ
--- errorlevel 20

It would appear to be exactly the same :/

Josh


More information about the Digitalmars-d-learn mailing list