wxDev-C++ for Visual C++

If you are using wxDev-C++ for your wxWidgets design, please ask your questions here instead of in IDE Related.
Opeth
Earned a small fee
Earned a small fee
Posts: 19
Joined: Thu Jan 26, 2006 3:05 pm

Post by Opeth » Fri Jun 02, 2006 1:59 am

Thanks, it is compiling now

but there is an error when I compile an existing project:
" c:\Dev-Cpp\lib\gcc\mingw32\3.4.2\include\syslimits.h [Error C1021] invalid preprocessor command 'include_next' "

and there is another error when I compile a new wxWidgets Frame project:
" *** multiple target patterns. Stop. "

I have followed the option config instructions at: http://wxdsgn.sourceforge.net/tutorial/ ... tions.html

Do you have any ideas?

Thanks.

lowjoel
Moderator
Moderator
Posts: 1511
Joined: Sun Jun 19, 2005 11:37 am
Location: Singapore
Contact:

Post by lowjoel » Fri Jun 02, 2006 2:06 am

go to tools >compiler options>C and C++ includes

for each tab move the include to C:\program files\wxDev-C++\include right to the bottom. The plaform SDK and the VC includes should be above the MingW ones.

Opeth
Earned a small fee
Earned a small fee
Posts: 19
Joined: Thu Jan 26, 2006 3:05 pm

Post by Opeth » Fri Jun 02, 2006 5:30 am

hi, I have done so, now I got other kinds of errors for my existing project, eg:
"1252 C:\Dev-Cpp\include\winbase.h [Error C2144] syntax error : 'void' should be preceded by ';' "
"1252 C:\Dev-Cpp\include\winbase.h [Error C2501] 'DECLSPEC_NORETURN' : missing storage-class or type specifiers "

[edit]
Oh, I have just found the problem for:
" *** multiple target patterns. Stop. "
It is because the file path containing the new project has some non-english characters.

But then compiling the new project would yield the same errors, i.e.:
"1252 C:\Dev-Cpp\include\winbase.h [Error C2144] syntax error : 'void' should be preceded by ';' "
"1252 C:\Dev-Cpp\include\winbase.h [Error C2501] 'DECLSPEC_NORETURN' : missing storage-class or type specifiers "
[/edit]

Thanks.

lowjoel
Moderator
Moderator
Posts: 1511
Joined: Sun Jun 19, 2005 11:37 am
Location: Singapore
Contact:

Post by lowjoel » Fri Jun 02, 2006 9:06 am

did you include the platform SDK's path above the wxdev-C++ include path? wxDev-C++'s include dir must be right at the bottom

Opeth
Earned a small fee
Earned a small fee
Posts: 19
Joined: Thu Jan 26, 2006 3:05 pm

Post by Opeth » Fri Jun 02, 2006 10:42 am

oh I just found out that I put the SDK path wrong, careless me..

sorry that there is another error after fixing that:
" *** No rule to make target `C:/p1/Project1_private.res', needed by `Project1.exe'. Stop. "

Hopefully that is the last one :)
Thanks.

FYI, the makefile.win is like that:

Code: Select all

# Project: Project1
# Makefile created by wxDev-C++ 6.10 on 02/06/06 18:38
# Compiler: 
# CompilerType: 1

CPP       = cl.exe /nologo
CC        = cl.exe /nologo
WINDRES   = rc.exe
RES       = C:/p1/Project1_private.res
OBJ       = Project1Frm.obj Project1App.obj $(RES)
LINKOBJ   = Project1Frm.obj Project1App.obj $(RES)
LIBS      = /libpath:"C:/Program Files/Microsoft Visual Studio .NET 2003/Vc7/PlatformSDK/Lib" /libpath:"C:/Program Files/Microsoft Visual Studio .NET 2003/Vc7/lib" wxmsw26.lib  
INCS      =
CXXINCS   = /I"C:/Program Files/Microsoft Visual Studio .NET 2003/Vc7/include" /I"C:/Program Files/Microsoft Visual Studio .NET 2003/Vc7/PlatformSDK/Include" /I"C:/Dev-Cpp/include/c++/3.4.2/backward" /I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" /I"C:/Dev-Cpp/include/c++/3.4.2" /I"C:/Dev-Cpp/include/wx/msw" /I"C:/Dev-Cpp/include/wx/generic" /I"C:/Dev-Cpp/include/wx/animate" /I"C:/Dev-Cpp/include/wx/fl" /I"C:/Dev-Cpp/include/wx/gizmos" /I"C:/Dev-Cpp/include/wx/html" /I"C:/Dev-Cpp/include/wx/mmedia" /I"C:/Dev-Cpp/include/wx/net" /I"C:/Dev-Cpp/include/wx/ogl" /I"C:/Dev-Cpp/include/wx/plot" /I"C:/Dev-Cpp/include/wx/protocol" /I"C:/Dev-Cpp/include/wx/stc" /I"C:/Dev-Cpp/include/wx/svg" /I"C:/Dev-Cpp/include/wx/xml" /I"C:/Dev-Cpp/include/wx/xrc" /I"C:/Dev-Cpp/include/wx" /I"C:/Dev-Cpp/lib/msw" /I"C:/Dev-Cpp/include"
RCINCS    = /I"C:/Dev-Cpp/Include"
BIN       = Project1.exe
DEFINES   =  /D__WXMSW__ /DWXUSINGDLL
CXXFLAGS  = $(CXXINCS) $(DEFINES)   /EHa /QIfdiv /QI0f /QIfist /Ze
CFLAGS    = $(INCS) $(DEFINES)   /QIfdiv /QI0f /QIfist /Ze
GPROF     = gprof.exe
RM        = rm -f
LINK      = link.exe /nologo

.PHONY: all all-before all-after clean clean-custom
all: all-before Project1.exe all-after

clean: clean-custom
	$(RM) $(OBJ) $(BIN)

$(BIN): $(OBJ)
	$(LINK) $(LINKOBJ) /out:"Project1.exe" $(LIBS)

Project1Frm.obj: Project1Frm.cpp
	$(CPP) /c Project1Frm.cpp /FoProject1Frm.obj $(CXXFLAGS)

Project1App.obj: Project1App.cpp
	$(CPP) /c Project1App.cpp /FoProject1App.obj $(CXXFLAGS)

Project1_private.res: Project1_private.rc Project1App.rc 
	$(WINDRES) /r /fo"$(RES)" $(RCINCS) Project1_private.rc

lowjoel
Moderator
Moderator
Posts: 1511
Joined: Sun Jun 19, 2005 11:37 am
Location: Singapore
Contact:

Post by lowjoel » Fri Jun 02, 2006 11:51 am

Execute a rebuild all, also go to the project options and just click ok (It should regenerate the paths.)

if it still doesnt work use tree /a /f C:\<myproject directory> and PM me. thanks.

Opeth
Earned a small fee
Earned a small fee
Posts: 19
Joined: Thu Jan 26, 2006 3:05 pm

Post by Opeth » Fri Jun 02, 2006 1:39 pm

I have also tried to delete the make file and then rebuild, but it didn't generate a "correct" one as well.

I found that if I manually change the line:
RES = C:/p1/Project1_private.res
to
RES = Project1_private.res

Then it would be okay, but I don't know why the makefile generation doesn't work well. I have pm'ed you the tree result.

Well, unfortunately, I found that wxmsw26.lib is missing
actually I don't have the "C:\Dev-cpp\lib\vc_dll" directory, I guess wxmsw26.lib is contained in it. So how do I get it? some devpak?

Thanks a lot!

lowjoel
Moderator
Moderator
Posts: 1511
Joined: Sun Jun 19, 2005 11:37 am
Location: Singapore
Contact:

Post by lowjoel » Fri Jun 02, 2006 4:17 pm

isnt wxmsw27u there?

Opeth
Earned a small fee
Earned a small fee
Posts: 19
Joined: Thu Jan 26, 2006 3:05 pm

Post by Opeth » Sat Jun 03, 2006 3:17 am

I have installed 2 wxDevCpp (original and VC branch) and I have mixed them up... I have reinstalled everything and vc_dll containing wxmsw27u is included in the lib path now.

After manually changing the makefile: (what should I do to make the automatic makefile generation work?)
"RES = C:/p1/Project1_private.res"
to
"RES = Project1_private.res "

There is yet another linkage error:
"dllimport C:\p1\Project1Frm.obj : error LNK2019: unresolved external symbol "__declspec [Error LNK2019] unresolved external symbol "__declspec(dllimport) public: __thiscall wxString::wxString(unsigned short const *)" ([email protected]@[email protected]@Z) referenced in function "public: __thiscall Project1Frm::Project1Frm(class wxWindow *,int,class wxString const &,class wxPoint const &,class wxSize const &,long)" ([email protected]@[email protected]@@[email protected]@[email protected]@[email protected]@[email protected]) "

(wxDev-C++'s include dir is right at the bottom)



I also tried to use the default mingw compiler to compile a new project without setting anything, it doesn't compile too. :?:



Thanks.

lowjoel
Moderator
Moderator
Posts: 1511
Joined: Sun Jun 19, 2005 11:37 am
Location: Singapore
Contact:

Post by lowjoel » Sat Jun 03, 2006 3:31 am

oh yes, if you are using VC 7 you MUST pass /Zc:wchar_t (or go to the project options>compiler options>language options and change "make wchar_t a native type"). This is because under VC 8 (for standards conformance wchar_t is a native type but in 7.1 it has to be explicitly set).

Opeth
Earned a small fee
Earned a small fee
Posts: 19
Joined: Thu Jan 26, 2006 3:05 pm

Post by Opeth » Sat Jun 03, 2006 5:00 am

Right, I have done so, and finally it compiles successfully now!

But unfortunately, there is a runtime error saying "MSVCP80.dll is missing" :shock:

Well, perhaps I should try VC8?
I am too lazy to edit the makefile manually too.

Anyway, thanks a lot for your prompt replies and generous help. Keep on the good work, Joel. :)

lowjoel
Moderator
Moderator
Posts: 1511
Joined: Sun Jun 19, 2005 11:37 am
Location: Singapore
Contact:

Post by lowjoel » Sat Jun 03, 2006 5:48 am

ARGH... i forgot i dynamicaly linked to VC 8!... sorry if you are using 7.1... I used to have the Toolkit on my computer but since I had VC 8 I uninstalled it... (after all i couldnt do debugging with it, I didnt have the import libraries for msvcp71d.dll and for msvcr71d.dll and so I couldnt debug with it...

...so yes you are probably going to have to build it yourself... I was thinking of writing an automated build tool in C++ to build wxWidgets for people... perhaps as part of the VC environment thing...

tbreina
Moderator
Moderator
Posts: 1289
Joined: Thu Nov 25, 2004 7:38 pm
Location: Coronado, CA

Post by tbreina » Sat Jun 03, 2006 7:07 am

I was thinking of writing an automated build tool in C++ to build wxWidgets for people... perhaps as part of the VC environment thing...
upCase wrote a nice GUI that allows you to make your own builds of wxWidgets. Go to http://www.upcase.de/. Then select "Working stuff" and "wxWidgets installer".

-Tony
Everybody's got something to hide except for me and my monkey.

Muffin
In need of some credit
In need of some credit
Posts: 1
Joined: Thu May 25, 2006 9:16 am

undetected pathes by Enviroment Setup

Post by Muffin » Sat Jun 03, 2006 1:46 pm

Downloading the Microsoft Visual C++ Toolkit 2003 is currently broken because Microsoft stopped offering it and replaced it with the free Visual C++ 2005 Express Edition. Is it supported even though it is currently not auto-detected?

I installed the Windows Server 2003 R2 Platform SDK (released March 2006) and it seems that it is not detected by wxDevCpp Enviroment Setup. Shall I step back to the previous version of platform sdk?

lowjoel
Moderator
Moderator
Posts: 1511
Joined: Sun Jun 19, 2005 11:37 am
Location: Singapore
Contact:

Post by lowjoel » Sun Jun 04, 2006 4:51 am

Hmm... I think I'll work on the VC env setup soon... after i migrate to 2003 R2......

but I don't know whether to let users download VC 2005 Express instead of VC toolkit 2003 (or any microsoft compiler as of now)...

Post Reply