Link errors with Trunk  [SOLVED]

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
raananb
Super wx Problem Solver
Super wx Problem Solver
Posts: 370
Joined: Fri Oct 27, 2006 4:35 pm
Location: Paris, France
Contact:

Link errors with Trunk

Postby raananb » Sun Feb 04, 2018 2:44 pm

My application compiles and links (under Windows 10) with no errors with wxWidgets-3.1.0.

When wxWidgets-3.1.0 is replaced by Trunk, the following 4 errors come up with a number of objects:

Error LNK2001 unresolved external symbol "protected: virtual class wxWindowList __thiscall wxStaticBox::GetCompositeWindowParts(void)const " ([email protected]@@[email protected]@XZ) PixName4 D:\ProjetsDB\PixName4\settings.obj 1

Error LNK2001 unresolved external symbol "public: virtual bool __thiscall wxStaticBox::SetBackgroundColour(class wxColour const &)" ([email protected]@@[email protected]@@Z) PixName4 D:\ProjetsDB\PixName4\settings.obj 1

Error LNK2001 unresolved external symbol "public: virtual bool __thiscall wxStaticBox::SetFont(class wxFont const &)" ([email protected]@@[email protected]@@Z) PixName4 D:\ProjetsDB\PixName4\settings.obj 1

Error LNK2001 unresolved external symbol "public: virtual bool __thiscall wxStaticBoxBase::Enable(bool)" ([email protected]@@[email protected]) PixName4 D:\ProjetsDB\PixName4\repairdates.obj 1

I have no idea why these errors are raised with the Trunk but not with 3.1.0, and how to avoid them with the Trunk.

Any explanations?

User avatar
doublemax
Moderator
Moderator
Posts: 12801
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Link errors with Trunk

Postby doublemax » Sun Feb 04, 2018 3:23 pm

Did you make a clean rebuild of both the wxWidgets libraries and your project?

Can you build the "widgets" sample?
Use the source, Luke!

raananb
Super wx Problem Solver
Super wx Problem Solver
Posts: 370
Joined: Fri Oct 27, 2006 4:35 pm
Location: Paris, France
Contact:

Re: Link errors with Trunk

Postby raananb » Sun Feb 04, 2018 4:58 pm

wxWidgets and the application were built from a clean slate.

'D:\wxWidgets\samples\widgets>nmake makefile.vc' produces a log file with error messages similar to the one below for all the widgets:

D:\wxWidgets\include\wx/defs.h(707): fatal error C1083: Impossible to open the include file : 'stddef.h' : No such file or directory (compilation of source file combobox.cpp)

User avatar
doublemax
Moderator
Moderator
Posts: 12801
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Link errors with Trunk

Postby doublemax » Sun Feb 04, 2018 5:25 pm

Sorry, no idea.

It seems you're using Visual Studio from the command line. Can you try building the libraries and a sample with the project files?
Use the source, Luke!

raananb
Super wx Problem Solver
Super wx Problem Solver
Posts: 370
Joined: Fri Oct 27, 2006 4:35 pm
Location: Paris, France
Contact:

Re: Link errors with Trunk

Postby raananb » Sun Feb 04, 2018 5:40 pm

No better with widgets_vc9.sln (upgraded to VS2017):

Erreur C1083 Impossible d'ouvrir le fichier include : 'stddef.h' : No such file or directory (compilation du fichier source activityindicator.cpp) widgets D:\wxWidgets\include\wx\defs.h 707
Erreur C1083 Impossible d'ouvrir le fichier include : 'stddef.h' : No such file or directory (compilation du fichier source bmpcombobox.cpp) widgets D:\wxWidgets\include\wx\defs.h 707
Erreur C1083 Impossible d'ouvrir le fichier include : 'stddef.h' : No such file or directory (compilation du fichier source button.cpp) widgets D:\wxWidgets\include\wx\defs.h 707
Erreur C1083 Impossible d'ouvrir le fichier include : 'stddef.h' : No such file or directory (compilation du fichier source checkbox.cpp) widgets D:\wxWidgets\include\wx\defs.h 707
Erreur C1083 Impossible d'ouvrir le fichier include : 'stddef.h' : No such file or directory (compilation du fichier source choice.cpp) widgets D:\wxWidgets\include\wx\defs.h 707
Erreur C1083 Impossible d'ouvrir le fichier include : 'stddef.h' : No such file or directory (compilation du fichier source clrpicker.cpp) widgets D:\wxWidgets\include\wx\defs.h 707
Erreur C1083 Impossible d'ouvrir le fichier include : 'stddef.h' : No such file or directory (compilation du fichier source combobox.cpp) widgets D:\wxWidgets\include\wx\defs.h 707
Erreur C1083 Impossible d'ouvrir le fichier include : 'stddef.h' : No such file or directory (compilation du fichier source datepick.cpp) widgets D:\wxWidgets\include\wx\defs.h 707
Erreur C1083 Impossible d'ouvrir le fichier include : 'stddef.h' : No such file or directory (compilation du fichier source dirctrl.cpp) widgets D:\wxWidgets\include\wx\defs.h 707
Erreur C1083 Impossible d'ouvrir le fichier include : 'stddef.h' : No such file or directory (compilation du fichier source dirpicker.cpp) widgets D:\wxWidgets\include\wx\defs.h 707
Erreur C1083 Impossible d'ouvrir le fichier include : 'stddef.h' : No such file or directory (compilation du fichier source editlbox.cpp) widgets D:\wxWidgets\include\wx\defs.h 707
Erreur C1083 Impossible d'ouvrir le fichier include : 'stddef.h' : No such file or directory (compilation du fichier source filectrl.cpp) widgets D:\wxWidgets\include\wx\defs.h 707
Erreur C1083 Impossible d'ouvrir le fichier include : 'stddef.h' : No such file or directory (compilation du fichier source filepicker.cpp) widgets D:\wxWidgets\include\wx\defs.h 707
Erreur C1083 Impossible d'ouvrir le fichier include : 'stddef.h' : No such file or directory (compilation du fichier source fontpicker.cpp) widgets D:\wxWidgets\include\wx\defs.h 707
Erreur C1083 Impossible d'ouvrir le fichier include : 'stddef.h' : No such file or directory (compilation du fichier source gauge.cpp) widgets D:\wxWidgets\include\wx\defs.h 707
Erreur C1083 Impossible d'ouvrir le fichier include : 'stddef.h' : No such file or directory (compilation du fichier source headerctrl.cpp) widgets D:\wxWidgets\include\wx\defs.h 707
Erreur C1083 Impossible d'ouvrir le fichier include : 'stddef.h' : No such file or directory (compilation du fichier source hyperlnk.cpp) widgets D:\wxWidgets\include\wx\defs.h 707
Erreur C1083 Impossible d'ouvrir le fichier include : 'stddef.h' : No such file or directory (compilation du fichier source itemcontainer.cpp) widgets D:\wxWidgets\include\wx\defs.h 707
Erreur C1083 Impossible d'ouvrir le fichier include : 'stddef.h' : No such file or directory (compilation du fichier source listbox.cpp) widgets D:\wxWidgets\include\wx\defs.h 707
Erreur C1083 Impossible d'ouvrir le fichier include : 'stddef.h' : No such file or directory (compilation du fichier source native.cpp) widgets D:\wxWidgets\include\wx\defs.h 707
Erreur C1083 Impossible d'ouvrir le fichier include : 'stddef.h' : No such file or directory (compilation du fichier source notebook.cpp) widgets D:\wxWidgets\include\wx\defs.h 707
Erreur C1083 Impossible d'ouvrir le fichier include : 'stddef.h' : No such file or directory (compilation du fichier source odcombobox.cpp) widgets D:\wxWidgets\include\wx\defs.h 707
Erreur C1083 Impossible d'ouvrir le fichier include : 'stddef.h' : No such file or directory (compilation du fichier source radiobox.cpp) widgets D:\wxWidgets\include\wx\defs.h 707
Erreur C1083 Impossible d'ouvrir le fichier include : 'stddef.h' : No such file or directory (compilation du fichier source searchctrl.cpp) widgets D:\wxWidgets\include\wx\defs.h 707
Erreur C1083 Impossible d'ouvrir le fichier include : 'stddef.h' : No such file or directory (compilation du fichier source slider.cpp) widgets D:\wxWidgets\include\wx\defs.h 707
Erreur C1083 Impossible d'ouvrir le fichier include : 'stddef.h' : No such file or directory (compilation du fichier source spinbtn.cpp) widgets D:\wxWidgets\include\wx\defs.h 707
Erreur C1083 Impossible d'ouvrir le fichier include : 'stddef.h' : No such file or directory (compilation du fichier source statbmp.cpp) widgets D:\wxWidgets\include\wx\defs.h 707
Erreur C1083 Impossible d'ouvrir le fichier include : 'stddef.h' : No such file or directory (compilation du fichier source static.cpp) widgets D:\wxWidgets\include\wx\defs.h 707
Erreur C1083 Impossible d'ouvrir le fichier include : 'stddef.h' : No such file or directory (compilation du fichier source textctrl.cpp) widgets D:\wxWidgets\include\wx\defs.h 707
Erreur C1083 Impossible d'ouvrir le fichier include : 'stddef.h' : No such file or directory (compilation du fichier source timepick.cpp) widgets D:\wxWidgets\include\wx\defs.h 707
Erreur C1083 Impossible d'ouvrir le fichier include : 'stddef.h' : No such file or directory (compilation du fichier source toggle.cpp) widgets D:\wxWidgets\include\wx\defs.h 707
Erreur C1083 Impossible d'ouvrir le fichier include : 'stddef.h' : No such file or directory (compilation du fichier source widgets.cpp) widgets D:\wxWidgets\include\wx\defs.h 707

PB
Part Of The Furniture
Part Of The Furniture
Posts: 1749
Joined: Sun Jan 03, 2010 5:45 pm

Re: Link errors with Trunk

Postby PB » Sun Feb 04, 2018 5:49 pm

The errors that you posted in the OP definitely look as building with leftovers, there have been wxStaticBox changes in the master recently.

I believe that if your compiler cannot find stddef.h, there may be something wrong with its setup. Haven't you reported similar issue before on wxTrac?

User avatar
doublemax
Moderator
Moderator
Posts: 12801
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Link errors with Trunk

Postby doublemax » Sun Feb 04, 2018 5:56 pm

I just made a clean pull into an empty directory and built both the libs and a few samples successfully (VS2013 Pro). There must be something wrong with your wx files.
Use the source, Luke!

raananb
Super wx Problem Solver
Super wx Problem Solver
Posts: 370
Joined: Fri Oct 27, 2006 4:35 pm
Location: Paris, France
Contact:

Re: Link errors with Trunk

Postby raananb » Sun Feb 04, 2018 9:39 pm

I did, and I still have problems with building wxWidgets:

I deleted the wxWidgets directory and cloned a new trunk.

Out-of-the-box build with wx_vc15.sln does not work. Files within the SDK are not found and are still signaled as missing.

Command-line build works as it should.

Building widgets.cpp with widgets_vc9.sln still missing defs.h. However, with nmake all is well.

The application now gets generated properly under VS2017.

I suppose that the parameters in .sln provided in wxWidgets need to be modified. I'll try to look into that later.

Last, if I knew what was wrong to begin with, I would have reported a bug.

User avatar
doublemax
Moderator
Moderator
Posts: 12801
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Link errors with Trunk

Postby doublemax » Sun Feb 04, 2018 9:58 pm

Maybe it's related to VS2017, which i can't test easily as having multiple VS versions on the same machine usually ends in misery.

I will try it when i find some time to setup a new VM with VS2017.

If someone else can test with VS2017, please do and report the results here. Thanks.
Use the source, Luke!

New Pagodi
Super wx Problem Solver
Super wx Problem Solver
Posts: 256
Joined: Tue Jun 20, 2006 6:47 pm
Contact:

Re: Link errors with Trunk

Postby New Pagodi » Sun Feb 04, 2018 11:51 pm

I just tried with visual studio 2017 (15.5.6 which I assume is the latest). I was able to build git master branch (library and minimal sample) with both nmake and msbuild.

I only tried the debug, shared, multilib configuration.

PB
Part Of The Furniture
Part Of The Furniture
Posts: 1749
Joined: Sun Jan 03, 2010 5:45 pm

Re: Link errors with Trunk

Postby PB » Mon Feb 05, 2018 6:28 am

I can confirm that wxWidgets master builds just fine with MSVC 2017, both with IDE and nmake (MS Visual Studio Express 2017 for Windows Desktop, version 15.5.5).

raananb
Super wx Problem Solver
Super wx Problem Solver
Posts: 370
Joined: Fri Oct 27, 2006 4:35 pm
Location: Paris, France
Contact:

Re: Link errors with Trunk

Postby raananb » Mon Feb 05, 2018 12:59 pm

My VS information (French):

-------- information provided by the package
Microsoft Visual Studio Community 2017
Version 15.5.2
VisualStudio.15.Release/15.5.2+27130.2010
Microsoft .NET Framework
Version 4.7.02556

Version installée : Community

Visual Basic 2017 00369-60000-00001-AA587
Microsoft Visual Basic 2017

Visual C# 2017 00369-60000-00001-AA587
Microsoft Visual C# 2017

Visual C++ 2017 00369-60000-00001-AA587
Microsoft Visual C++ 2017

Adaptateur de test pour Google Test 1.0
Active l'utilisation des outils de test de Visual Studio avec les tests unitaires écrits pour Google Test. Les conditions d'utilisation et les notifications tierces sont disponibles dans le répertoire d'installation de l'extension.

ASP.NET and Web Tools 2017 15.0.31125.0
ASP.NET and Web Tools 2017

Assistants Microsoft Visual C++ 1.0
Assistants Microsoft Visual C++

devCmd 1.0
Open Visual Studio Developer Command Prompt from Visual Studio IDE, Execute Commands directly from IDE, Can be acced from Tools Menu, Solution Explorer, Toolbar.

Gestionnaire de package NuGet 4.5.0
Gestionnaire de package NuGet dans Visual Studio. Pour plus d'informations sur NuGet, consultez la page http://docs.nuget.org/.

Microsoft JVM Debugger 1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Microsoft MI-Based Debugger 1.0
Provides support for connecting Visual Studio to MI compatible debuggers

Package hôte de l'adaptateur de débogage de Visual Studio Code 1.0
Couche d'interopérabilité pour l'hébergement d'adaptateurs de débogage Visual Studio Code dans Visual Studio

Package Microsoft Visual Studio VC 1.0
Package Microsoft Visual Studio VC

Service de langage JavaScript 2.0
Service de langage JavaScript

Test Adapter for Boost.Test 1.0
Enables Visual Studio's testing tools with unit tests written for Boost.Test. The use terms and Third Party Notices are available in the extension installation directory.

Visual Studio Tools pour CMake 1.0
Visual Studio Tools pour CMake

------------------------------- end of package information

I only tried to build the debug version using wx_vc15.sln

No update proposed, so impossible to check against the two posted VS tests.

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 2785
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Link errors with Trunk

Postby ONEEYEMAN » Mon Feb 05, 2018 4:04 pm

Hi,
There was a push for MSVC 2017 over the weekend.
Please check the commit log/trac tickets and rebuild with appropriate instructions.

Thank you.

raananb
Super wx Problem Solver
Super wx Problem Solver
Posts: 370
Joined: Fri Oct 27, 2006 4:35 pm
Location: Paris, France
Contact:

Re: Link errors with Trunk

Postby raananb » Mon Feb 05, 2018 5:01 pm

Updated to 15.5.6

Launched wx_vc15.sln of yesterday's clone.

(setup0.h already copied into setup.h)

Same problems:

Included files such as fcntl.h, stdio.h, stddef.h, string.h... not found

User avatar
doublemax
Moderator
Moderator
Posts: 12801
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Link errors with Trunk

Postby doublemax » Mon Feb 05, 2018 5:05 pm

Included files such as fcntl.h, stdio.h, stddef.h, string.h... not found
The include paths for standard headers are not explicitly given in the wx project files. These are in the VS settings. Maybe you've selected a wrong toolset which is not installed? AFAIK a default installation of VS2017 only installs the newest one. The older ones you have to select before installation.
Use the source, Luke!


Return to “Compiler / Linking / IDE Related”

Who is online

Users browsing this forum: No registered users and 3 guests