www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - DMD2 does not link on windows 7-64bit

reply %u <HerrSauronII lavabit.com> writes:
I get the following strange message when linking:
==================================================
http://www.digitalmars.com/ctg/optlink.html
OPTLINK : Warning 23: No Stack
first.obj(first)
 Error 42: Symbol Undefined _D3std5stdio6stdoutS3std5stdio4File
first.obj(first)
 Error 42: Symbol Undefined _fprintf
first.obj(first)
 Error 42: Symbol Undefined _D3std9exception7bailOutFAyaixAaZv
first.obj(first)
 Error 42: Symbol Undefined _D3std5stdio12__ModuleInfoZ
first.obj(first)
 Error 42: Symbol Undefined _D6object6Object8opEqualsMFC6ObjectC6ObjectZb
first.obj(first)
 Error 42: Symbol Undefined _D6object6Object8opEqualsMFC6ObjectZb
first.obj(first)
 Error 42: Symbol Undefined _D6object6Object5opCmpMFC6ObjectZi
first.obj(first)
 Error 42: Symbol Undefined _D6object6Object6toHashMFZk
first.obj(first)
 Error 42: Symbol Undefined _D6object6Object8toStringMFZAya
first.obj(first)
 Error 42: Symbol Undefined _D6Object7__ClassZ
first.obj(first)
 Error 42: Symbol Undefined _D14TypeInfo_Class6__vtblZ
OPTLINK : Warning 134: No Start Address
--- errorlevel 11
==============================================================
I simply call dmd first.d where first.d contains a small class definition

Still, there is a resulting  executable final.exe.
When running it, I get a windows message telling me that
the application is not 64-Bit compatible

regards,
Oliver
Sep 07 2010
next sibling parent OK <HerrSauronII lavabit.com> writes:
To answer my own post :
the problems vanish when I add a main() method.
question : how do I automagically add a standard main method ?

regards, Oliver
Sep 07 2010
prev sibling parent Mike Chaten <mchaten gmail.com> writes:
--0003255590ae89c9e1048faf6b3a
Content-Type: text/plain; charset=ISO-8859-1

If you are trying to compile a library, add -lib to make it not require a
main method.

On Tue, Sep 7, 2010 at 2:12 PM, OK <HerrSauronII lavabit.com> wrote:

 To answer my own post :
 the problems vanish when I add a main() method.
 question : how do I automagically add a standard main method ?

 regards, Oliver

--0003255590ae89c9e1048faf6b3a Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable If you are trying to compile a library, add -lib to make it not require a m= ain method.<div><br><div class=3D"gmail_quote">On Tue, Sep 7, 2010 at 2:12 = PM, OK <span dir=3D"ltr">&lt;<a href=3D"mailto:HerrSauronII lavabit.com">He= rrSauronII lavabit.com</a>&gt;</span> wrote:<br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex;">To answer my own post :<br> the problems vanish when I add a main() method.<br> question : how do I automagically add a standard main method ?<br> <br> regards, Oliver<br> </blockquote></div><br></div> --0003255590ae89c9e1048faf6b3a--
Sep 07 2010