Problem compiler visual studio 2017,wxwidgets 3.14,error link2001

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.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7449
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Problem compiler visual studio 2017,wxwidgets 3.14,error link2001

Post by ONEEYEMAN »

Hi,
How did you build wxWidgets?.

Thank you.
User avatar
doublemax
Moderator
Moderator
Posts: 19102
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Problem compiler visual studio 2017,wxwidgets 3.14,error link2001

Post by doublemax »

Valerio wrote: Mon Mar 15, 2021 1:34 pm now i recompile wxwidgets 3.14,all ok,but when launch my app,compare this error :
error LNK2038: rilevata errata corrispondenza per 'RuntimeLibrary': il valore 'MDd_DynamicDebug' non corrisponde al valore 'MTd_StaticDebug' in 16-Bit Flash Programmer.obj
Which setting in my project do setting?
Project properties -> C/C++ -> Code Generation -> Runtime Library
The setting there must be the same for all components. In your case the setting that was used to build wxWidgets is different from the setting in your app.
Use the source, Luke!
Valerio
Knows some wx things
Knows some wx things
Posts: 42
Joined: Tue Apr 17, 2018 9:58 am

Re: Problem compiler visual studio 2017,wxwidgets 3.14,error link2001

Post by Valerio »

ok i'll try to do this setting,
thanks for help,
Vale
Peter H
In need of some credit
In need of some credit
Posts: 9
Joined: Fri Mar 12, 2021 12:29 pm

Re: Problem compiler visual studio 2017,wxwidgets 3.14,error link2001

Post by Peter H »

Hello,

I found this short tutorial on Youtube: https://youtu.be/sRhoZcNpMb4
It shows how to set up wxWidgets for VS2017 and VS2019.
It also shows how to import a property sheet to set up a new project for wxWidgets.
I have not tried this yet, before I did not know about property sheets, but I think it might be helpful.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7449
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Problem compiler visual studio 2017,wxwidgets 3.14,error link2001

Post by ONEEYEMAN »

Hi,
Please don't use any 3rd party video, tutorial, links or anything.
Whatever works for other people may not work for you or you specific setup.

Use OFFICIAL resources - documentation, samples, this forum, mailing lists. In that order.

I suggest to copy the minimal sample project somewhere, open minimal_vcN file inside the MSVC, chenge the directories as appropriate (this is you project, so you can use full path instead of relative ones) and compile.
Make sure that it works.

Then add you code and build it.

Thank you.
Peter H
In need of some credit
In need of some credit
Posts: 9
Joined: Fri Mar 12, 2021 12:29 pm

Re: Problem compiler visual studio 2017,wxwidgets 3.14,error link2001

Post by Peter H »

Honestly, without some tutorials on Youtube that demonstrated wxwidgets and its installation and usage I would not be here.
The tutorial I pointed to, just illustrates what is described in install.md and points you to "install.md".
Additionally it shows some subtile differences between VS2017 and VS2019, where to find stuff, what is not found in "install.md".

It might be a better idea for beginners to create projects and compile wxWidgets using Dialogblocks, this is much easier. Unfortunately there are no tutorials about it on youtube.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7449
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Problem compiler visual studio 2017,wxwidgets 3.14,error link2001

Post by ONEEYEMAN »

Hi,
All I'm saying is that you SHOULD START with the official documentation.
Then go to the official channels - mailing lists, this forum, SO...

Then if (and its a huge if) everything else fails - go to google.

One more time - every single setup is different. What works for one person and satisfying he/her needs will not work for another person.

And if it would be my preference - this would be a portion of the official documentation in regards to the MSVC:
Those are the solutions that corresponds to the appropriate MSVC versions:

wx_vcN --> MSVC version XXX

Install MSVC.
Start the IDE
Go to File->Open, navigate to the wxWidgets\build\msw and open appropriate solution for your version of MSVC (see the table above)
Go to Build->Batch Build, click "Select ALL", then click "Build"
Go relax a little
When the build finish, open wxWidgets\samples\minimal\minimal.sln/dsw (latest).
Let it convert if needed
Go to Build->Build solution
Execute the sample

In order to build your own project:

Copy the folder wxWidgets\samples\minimal somewhere in order to not pollute the library sources
Open the project as in the above from the place you copied it
Click on the project properties and fix the directories for include and libraries. (DO NOT CHANGE ANYTHING ELSE)
Make sure it still compiles and runs
Add you source code.
Build and test
What could be simpler than this?

Unless of course you want to be involve in the wxWidgets development.
Then those instructions will be a little more complicated.

Thank you.
Peter H
In need of some credit
In need of some credit
Posts: 9
Joined: Fri Mar 12, 2021 12:29 pm

Re: Problem compiler visual studio 2017,wxwidgets 3.14,error link2001

Post by Peter H »

Yes, this is almost the content of another tutorial I found on youtube, which got me going with wxWidgets and VStudio. ;-)
https://youtu.be/FOIbK4bJKS8
It is interesting to see this video is 1 1/2 years old and has more than 486000 views, more than this forum has members and posts.
But still I think, compiling with Dialogblocks is better, because you can easily change and customize the compilation without knowing all these makefile arguments.

And no I will not be a wxWidgets developer I am a bloody beginner and never have done GUI programming in C++ before.
Additionally I recommend to enable concurrent compiling, this speeds up the compiling more than 4 times.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7449
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Problem compiler visual studio 2017,wxwidgets 3.14,error link2001

Post by ONEEYEMAN »

Hi,
All those people are very much wrong!!

As I said - start with official channels (documentation, mailing list(s), forum, SO, etc).
Then go to google if ALL above fails.

This has to be alpha and omega of the software development and should be inscribed in every single software department of every single school in the world.

Besides - it will greatly improve you English as you will be pushed to communicate with people all over the world tpo explain the problem and then understand their response. What more would you want? ;-)

And about D::B - it is one of the possibilities.
But I (for one) prefer MSVC as it is native to the OS and will generate better code and have an amazing debugger.

Thank you.
Post Reply