Ethereal-dev: Re: [Ethereal-dev] getting rid of LNK2001

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: "Jasim Tariq" <jasimtariqjt@xxxxxxxxxxx>
Date: Thu, 23 Mar 2006 15:07:23 -0800
Hi,

Why not stuff all the things you need in the plugin?


I have tried that, but it doesnt work for some reason. I get a link error LNK 2001 saying unresolved external symbol and the name of my function. Actually this is easier too. Because If I throw everything inside the plugin folder then it is easier to maintain also. There must be something wrong with the way Im linking the files in my Makefile. I use the following target to compile the .cpp files.:

.cpp.obj:
	cl $(CFLAGS) /D_WIN32_WINNT=0x0500 -Fd.\ -c $<

and then use the OBJECTS target to link all the object obtained from .cpp files and my packet-my.c files. and then link them using the following command in my makefile:

my.dll my.exp my.lib : $(OBJECTS) $(LINK_PLUGIN_WITH)
	link /dll /out:my.dll $(LDFLAGS) $(OBJECTS) $(LINK_PLUGIN_WITH) \
	$(GLIB_LIBS)

maybe im using the link command in a wrong way because i keep on getting the LNK2001 error.

any suggestions?

Thanks

Jasim Tariq