Compiling error: MSVCRTD.lib(_chandler4gs_.obj) : error LNK2001

Moderator: Project members

Post Reply
Message
Author
Tauphi
500 Command not understood
Posts: 3
Joined: 2016-02-21 18:33

Compiling error: MSVCRTD.lib(_chandler4gs_.obj) : error LNK2001

#1 Post by Tauphi » 2016-02-21 18:37

Hello,

I am trying to compile FileZilla Server. Seems to work in general, except this one:

Code: Select all

1>------ Erstellen gestartet: Projekt: FileZilla Server, Konfiguration: Release Win32 ------
1>LINK : warning LNK4098: Standardbibliothek "MSVCRTD" steht in Konflikt mit anderen Bibliotheken; /NODEFAULTLIB:Bibliothek verwenden.
1>MSVCRTD.lib(_chandler4gs_.obj) : error LNK2001: Nicht aufgelöstes externes Symbol "__except_handler4_common".
1>C:\FileZilla\source\Release\FileZilla Server.exe : fatal error LNK1120: 1 nicht aufgelöste Externe
========== Erstellen: 0 erfolgreich, 1 fehlerhaft, 0 aktuell, 0 übersprungen ==========
Compiling the Interface works perfect ... Does someone has any experience, what kind of problem I have?

Thanks a lot
- Andreas

User avatar
botg
Site Admin
Posts: 33428
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse
Contact:

Re: Compiling error: MSVCRTD.lib(_chandler4gs_.obj) : error LNK2001

#2 Post by botg » 2016-02-21 18:46

You are building a release build of FZS yet use a debug version of the runtime libraries. These don't mix.

Make sure all components are built using the same runtime libraries.

Tauphi
500 Command not understood
Posts: 3
Joined: 2016-02-21 18:33

Re: Compiling error: MSVCRTD.lib(_chandler4gs_.obj) : error LNK2001

#3 Post by Tauphi » 2016-02-21 19:03

How do I know which component is bitching here?
Which method should I use? debug or release?

Now I have this error while using release (switched zlibstat to the release version):

Code: Select all

1>------ Erstellen gestartet: Projekt: FileZilla Server, Konfiguration: Release Win32 ------
1>  Code wird generiert.
1>  Codegenerierung ist abgeschlossen.
1>zlibstat.lib(inffas32.obj) : error LNK2026: Unsicheres Modul für SAFESEH-Image.
1>zlibstat.lib(match686.obj) : error LNK2026: Unsicheres Modul für SAFESEH-Image.
1>C:\FileZilla\source\Release\FileZilla Server.exe : fatal error LNK1281: SAFESEH-Image konnte nicht generiert werden.
========== Erstellen: 0 erfolgreich, 1 fehlerhaft, 0 aktuell, 0 übersprungen ==========
And... Why is there "$(zlib_lib_debug);$(LibraryPath)" saved in the library folders for the release configuration?

User avatar
botg
Site Admin
Posts: 33428
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse
Contact:

Re: Compiling error: MSVCRTD.lib(_chandler4gs_.obj) : error LNK2001

#4 Post by botg » 2016-02-21 19:49

And... Why is there "$(zlib_lib_debug);$(LibraryPath)" saved in the library folders for the release configuration?
Weird, should be zlib_lib_release. I wonder how that could have compiled in the first place on my machine. Looks like a schrödinbug to me. I've fixed it in the repository.

Please try if setting it to zlib_lib_release works for you.

Tauphi
500 Command not understood
Posts: 3
Joined: 2016-02-21 18:33

Re: Compiling error: MSVCRTD.lib(_chandler4gs_.obj) : error LNK2001

#5 Post by Tauphi » 2016-02-21 20:17

It works with the Release version of zlib (Thanks a lot!), but I still get this error:

Code: Select all

1>zlibstat.lib(inffas32.obj) : error LNK2026: Unsicheres Modul für SAFESEH-Image.
1>zlibstat.lib(match686.obj) : error LNK2026: Unsicheres Modul für SAFESEH-Image.
I was able to fix it by setting "Linker" -> "Erweitert" -> "Image weist sichere Ausnahmehandler auf." to "Nein (/SAFESEH:NO)"
I dont know the english labels for the configuration, but I guess, you know which I mean :D

Now it's compiling...

Maybe it's related to the latest version of zlib ? Downloaded the package today, so it's their latest release

User avatar
botg
Site Admin
Posts: 33428
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse
Contact:

Re: Compiling error: MSVCRTD.lib(_chandler4gs_.obj) : error LNK2001

#6 Post by botg » 2016-02-21 20:18

In the zlib source, edit contrib/masmx86/bld_ml32.bat and add /safeseh to both lines, delete the .obj files in that directory and rebuild zlib. Alternatively use the release without asm zlib configuration.

User avatar
botg
Site Admin
Posts: 33428
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse
Contact:

Re: Compiling error: MSVCRTD.lib(_chandler4gs_.obj) : error LNK2001

#7 Post by botg » 2016-02-21 20:22

It's not a good idea to disable safe SEH as it's a security feature.

Ideally I'd completely disable SEH instead, though there doesn't seem to be a way to do so.

Post Reply