[so] [Tema2][Win] Link error dll

Daniel CIOCÎRLAN daniel.ciocirlan1607 at cti.pub.ro
Wed Apr 10 23:10:04 EEST 2013


Aici output nmake:

link /nologo /out:sompi.dll /implib:sompi.lib win_queue.obj win_sem.obj win_shm.obj mpi.obj
   Creating library sompi.lib and object sompi.exp
LIBCMT.lib(crt0.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup
sompi.dll : fatal error LNK1120: 1 unresolved externals

Unde e problema?

Am fortat chestiile din mpi.c (devenit mpi.obj) sa faca DECLSPEC pe export, ceea ce trebuia oricum. Trebuia definit WIN32 in chestii? Niciuna din surse n-are main.

Dan
________________________________________
From: so-bounces at cursuri.cs.pub.ro [so-bounces at cursuri.cs.pub.ro] on behalf of Adrian Sendroiu [molecula2788 at gmail.com]
Sent: Wednesday, April 10, 2013 8:09 PM
To: Sisteme de Operare
Subject: Re: [so] [Tema2][Win] Link error dll

Daniel CIOCÎRLAN <daniel.ciocirlan1607 at cti.pub.ro> writes:

> Salut,
>
> Primesc eroare la legarea bibliotecii dinamice pe Windows si nu inteleg de ce. Primesc
>
> error LNK2019: unresolved external symbol _main referenced in function __tmainCRTStartup
>
> la legarea sompi.dll. Am avut grija sa declar /DEXPORTS si sa creez obiectele inainte.
>
> Unde e problema? A mai dat cineva de asta?
>
> Dan

Salut,

Nu-mi dau seama de ce iti cauta functia main la crearea unei biblioteci
dinamice. Poate ai gresit ceva la comanda de compilare?

Da-ne un output al lui nmake.

Adrian
_______________________________________________
http://ocw.cs.pub.ro/courses/so/info/lista-discutii



More information about the so mailing list