Thread overview | |||||||
---|---|---|---|---|---|---|---|
|
November 10, 2012 std.net.curl problem | ||||
---|---|---|---|---|
| ||||
hi there, i am a newbee with d , just trying get a hold of the language, i've written small fragment of code that simply retrieves a page from a website and prints it to the console, but on compiling it i get the following error http://www.digitalmars.com/ctg/optlink.html main.obj(main) Error 42: Symbol Undefined _D3std3net4curl3FTP8__cpctorMxFKxS3std3net4curl3FTPZv main.obj(main) Error 42: Symbol Undefined _D3std3net4curl3FTP11__fieldDtorMFZv main.obj(main) Error 42: Symbol Undefined _D3std3net4curl3FTP13__T8ProtocolZ6handleMFNcNdZS3std3net4curl4Curl main.obj(main) Error 42: Symbol Undefined _D3std3net4curl3FTP13__T8ProtocolZ9onReceiveMFNdDFAhZkZv main.obj(main) Error 42: Symbol Undefined _D3std3net4curl3FTP3urlMFNdAxaZv main.obj(main) Error 42: Symbol Undefined _D3std3net4curl13CurlException7__ClassZ main.obj(main) Error 42: Symbol Undefined _D3std3net4curl13CurlException6__ctorMFAyaAyakC6object9ThrowableZC3std3net4curl13CurlException main.obj(main) Error 42: Symbol Undefined _D3std3net4curl7__arrayZ main.obj(main) Error 42: Symbol Undefined _D3std3net4curl3FTP13__T8ProtocolZ6onSendMFNdDFAvZkZv main.obj(main) Error 42: Symbol Undefined _D3std3net4curl3FTP8encodingMFNdZAya main.obj(main) Error 42: Symbol Undefined _D3std3net4curl4Curl3setMFE3etc1c4curl10CurlOptionlZv main.obj(main) Error 42: Symbol Undefined _D3std3net4curl3FTP8encodingMFNdAyaZv main.obj(main) Error 42: Symbol Undefined _D3std3net4curl3FTP7performMFZv main.obj(main) Error 42: Symbol Undefined _D3std3net4curl4HTTP6methodMFNdE3std3net4curl4HTTP6MethodZv main.obj(main) Error 42: Symbol Undefined _D3std3net4curl4HTTP8__cpctorMxFKxS3std3net4curl4HTTPZv main.obj(main) Error 42: Symbol Undefined _D3std3net4curl4HTTP11__fieldDtorMFZv main.obj(main) Error 42: Symbol Undefined _D3std3net4curl4HTTP3urlMFNdAxaZv main.obj(main) Error 42: Symbol Undefined _D3std3net4curl4HTTP13__T8ProtocolZ9onReceiveMFNdDFAhZkZv main.obj(main) Error 42: Symbol Undefined _D3std3net4curl4HTTP15onReceiveHeaderMFNdDFxAaxAaZvZv main.obj(main) Error 42: Symbol Undefined _D3std3net4curl4HTTP7performMFZv main.obj(main) Error 42: Symbol Undefined _D3std3net4curl4HTTP19onReceiveStatusLineMFNdDFS3std3net4curl4HTTP10StatusLineZvZv main.obj(main) Error 42: Symbol Undefined _D3std3net4curl4HTTP13__T8ProtocolZ6onSendMFNdDFAvZkZv main.obj(main) Error 42: Symbol Undefined _D3std3net4curl4HTTP13contentLengthMFNdkZv main.obj(main) Error 42: Symbol Undefined _D3std3net4curl4HTTP6methodMFNdZE3std3net4curl4HTTP6Method main.obj(main) Error 42: Symbol Undefined _D3std3net4curl12__ModuleInfoZ main.obj(main) Error 42: Symbol Undefined _D3std3net4curl4HTTP6opCallFZS3std3net4curl4HTTP main.obj(main) Error 42: Symbol Undefined _D3std3net4curl3FTP6opCallFZS3std3net4curl3FTP main.obj(main) Error 42: Symbol Undefined _D3std3net4curl8isFTPUrlFAxaZb --- errorlevel 28 can anyone please let me know what i am doing wrong |
November 10, 2012 Re: std.net.curl problem | ||||
---|---|---|---|---|
| ||||
Posted in reply to adi | On Saturday, November 10, 2012 03:25:37 adi wrote:
> can anyone please let me know what i am doing wrong
It looks like you're not linking against libcurl. You need to explicitly pass a flag to dmd to tell it to link. If you were on linux, it would be -L-lcurl. It's something similar for Windows, but I don't remember the exact syntax.
- Jonathan M Davis
|
November 10, 2012 Re: std.net.curl problem | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jonathan M Davis | Am Fri, 09 Nov 2012 21:27 -0800 schrieb Jonathan M Davis <jmdavisProg@gmx.com>: > On Saturday, November 10, 2012 03:25:37 adi wrote: > > can anyone please let me know what i am doing wrong > > It looks like you're not linking against libcurl. You need to explicitly pass a flag to dmd to tell it to link. If you were on linux, it would be -L-lcurl. It's something similar for Windows, but I don't remember the exact syntax. > > - Jonathan M Davis No, the undefined symbols are D (mangled) symbols. It's probably this bug: http://d.puremagic.com/issues/show_bug.cgi?id=7561 But that should be fixed in dmd 2.060: https://github.com/D-Programming-Language/phobos/pull/613 @adi which dmd/phobos version did you use to compile your code? |
November 10, 2012 Re: std.net.curl problem | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jonathan M Davis | On Saturday, 10 November 2012 at 05:34:16 UTC, Jonathan M Davis wrote:
> On Saturday, November 10, 2012 03:25:37 adi wrote:
>> can anyone please let me know what i am doing wrong
>
> It looks like you're not linking against libcurl. You need to explicitly pass
> a flag to dmd to tell it to link. If you were on linux, it would be -L-lcurl.
> It's something similar for Windows, but I don't remember the exact syntax.
>
> - Jonathan M Davis
Thanks jonathan for the pointer if you could help me with the complete solution that would be great as i have no knowledge of c as such , i am using D version 2.0.60 and visuald as the IDE solution
|
November 10, 2012 Re: std.net.curl problem | ||||
---|---|---|---|---|
| ||||
Posted in reply to Johannes Pfau | On Saturday, 10 November 2012 at 08:41:20 UTC, Johannes Pfau wrote:
> Am Fri, 09 Nov 2012 21:27 -0800
> schrieb Jonathan M Davis <jmdavisProg@gmx.com>:
>
>> On Saturday, November 10, 2012 03:25:37 adi wrote:
>> > can anyone please let me know what i am doing wrong
>>
>> It looks like you're not linking against libcurl. You need to
>> explicitly pass a flag to dmd to tell it to link. If you were on
>> linux, it would be -L-lcurl. It's something similar for Windows, but
>> I don't remember the exact syntax.
>>
>> - Jonathan M Davis
>
> No, the undefined symbols are D (mangled) symbols. It's probably this
> bug:
> http://d.puremagic.com/issues/show_bug.cgi?id=7561
>
> But that should be fixed in dmd 2.060:
> https://github.com/D-Programming-Language/phobos/pull/613
>
> @adi which dmd/phobos version did you use to compile your code?
Hi Johannes pfau i am using dmd version 2.060
|
Copyright © 1999-2021 by the D Language Foundation