Ethereal-dev: Re: [Ethereal-dev] errors linking ethereal CVS - Visual Studio .NET Professional

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

From: Ulf Lamping <ulf.lamping@xxxxxx>
Date: Mon, 05 Jan 2004 16:24:19 +0100
Andrew Hood wrote:

Hi Ulf,

Mind if we take this offline? We can summarise or come up with some suitable patch if I get it working. I don't normally build stuff on Windows other than with cygwin. I'm much more comfortable on Linux and Solaris, and can put up with AIX and HP-UX.

As I'm only compiling with MSVC6, it might be better to have others give us some tips or learn from it, I've CCed this to the dev list.


Ulf Lamping wrote:

Andrew Hood wrote:

-- snip --

Try to add /NODEFAULTLIB:LIBC (or LIBC.lib?) to your linker settings (LOCAL_LDFLAGS in config.nmake), or do you use the IDE?


I stick to the command line.

/NODEFAULTLIB:LIBC almost works. editcap.exe, mergecap.exe and text2pcap.exe do not link

Linking editcap.exe
        link @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\nm129.tmp
editcap.obj : error LNK2019: unresolved external symbol __imp__strtol referenced in function _main editcap.obj : error LNK2019: unresolved external symbol __imp__exit referenced in function _main editcap.obj : error LNK2019: unresolved external symbol __imp__fprintf referenced in function _main
getopt.obj : error LNK2001: unresolved external symbol __imp__fprintf
editcap.obj : error LNK2001: unresolved external symbol __imp___iob
getopt.obj : error LNK2001: unresolved external symbol __imp___iob
etc ...

I added msvcrt.lib (probably not the right thing to do) to each of those links and they worked.

Then the call to tethereal in doc/Makefile/nmake for building the doco fails "can't find libglib-2.0.0.dll".

This might be solved by a patch from Lars Roland in the config.nmake I just checked in some minutes ago :-)


-------------

How do you test? On *nix I just ./ethereal and off it goes.

On XP I get a never ending string of "can't find dll" messages unless I either: - add every directory under \ethereal-win32-libs and the build directory containg a dll to the path, or - copy all of the dlls (ethereal, and dissectors, and glib, and gtk+, and so on) into one directory.

and copy intl.dll from my installed ethereal to somewhere it can be found.

Some of the DLLs are in my path, other I simply copy into the exe dir. This isn't a situation I'm satisfied with,
but didn't found a good solution for this.

-------------

tethereal runs.

ethereal keep crashing at various asserts in fdopen.c in msvcr70.dll trying to start a capture. It won't open existing captures either: "The file xxxx could not be opened for some unknown reason"

You might try using /NODEFAULTLIB:MSVCRT instead of /NODEFAULTLIB:LIBC.
But this is only guessing, I have no real idea how to solve this.


-------------

Is there any particular reason for not having an "install" target?

Well, there is the NSIS installer, which builds a setup.exe for the ethereal. This is the main installation procedure for Ethereal win32 binaries.

But there is no special reason not having an "install" target.

Regards, ULFL