Page 2 of 2

memo technique

Posted: Thu Mar 16, 2006 12:15 pm
by JPlaroche
Visual C++
How to: Use Visual C++ Express Edition with the Microsoft Platform SDK

You can use Visual C++ 2005 Express Edition to build powerful .NET Framework applications immediately after installation. In order to use Visual C++ Express Edition to build Win32 applications, you will need to take just a few more steps, as detailed below.

Installing the Platform SDK for use with Visual C++ Express Edition
Install the Microsoft Platform SDK over the Web from the Platform . On that page click Download and then make sure to choose Windows SDK and then Core SDK from the list.

From the Tools menu in Visual Studio, select Options. The Options dialog box appears.

From the Options dialog box, expand the Projects and Solutions node and select VC++ Directories. In that section, add the following paths to the appropriate subsection:

Executable files: C:\Program Files\Microsoft SDK\Bin

Include files: C:\Program Files\Microsoft SDK\include

Library files: C:\Program Files\Microsoft SDK\lib

Note
The location of the Platform SDK might be different on your system.


Update the corewin_express.vsprops file (found in C:\Program Files\Microsoft Visual Studio 8\VC\VCProjectDefaults) and change the string that reads:

AdditionalDependencies="kernel32.lib"

to:

AdditionalDependencies="kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib"

Note
Visual C++ Express Edition might be installed in a different location on your system.

VS express not saving changes

Posted: Sat Mar 18, 2006 6:57 pm
by eggsy84
Hi all

Have followed the instructions and all seems fine until I close the solution, has anyone had a problem with Visual Express not saving changes made to project properties?

IE

I make the listed changed to the projects then either :

Close the solution and choose save

OR

Choose File > Save All and the Exit / Close

Then when i reload the project the changes are reflected and have been lost??

Has anyone else had this problem?

Probably more of an Visual studio post but thought I'd ask the helpful wx crowd

Posted: Sun Mar 19, 2006 4:11 am
by cpp
i havent had any problems like the one you describe. Theres only 3 thing i can think about:

A) the directory where your wxWigets lives is read only. (but i think VC would warn you about this)

B) The "original" projects & solution (wx.dsw) that come with wxWidgets, are VC6 version, when you open them with VC2005, a new solution (extension sln, and with the nice VC2005 icon) is created, and when you edit the projects, you are in fact editing the new projects from the new solution created by the VC2005 import wizzard, maybe when you re-open the solution you are opening the old (VC6 .dws) one instead of the newly created .sln one?

C) if your wx directory is not read only, and you are opening the right solution, then maybe there is in fact a bug in VC2005 that i havent encountered yet?

Im guessing B is the more likely :D

HTH

B Option

Posted: Sun Mar 19, 2006 1:05 pm
by eggsy84
Yeah definately think its option B as it asks me to convert each time!!

Will check that

Thanks for the reply

Posted: Sun Mar 19, 2006 6:06 pm
by daesdemon
Hi,

To cpp
Just a little post to say, that i didn't use all the steps you posted before and i was able to compile wxWidgets and minimal sample without any problems.
I only install the PSDK and do required file modifs, but didn't change anything in wxWidgets.
I used the wx.dsw , convert all and build.
Only thing is that i had to build multiple time cause of the dependencies, and dbgrid didn't compile as nibor explain before.

I only have problems with dll version and don't know why.
i get this:
minimal.obj : error LNK2001: unresolved external symbol "protected: static struct wxEventTable const wxFrame::sm_eventTable" (?sm_eventTable@wxFrame@@1UwxEventTable@@B)
minimal.obj : error LNK2001: unresolved external symbol "class wxWindowList wxTopLevelWindows" (?wxTopLevelWindows@@3VwxWindowList@@A)
minimal.obj : error LNK2001: unresolved external symbol "protected: static class wxAppConsole * wxAppConsole::ms_appInstance" (?ms_appInstance@wxAppConsole@@1PAV1@A)
minimal.obj : error LNK2001: unresolved external symbol "public: static unsigned int const wxStringBase::npos" (?npos@wxStringBase@@2IB)
minimal.obj : error LNK2001: unresolved external symbol "char const * const wxStatusLineNameStr" (?wxStatusLineNameStr@@3PBDB)
minimal.obj : error LNK2001: unresolved external symbol "class wxPoint const wxDefaultPosition" (?wxDefaultPosition@@3VwxPoint@@B)
minimal.obj : error LNK2001: unresolved external symbol "class wxSize const wxDefaultSize" (?wxDefaultSize@@3VwxSize@@B)
minimal.obj : error LNK2001: unresolved external symbol "char const * const wxFrameNameStr" (?wxFrameNameStr@@3PBDB)
minimal.obj : error LNK2001: unresolved external symbol "char const * const wxEmptyString" (?wxEmptyString@@3PBDB)
minimal.obj : error LNK2001: unresolved external symbol "int const wxEVT_NULL" (?wxEVT_NULL@@3HB)
minimal.obj : error LNK2001: unresolved external symbol "int const wxEVT_COMMAND_MENU_SELECTED" (?wxEVT_COMMAND_MENU_SELECTED@@3HB)
minimal.obj : error LNK2001: unresolved external symbol "protected: static class wxAppConsole * (__cdecl* wxAppConsole::ms_appInitFn)(void)" (?ms_appInitFn@wxAppConsole@@1P6APAV1@XZA)
Would someone have an idea about that?
What is the difference between wx.dsw and dx_dll.dsw because there is DLL release and debug in both.
Isn't that redondant ?

Posted: Sun Mar 19, 2006 6:48 pm
by daesdemon
Ho forget about my precedent question about dll.
I only forget to define preprocessor: WXUSINGDLL
That works now ;).

So to get back from the beginning, to be able to compile minimal sample with VSExpress2005

Install VSExpress and PSDK as specified in cpp post before
Convert all wx proj
Remove the odbc dependency of db grid as nibor says before.
Build solution many times while there are some projects in error.
You now have a wxWidget libs compiled in any configuration you want.
Copy minimal proj from samples dir outside wxwidgets
modify the relative paths to what they should be.

PS: If you want to compile from dll version you need to have the prepocessor definition WXUSINGDLL

That was what worked for me.
Quite easy ;)

Posted: Wed Apr 05, 2006 1:12 am
by cpp
Hi! i updated the HOWTO:
-- added instructions for wxWidgets 2.6.3
-- added the aditional steps needed to compile as DLL (thanks nibor)
-- added a "sugestion" to link statically to the VC runtime i suggest you follow it!

if anyone finds any inaccurate info on the howto, please reply here and i will "fix it" :D

To the forum admins:
maybe consider making this thread a "sticky" (again) ?

VC++ Express with SDK, just a small problem

Posted: Tue Jun 13, 2006 11:36 pm
by phoenixatyork
I have installed the SDK and wxwidgets, though i receive this error message:
C:\Program Files\Microsoft Visual Studio 8\VC\include\stdio.h(345) : see declaration of 'sprintf'
Message: 'This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_DEPRECATE. See online help for details.'
..\..\src\tiff\tif_getimage.c(337) : warning C4996: 'sprintf' was declared deprecated
C:\Program Files\Microsoft Visual Studio 8\VC\include\stdio.h(345) : see declaration of 'sprintf'

I think it has to do with the _CRT_SECURE DEPRECATE you mentioned above...

However i have tried to open the file in the root C:\Program Files\Microsoft Visual Studio 8\VC\VCProjectDefaults
called corewin_express, however i do not understand what i should be opening it in and how i should change it?

Any ideas?

TIm

Posted: Wed Jun 14, 2006 1:35 am
by cpp
to edit that file, you can open it with visual studio itself, or notepad (any text editor will do).
once you open it, delete all its contents, and copy/paste the xml code from step 3 of the HOWTO, save the file, and restart VC.

Please note that this will save you from getting those warnings in you projects, but you might still get the warnings compiling wxWidgets itself, unless you also define both CRT_SECURE_NO_DEPRECATE and _CRT_NONSTDC_NO_DEPRECATE when you compile the wxWidgets library, (how to do this is explained in the HOWTO - step 7).

HTH