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.
Compiling...
main.cpp
Linking...
wxbase26d.lib(filefn.obj) : error LNK2019: unresolved external symbol __imp__fileno referenced in function "enum wxFileKind __cdecl wxGetFileKind(struct _iobuf *)" (?wxGetFileKind@@YA?AW4wxFileKind@@PAU_iobuf@@@Z)
wxbase26d.lib(datetime.obj) : error LNK2001: unresolved external symbol __imp__timezone
C:\Documents and Settings\Joe\Desktop\wggg\Debug\wggg.exe : fatal error LNK1120: 2 unresolved externals
Build log was saved at "file://c:\Documents and Settings\Joe\Desktop\wggg\wggg\Debug\BuildLog.htm"
wggg - 3 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I compiled wx library in "multithread debug dll" mode, and so does my simple application. Then ignore "oldnames.lib." Please help me to solve those link errors.
i have 4 quick questions for some idea as to what's going wrong..
1) what was the make command you used to compile wxwidgets ( if you don't know recompile it )
2) did the samples and some of the contributed files compile properly when you tried?
3) what is the libraries you are linking against?
4) what are your linker flags you are using?
My computer is Windows XP sp2 with VC 2005 pro.
I followed the instructions here: http://www.wxwidgets.org/wiki/index.php ... _WxWidgets
According to that web page, I will build static link libraries in both Debug and Release mode.
- Select "Yes to all" to convert all projects to VC 2005.
- For each project, right click, click Properties. Configuration Properties -> C/C++ -> Code Generation
- For Debug, change Run Time Library to Multi-Threaded Debug
- For Release, change Runtime Library to Multi-Threaded
- Select Build->Batch build, and select all "Debug" and "Release" builds (not dll or unicode), press build.
- get "Build: 36 succeeded, 0 failed, 0 up-to-date, 0 skipped."
- close the VC window.
- Select "Yes to all" to convert all projects to VC 2005.
- For each project, right click, click Properties. Configuration Properties -> C/C++ -> Code Generation
- For Debug, change Run Time Library to Multi-Threaded Debug
- For Release, change Runtime Library to Multi-Threaded
- these actions are referenced from "How to setup MS VISUAL STUDIO .NET 2003" in http://forums.wxwidgets.org/viewtopic.php?t=255
- Select Build->Batch build, and select all "Debug" and "Release" builds (not dll or unicode), press build.
- get "Build: 14 succeeded, 0 failed, 0 up-to-date, 0 skipped."
- close the VC window.
4. Test the minimal code.
- Create a new Win32 empty project, add a new main.cpp into it.
- Paste the minimal code from http://forums.wxwidgets.org/viewtopic.php?t=255 to main.cpp.
- Configure properties different from default:
- Character Set: Not Set
- Additional Include Directories: $(WXWIN)\include;$(WXWIN)\contrib\include;$(WXWIN)\lib\vc_lib\mswd
- Preprocessor Definitions: WIN32;_DEBUG;__WXMSW__;__WXDEBUG__;_WINDOWS;NOPCH;_CRT_NONSTDC_NO_DEPRECATE
- Runtime Library: Multi-Threaded Debug (/MTd)
- Additional Library Directories: "$(WXWIN)\lib";"$(WXWIN)\contrib\lib";"$(WXWIN)\lib\vc_lib"
- Additional Dependencies: wxmsw26d_core.lib wxbase26d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib winmm.lib comctl32.lib rpcrt4.lib wsock32.lib oleacc.lib odbc32.lib
- Generate Manifest: No
5. Build the solution under Debug.
- Errors shows "can't find LIBCMTD.lib and OLDNAMES.lib" respectively.
- Add Ignored Specific Library: LIBCMTD.lib;OLDNAMES.lib
- Build again.