HOWTO: wxWidgets + VC2005 Express WITH ONLINE HELP!!!

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.
cpp
I live to help wx-kind
I live to help wx-kind
Posts: 195
Joined: Wed Sep 28, 2005 9:42 pm

HOWTO: wxWidgets + VC2005 Express WITH ONLINE HELP!!!

Post by cpp » Tue Jan 31, 2006 1:26 am

i wrote this in a text file so i would remember all steps required to setup VC2005 Express for use with wxWidgets, its a gathering of several articles & notes ibe found arround.

hope you find it usefull.

UPDATE: this giude should work for wxWidgets 2.63. when something in inapropiate for wxWidgets 2.63 it will be specifically noticed.

TODO for Visual C++ 2005 Express & wxWidgets 2.62 (2.63)

1.- Download and install VC2005 & MSDN Express (follow microsoft
Last edited by cpp on Wed Apr 05, 2006 1:24 am, edited 9 times in total.
Hier Kommt die Sonne...

nibor
In need of some credit
In need of some credit
Posts: 7
Joined: Wed Feb 16, 2005 2:30 pm

Post by nibor » Sat Feb 04, 2006 10:47 am

could you post how to compile the wx DLLs ?

I get this error
------ Build started: Project: dbgrid, Configuration: DLL Unicode Debug Win32 ------
Linking...
LINK : fatal error LNK1104: cannot open file '..\..\lib\vc_dll\wxbase26ud_odbc.lib'

Which is not created

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 » Sat Feb 04, 2006 8:42 pm

ibe never used wxWidgets as a DLL (i dont like dlls), but the same steps above should apply to the dll build as well.
maybe you forgot to set

Code: Select all

// Define 1 to use ODBC classes
#define wxUSE_ODBC          1
in the setup.h file before compiling the library? it is set to 0 by default

HTH
Hier Kommt die Sonne...

emarti
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 210
Joined: Sat May 07, 2005 8:24 pm
Location: Eskisehir, TURKEY
Contact:

Post by emarti » Sun Feb 05, 2006 3:04 am

nibor wrote:could you post how to compile the wx DLLs ?

I get this error
------ Build started: Project: dbgrid, Configuration: DLL Unicode Debug Win32 ------
Linking...
LINK : fatal error LNK1104: cannot open file '..\..\lib\vc_dll\wxbase26ud_odbc.lib'

Which is not created
If ( you have VC )
{
I am using nmake. Edit makefile.vc & config.vc in wx/build folder before compiling.

"Shared = 1" for wx DLL using.
};
- T U R K E Y ?
- I love this country!

WebSites:
http://mebt.sourceforge.net/
http://wxquran.sourceforge.net/

nibor
In need of some credit
In need of some credit
Posts: 7
Joined: Wed Feb 16, 2005 2:30 pm

Post by nibor » Sun Feb 05, 2006 9:10 am

The odbc lib is not created, the DLL of it is.
The problem is a faulty dependency in the dsw file.

Follow these extra steps to compile all the DLL's
-------------------------------------------
1 )
Open the Project Dependency of "DBGRID", you have to uncheck
odbc. After that open the Properties of "DBGRID" and go
to Configuration Properties -> Linker.

2)
Remove from the "Additional Dependencies" list : ..\..\lib\vc_dll\wxbase26ud_odbc.lib

3)
And add this one to the "Ignore specific Library" (don't know if the step is mandatory)

4)
Build the whole solution, it doesn't do this in the right order, so you have to press F5 (build) a couple of times. All DLL's will be build correctly.

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

I tried this for DLL Unicode Release and DLL Unicode Static.


Btw, I don't like DLL's either, but because I need to create plugins (as DLL's) which also need WX, it's not that efficient to create them all with static linking.

jsoldi
Experienced Solver
Experienced Solver
Posts: 73
Joined: Thu Feb 02, 2006 6:03 am

I need wxtiffd.lib file

Post by jsoldi » Tue Feb 07, 2006 6:44 am

I don't know why does the wxtiffd.lib (requiered to create wxWidgets Applications with VC++ Express...) file is not created when I build the wx proyect with VC++.

nibor
In need of some credit
In need of some credit
Posts: 7
Joined: Wed Feb 16, 2005 2:30 pm

Post by nibor » Tue Feb 07, 2006 8:45 am

If you follow the steps, it should create the lib.
I'm using VC++ 2005 Express edition aswell.

Static linking works great with the steps mentioned by the TS, and for the DLL build I need the additional steps I described above.

jsoldi
Experienced Solver
Experienced Solver
Posts: 73
Joined: Thu Feb 02, 2006 6:03 am

fatal error CVT1100: duplicate resource. type:MANIFEST...

Post by jsoldi » Wed Feb 08, 2006 6:26 am

I've got this error when I try to compile any of the wx samples. I have already created the libraries. I got rid of the error message when I dissable incremental linking. Anyway, I guess I shouldn't get this error message, because the instructions doesn't say anything about it. Did I do anything wrong? Is this the better way to fix the problem?

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 » Wed Feb 08, 2006 7:15 am

as it sais in the instructions (under the "notes for your projects" section),
you need to add

Code: Select all

#define wxUSE_NO_MANIFEST 1
in the application
Hier Kommt die Sonne...

jsoldi
Experienced Solver
Experienced Solver
Posts: 73
Joined: Thu Feb 02, 2006 6:03 am

Sorry guys, I have a new problem

Post by jsoldi » Wed Feb 08, 2006 8:28 am

I get a hundred errors like "unresolved external..." for, I guess, every wx function called by the application. Now I'm trying to compile not a sample (the samples run ok), but an application imported from wxDevC++. Maybe the proyect isn't linked to the wx libraries. The wx libraries and includes directories are included on the VC++ Directories.

fourcorner
Earned a small fee
Earned a small fee
Posts: 11
Joined: Sun Nov 13, 2005 5:00 pm
Location: Grenzach-Wyhlen, Germany

Post by fourcorner » Tue Feb 28, 2006 1:25 pm

hello,
I tried to build the solution like it is said above. But I get allways this error:

..\..\include\wx/msw/wrapwin.h(47) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory

and this very often...

can anybody help me?

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 » Tue Feb 28, 2006 9:58 pm

sounds like your PSDK is not installed correctly, (windows.h is part of it), did you install the PSDK? and did you register its directories in VC?
Hier Kommt die Sonne...

fourcorner
Earned a small fee
Earned a small fee
Posts: 11
Joined: Sun Nov 13, 2005 5:00 pm
Location: Grenzach-Wyhlen, Germany

Post by fourcorner » Thu Mar 02, 2006 8:21 am

oh...no, I didn't.

Could you tell how I have to do this?

thx Julian

Doggan
Knows some wx things
Knows some wx things
Posts: 25
Joined: Mon Jan 30, 2006 5:09 pm

Post by Doggan » Thu Mar 02, 2006 1:45 pm

fourcorner wrote:oh...no, I didn't.

Could you tell how I have to do this?

thx Julian
I posted something regarding this on the wiki. You can download the Windows Platform SDK by doing a google search for Windows SDK. It is the first link (you will be redirected). Then you just have to set your project settings to point to the SDK include/library directories, as it installs in a different location than VC++ Express Edition is configured to look.

Microsoft didn't see fit to provide the SDK with VC++ Express Edition, but it is provided with Standard/Pro editions. They are trying to get people totally dependent on .NET I guess :P

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 » Thu Mar 02, 2006 10:08 pm

fourcorner, i dint provide step by step instructions on installing the PSDK in the HOWTO for one reason:
if you look at the start page when you open VC2005 express, you will see a direct link under the "Getting started" section wich sais "Download the PSDK", just click it, and you will get step by step instruction on what to do. It doesnt get much easier than that. :D

Since it seems some people overlook this, ibe edited the how-to to show it.
Hier Kommt die Sonne...

Post Reply