Errors in Visual Studio 2005

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.
User avatar
T-Rex
Moderator
Moderator
Posts: 1249
Joined: Sat Oct 23, 2004 9:58 am
Location: Zaporizhzhya, Ukraine
Contact:

Post by T-Rex »

Well, it seems that al your error messages are UNICODE-related.
Does your project has the same "Use Unicode Libraries" switch same as all wxWidgets projects? And do all your wxWidgets projects have the same properties? ... try to set "Use Unicode Libraries" flag to false for wxWidgets projects and for your project. Don't forget rebuild them all.

I installed VC++ Express 2005 two days ago and successfully built wxWidgets using step by step plan from FAQ :) and my apps are working fine after migration to VC++ 2005

Could you post the list of errors that still appear (in case if it differs from previous one)?
binarybug
In need of some credit
In need of some credit
Posts: 1
Joined: Wed Dec 14, 2005 7:05 am

Post by binarybug »

I am also getting the same linker errors.After banging my head with VC 8 for 2 days I have brought down the linker errors from well over 100 to these 2 but I am stuck here.

Error 4 error LNK2019: unresolved external symbol "public: virtual __thiscall CPongFrame::~CPongFrame(void)" (??1CPongFrame@@UAE@XZ) referenced in function "public: virtual void * __thiscall CPongFrame::`scalar deleting destructor'(unsigned int)" (??_GCPongFrame@@UAEPAXI@Z) PongApp.obj
Error 5 error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup MSVCRTD.lib
Error 6 fatal error LNK1120: 2 unresolved externals E:\Me\Visual Studio 2005\Projects\Pong\Debug\wxPong.exe 1

The samples compile and link fine in release mode but I cant get my app to link.
Regarding the manifest error do this
Goto Project Properties -> Linker -> Manifest File -> Generate Manifest
and set this to false.I dont know whats it for but turning it off works.

Thanks
NinjaNL
Moderator
Moderator
Posts: 899
Joined: Sun Oct 03, 2004 10:33 am
Location: Oosterwolde, Netherlands

Post by NinjaNL »

Properties - Configuration Properties - General - Character Set

This is set to Use Unicode Character Set by default.

Change this to Not Set and se if this fixes the problem.
Follow the development of my screenplay authoring program at http://wxscreenplaywriter.blogspot.com/
lowjoel
Part Of The Furniture
Part Of The Furniture
Posts: 1511
Joined: Sun Jun 19, 2005 11:37 am
Location: Singapore
Contact:

Post by lowjoel »

make sure that c/C++->language->treat wchar_t as builtin type is yes, and that you are linking to a unicode library
vmcodes
In need of some credit
In need of some credit
Posts: 9
Joined: Mon Dec 05, 2005 1:30 am

Post by vmcodes »

Ive given up with Visual Studio 2005.

I got my installation of Visual Studio 6.0 up and running again. I also got wxWidgets to compile and my application to build with it.

These notes are perfect http://wiki.wxwindows.org/wiki.pl?User' ... r_VCpp_6.0

Atleast, I can get to work now. Need to migrate to Visual Studion 2005 down the line though..

Any breakthroughs, Please post here. I'll be checking in often..

Thanks

Vinay
vmcodes
In need of some credit
In need of some credit
Posts: 9
Joined: Mon Dec 05, 2005 1:30 am

Post by vmcodes »

Guess what, I opened the VC6 project I got running yesterday in VS2005. It converted the workspace and projects to its latest format and it works !!

I guess thats the easy way out now for every one else. Do everything for VC6, Get it running and then open VS 2005 and get to work :-)
priyank_bolia
wxWorld Domination!
wxWorld Domination!
Posts: 1339
Joined: Wed Aug 03, 2005 8:10 am
Location: BANGALORE, INDIA
Contact:

Post by priyank_bolia »

vmcodes wrote:Guess what, I opened the VC6 project I got running yesterday in VS2005. It converted the workspace and projects to its latest format and it works !!

I guess thats the easy way out now for every one else. Do everything for VC6, Get it running and then open VS 2005 and get to work :-)

I opened the minimal sample (dsw) in VC++ 2005, and change the .rc not to use WinXP Style, and compile the unicode DLL release, but it also crashes.
hajokirchhoff
Earned a small fee
Earned a small fee
Posts: 17
Joined: Fri Dec 23, 2005 4:43 pm
Contact:

Post by hajokirchhoff »

Please see http://litwindow.blogspot.com for the fix "wxWidgets DLL projects crash when compiled with Visual Studio 8".

Best regards

Hajo
--
wxVisualSetup - integrate wxWidgets into Visual Studio
http://www.litwindow.com/wxVisualSetup
Tips & Tricks for wxWidgets & MS Visual Studio
http://www.litwindow.com/Knowhow/knowhow.html?src=ml
priyank_bolia
wxWorld Domination!
wxWorld Domination!
Posts: 1339
Joined: Wed Aug 03, 2005 8:10 am
Location: BANGALORE, INDIA
Contact:

Post by priyank_bolia »

hajokirchhoff wrote:Please see http://litwindow.blogspot.com for the fix "wxWidgets DLL projects crash when compiled with Visual Studio 8".

Best regards

Hajo
Thanks, great information, what I did was:

Code: Select all

// ----------------------------------------------------------------------------
// WinMain
// ----------------------------------------------------------------------------

// Note that WinMain is also defined in dummy.obj, which is linked to
// an application that is using the DLL version of wxWidgets.

#if _MSC_VER >= 1400 && _WINDLL
#undef _WINDLL
#endif

#if defined(_WINDLL)

// DLL entry point

BOOL WINAPI
DllMain(HINSTANCE hModule, DWORD fdwReason, LPVOID WXUNUSED(lpReserved))
hajokirchhoff
Earned a small fee
Earned a small fee
Posts: 17
Joined: Fri Dec 23, 2005 4:43 pm
Contact:

Post by hajokirchhoff »

priyank_bolia wrote: Thanks, great information, what I did was:

Code: Select all

// ----------------------------------------------------------------------------
// WinMain
// ----------------------------------------------------------------------------

// Note that WinMain is also defined in dummy.obj, which is linked to
// an application that is using the DLL version of wxWidgets.

#if _MSC_VER >= 1400 && _WINDLL
#undef _WINDLL
#endif

Yes, that works of course.

Just for yours and everyones info: DllMain has not been used for a long time and the wxWidgets core developers have now removed it from the cvs HEAD version of main.cpp.

Best regards

Hajo
--
wxVisualSetup - integrate wxWidgets into Visual Studio
http://www.litwindow.com/wxVisualSetup
Tips & Tricks for wxWidgets & MS Visual Studio
http://www.litwindow.com/Knowhow/knowhow.html?src=ml
he
Earned a small fee
Earned a small fee
Posts: 13
Joined: Sat Nov 26, 2005 8:21 am

Post by he »

The thread is a bit old, but I had the same problem here. Someone posted the linker error:
lowjoel wrote:Test.obj : error LNK2001: unresolved external symbol "wchar_t const * const wxEmptyString" (?wxEmptyString@@3PB_WB)
The problem on my machine was: wxWidgets was compiled with VC6, while a test project was compiled with VS2005 (migration test). wxEmptyString is in wxBase, but under a different mangled name. Someone gave the solution:
lowjoel wrote:make sure that c/C++->language->treat wchar_t as builtin type is yes, and that you are linking to a unicode library
But in this scenario (wxWidgets built with VS6, project build with VS2005) the opposite is correct: set this option to No!

Heiner
priyank_bolia
wxWorld Domination!
wxWorld Domination!
Posts: 1339
Joined: Wed Aug 03, 2005 8:10 am
Location: BANGALORE, INDIA
Contact:

Post by priyank_bolia »

why don't compile wxWidgets also with VS2005
he
Earned a small fee
Earned a small fee
Posts: 13
Joined: Sat Nov 26, 2005 8:21 am

Post by he »

priyank_bolia wrote:why don't compile wxWidgets also with VS2005
Because I am currently testing the migration. If it succeeds, I probably will.

Heiner
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 »

I sugest you try 2005Express again. here are complete instructions:
http://forums.wxwidgets.org/viewtopic.php?t=6261
Follow them exactly and you shouldnt have amy problems.
HTH
Hier Kommt die Sonne...
Post Reply