WxWidgets 2.6.2 and Visual Studio.net 2003 Topic is 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.
Seth Shapiro
In need of some credit
In need of some credit
Posts: 6
Joined: Thu Jan 12, 2006 5:44 pm
Location: Wichita, KS

WxWidgets 2.6.2 and Visual Studio.net 2003

Post by Seth Shapiro »

Hi all.

Totally green here. Very very green! :)

Trying to set everything up, Wxwidgets and Visual Studio.net 2003 Following the cross-platform book instructions.

Here is my dilemma.

I am getting the below error
fatal error LNK1104: cannot open file 'wxmsw26d_core.lib;'

Okay, I understand that its either:
1) Libraries haven
cpp
I live to help wx-kind
I live to help wx-kind
Posts: 195
Joined: Wed Sep 28, 2005 9:42 pm

Post by cpp »

You need to compile the library before you use it. See the install.txt file in the wxWidgets folder.
For the rest of the setup, check out the following topic
http://forums.wxwidgets.org/viewtopic.php?t=4388
HTH
Welcome to wxWidgets!
Hier Kommt die Sonne...
metalogic
Super wx Problem Solver
Super wx Problem Solver
Posts: 307
Joined: Fri Oct 08, 2004 8:21 am
Location: Area 51
Contact:

Post by metalogic »

You should look around these forums for links to beginner tutorials. That's your best bet.

Anyhow, what you need to do is build the libraries first. You will find
C:\wxWidgets-2.6.2\build\msw\wx.dsw

Open that (it's a 6.0 version so VC++ 2003 will ask if you want to convert, say yes). Then Build->Build Solution.

That will create your .lib files. Then you will have to setup your project to point to the right directories, etc. Like I said, you can find that in the tutorials (there are a handful).
CorsairX
Earned a small fee
Earned a small fee
Posts: 15
Joined: Tue Jan 17, 2006 5:30 pm
Contact:

Post by CorsairX »

Ah, a perfect guinea pig :lol:

I was recently having problems with wxWidgets and VS Studio 2003 and put a tute together - http://members.iinet.net.au/~corsairx/m ... VS2003.pdf

It might help; and I'd appreciate any feedback
cpp
I live to help wx-kind
I live to help wx-kind
Posts: 195
Joined: Wed Sep 28, 2005 9:42 pm

Post by cpp »

Very nice work CorsairX! i wish i saw something like this when i started in wxWidgets :D

One question tho, whats with the NOPCH preprocesor definition in debug mode?
Hier Kommt die Sonne...
Seth Shapiro
In need of some credit
In need of some credit
Posts: 6
Joined: Thu Jan 12, 2006 5:44 pm
Location: Wichita, KS

Post by Seth Shapiro »

Thanks for the tutorial. I built it and am getting one error.

Page 8 of your tutorial, shows the code I copied, if for the HelloWorldApp.cpp code.

c:\Documents and Settings\Owner\My Documents\Visual Studio Projects\wxDemo\HelloWorldApp.cpp fatal error [C1083: Cannot open include file: 'wx/wxprec.h': No such file or directory

I do have that file, wxprec.h, in my C:\wxWidgets-2.6.2\include\wx folder

Any ideas about this error? Am I not linking something properly?



[/b]
Ksmith22
I live to help wx-kind
I live to help wx-kind
Posts: 199
Joined: Mon Nov 21, 2005 4:34 pm

Post by Ksmith22 »

Seth Shapiro wrote:Thanks for the tutorial. I built it and am getting one error.

Page 8 of your tutorial, shows the code I copied, if for the HelloWorldApp.cpp code.

c:\Documents and Settings\Owner\My Documents\Visual Studio Projects\wxDemo\HelloWorldApp.cpp fatal error [C1083: Cannot open include file: 'wx/wxprec.h': No such file or directory

I do have that file, wxprec.h, in my C:\wxWidgets-2.6.2\include\wx folder

Any ideas about this error? Am I not linking something properly?
[/b]
Try instead:

Code: Select all

#include <wx/wxprec.h>
It has been my experience (with VS .NET 2003 at least) that anything not in the immediate directory (or accessed from the immediate directory) needs to use < > brackets rather than quotes.
Seth Shapiro
In need of some credit
In need of some credit
Posts: 6
Joined: Thu Jan 12, 2006 5:44 pm
Location: Wichita, KS

Post by Seth Shapiro »

Try instead:

Code: Select all

#include <wx/wxprec.h>
Thanks but that didnt do the trick. I tried that previously with no luck.

I am still getting the same error message fatal error [C1083: Cannot open include file: 'wx/wxprec.h': No such file or directory

Seems like something isnt linked properly? I am dumbstruck
metalogic
Super wx Problem Solver
Super wx Problem Solver
Posts: 307
Joined: Fri Oct 08, 2004 8:21 am
Location: Area 51
Contact:

Post by metalogic »

Right click on your project and select Properties. From there go to Configuration Properties -> C/C++ -> General
Make sure that under Additional Include Directories you have the wxWidgets directory. Something like this:
C:\wxWidgets-2.6.2\include
C:\wxWidgets-2.6.2\lib\vc_lib\msw
Seth Shapiro
In need of some credit
In need of some credit
Posts: 6
Joined: Thu Jan 12, 2006 5:44 pm
Location: Wichita, KS

Post by Seth Shapiro »

Metalogic, good call! I had "app" in my path, like "C:\app\wxWidgets-2.6.2\include" , so I removed it and the error disapeared

I am slowly but surely working through to my first WxWidgets program.

Now I have a new fatal error, wxDemo fatal error LNK1104: cannot open file 'wxmsw26d_core.lib;'

My path for that library is

Code: Select all

C:\wxWidgets-2.6.2\lib\vc_lib\wxmsw26d_core.lib
Not sure why I am getting the fatal error[/code]
Vexator
I live to help wx-kind
I live to help wx-kind
Posts: 187
Joined: Sun Jan 30, 2005 2:50 pm
Location: Heidelberg, Germany

Post by Vexator »

you do not only have to specify the additional include directories, but also the additional linrary directories :) it's in the linker options.
Windows 7 Pro
Visual Studio 2010
wxWidgets 2.9.3
metalogic
Super wx Problem Solver
Super wx Problem Solver
Posts: 307
Joined: Fri Oct 08, 2004 8:21 am
Location: Area 51
Contact:

Post by metalogic »

Like Vexator said, you also need to setup the additional include directories:

Right click on your project and select Properties. From there go to Configuration Properties -> Linker -> General
Make sure that under Additional Library Directories you have the wxWidgets directory. Something like this:
C:\wxWidgets-2.6.2\lib\vc_lib
CorsairX
Earned a small fee
Earned a small fee
Posts: 15
Joined: Tue Jan 17, 2006 5:30 pm
Contact:

Post by CorsairX »

Hi all,
Sorry for the delay in responding
cpp wrote:Very nice work CorsairX! i wish i saw something like this when i started in wxWidgets :D

One question tho, whats with the NOPCH preprocesor definition in debug mode?
It disables the use of pre-compiled headers which may interfere with debugging (or so I'm told - I've personally never had any trouble with it)
Ksmith22 wrote:It has been my experience (with VS .NET 2003 at least) that anything not in the immediate directory (or accessed from the immediate directory) needs to use < > brackets rather than quotes.
Again not something I've run into personally, but I've run into VS 2003 wackiness to believe it!

I'm going to clarify a couple of points in the tutorial based on the above, then I'll update it - also see if I can tidy up the wiki entry a little.
CorsairX
Earned a small fee
Earned a small fee
Posts: 15
Joined: Tue Jan 17, 2006 5:30 pm
Contact:

Post by CorsairX »

CorsairX wrote:Hi all,
Sorry for the delay in responding
cpp wrote:Very nice work CorsairX! i wish i saw something like this when i started in wxWidgets :D

One question tho, whats with the NOPCH preprocesor definition in debug mode?
It disables the use of pre-compiled headers which may interfere with debugging (or so I'm told - I've personally never had any trouble with it)
Just a quick note: Some equally quick tests shows that NOPCH prevents the use of MS precompiled headers - failing to do this may give you linking problem when build your project
engineer
Earned a small fee
Earned a small fee
Posts: 15
Joined: Sun Aug 29, 2004 1:56 am
Location: Germany
Contact:

Post by engineer »

I usually run in those problems, when installing a new version of wxWidgets, no matter wich IDE I use. I have to recompile th libs a several times before it works, however. Still did not figure out, what I am doing wrong. :?
J
Post Reply