Page 1 of 1

MSVC++ 2005 EE, relative path problems when compiling

Posted: Fri Aug 18, 2006 3:57 am
by martin the third
Im trying to compile a small test application with wxWidgets (which was already successfully built). When it tries to compile my .rc file, I get this:

Code: Select all

fatal error RC1015: cannot open include file 'wx/msw/wx.rc'.
All that resides in my rc file is this:

Code: Select all

#include <wx/msw/wx.rc>
It seems like a path problem to me...even though I have "c:\wxWidgets\include" in my path.

I can sort of fix this problem by typing the entire path, but then I get the same problem with another file that wx.rc references, and if I fix that I get problems with 15 others that that file references, etc etc. It would be much easier if I could just fix the relative path issue.

Thanks,

-m3

Posted: Fri Aug 18, 2006 11:29 pm
by SnakeChomp
You need to add the wxWidgets include directory to the resource compiler paths just like you had to add them to the compiler include path. The resource compiler has its own include path.

Posted: Sat Aug 19, 2006 6:33 am
by martin the third
Thanks, I managed to fix it anyway, but did what you suggested anyway in hopes it would fix the problems that made...

Now I have huge lists of link errors (1659 of them), apparently it can't find the libraries Ive linked against.

The errors are all in the format:

Code: Select all

wxbase26.lib(stream.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4
wxbase26.lib(textbuf.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4
wxbase26.lib(strconv.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4
wxbase26.lib(ffile.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4
etc, etc.

The libraries I have linked are:
wxmsw26_core.lib wxbase26.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib winmm.lib comctl32.lib rpcrt4.lib wsock32.lib oleacc.lib shell32.lib gdi32.lib kernel32.lib user32.lib comdlg32.lib ole32.lib oleaut32.lib advapi32.lib uuid.lib

Both my wxWidgets build and my project are /MT and Release/Win32, using wxWidgets 2.6.3.

Thanks in advance,

-m3

Posted: Sat Aug 19, 2006 11:36 pm
by cpp
maybe you still have a problem somewhere in your paths, im pasting mine (they work) so you can compare them with yours:
library files:
C:\Program Files\Microsoft Platform SDK\Lib
$(WXWIN)\lib\vc_lib
$(VCInstallDir)lib
$(VCInstallDir)PlatformSDK\lib
$(FrameworkSDKDir)lib
$(VSInstallDir)
$(VSInstallDir)lib

include files
C:\Program Files\Microsoft Platform SDK\Include
$(WXWIN)\include
$(WXWIN)\lib\vc_lib\msw
$(WXWIN)\lib\vc_lib\msw\wx\msw
$(VCInstallDir)include
$(VCInstallDir)PlatformSDK\include
$(FrameworkSDKDir)include
they of course assume that you have properly configured the WXWIN enviromet variable to point to your wxWidgets directory.
with this setup, you dont even have to specify the wxWindows include directory to the resource compiler. (i never do, and it compiles just fine)
Check yours and make shure you have them all
HTH

Posted: Sun Aug 20, 2006 9:01 pm
by SnakeChomp
martin the third wrote:The errors are all in the format:

Code: Select all

wxbase26.lib(stream.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4
wxbase26.lib(textbuf.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4
wxbase26.lib(strconv.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4
wxbase26.lib(ffile.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4
A simple google search would have told you that you also need to link against bufferoverflowU.lib as well when using VS2005.

Posted: Thu Aug 24, 2006 12:17 pm
by martin the third
Thanks, I finally got it working.

Im now working on compiling wxMozilla and Im very close to completing that task.

-m3

Posted: Tue Oct 24, 2006 10:05 am
by zhouhao
martin the third wrote:Thanks, I finally got it working.

Im now working on compiling wxMozilla and Im very close to completing that task.

-m3
How do you compile that? I have totally no clue about it.


Thanks