Code::Blocks Forums
User forums => Help => Topic started by: ooo7 on January 26, 2011, 06:45:41 pm
-
Hello,
i am new to Code::Blocks so please be gentle :lol:
i have a vc++6 project (complex one) and would like to port it to code::blocks. i have imported .dsw file and there were one warning thrown saying failed to import *any* projects. this didnt make sense hence ignored it.
I select the default compiler and the debugger as settings-> Compiler and debugger settings -> Microsoft visual c++ 2005/2008. I can see all the files and and also c::b allows me to find definitions etc...
how ever when i try to build the project i get lots of errors!!!!! same project i can build vc++6 without any problems.
||=== xxxxxxx, Win32 Debug ===|
c:\program files\microsoft visual studio\vc98\include\ocidl.h|4675|error C4430: missing type specifier - int assumed. Note: C++ does not support default-int|
c:\program files\microsoft visual studio\vc98\atl\include\atlbase.h|769|error C2065: 'T' : undeclared identifier|
c:\program files\microsoft visual studio\vc98\atl\include\atlbase.h|816|error C2061: syntax error : identifier 'T'|
c:\program files\microsoft visual studio\vc98\atl\include\atlbase.h|818|error C2065: 'ppT' : undeclared identifier|
c:\program files\microsoft visual studio\vc98\atl\include\atlcom.h|2282|warning C4346: 'ATL::CComObjectRootEx<ThreadModel>::ATL::CComObjectRootEx<ThreadModel>::_ThreadModel::AutoCriticalSection' : dependent name is not a type|
c:\program files\microsoft visual studio\vc98\atl\include\atlcom.h|2282|error C2146: syntax error : missing ';' before identifier '_CritSec'|
c:\program files\microsoft visual studio\vc98\atl\include\atlcom.h|2282|error C4430: missing type specifier - int assumed. Note: C++ does not support default-int|
c:\program files\microsoft visual studio\vc98\atl\include\atlcom.h|2299|error C2146: syntax error : missing ';' before identifier 'm_critsec'|
c:\program files\microsoft visual studio\vc98\atl\include\atlcom.h|2299|error C4430: missing type specifier - int assumed. Note: C++ does not support default-int|
c:\program files\microsoft visual studio\vc98\atl\include\atlcom.h|2299|error C4430: missing type specifier - int assumed. Note: C++ does not support default-int|
c:\program files\microsoft visual studio\vc98\atl\include\atlcom.h|2632|warning C4346: 'contained::_ThreadModel::ThreadModelNoCS' : dependent name is not a type|
c:\program files\microsoft visual studio\vc98\atl\include\atlcom.h|2632|error C2923: 'ATL::CComObjectRootEx' : 'contained::_ThreadModel::ThreadModelNoCS' is not a valid template type argument for parameter 'ThreadModel'|
c:\program files\microsoft visual studio\vc98\atl\include\atlcom.h|2633|error C2955: 'ATL::CComObjectRootEx' : use of class template requires template argument list|
c:\program files\microsoft visual studio\vc98\atl\include\atlcom.h|2724|warning C4346: 'contained::_ThreadModel::ThreadModelNoCS' : dependent name is not a type|
c:\program files\microsoft visual studio\vc98\atl\include\atlcom.h|2724|error C2923: 'ATL::CComObjectRootEx' : 'contained::_ThreadModel::ThreadModelNoCS' is not a valid template type argument for parameter 'ThreadModel'|
c:\program files\microsoft visual studio\vc98\atl\include\atlcom.h|2725|error C2955: 'ATL::CComObjectRootEx' : use of class template requires template argument list|
c:\program files\microsoft visual studio\vc98\atl\include\atlcom.h|2851|warning C4346: 'contained::_ThreadModel::ThreadModelNoCS' : dependent name is not a type|
c:\program files\microsoft visual studio\vc98\atl\include\atlcom.h|2851|error C2923: 'ATL::CComObjectRootEx' : 'contained::_ThreadModel::ThreadModelNoCS' is not a valid template type argument for parameter 'ThreadModel'|
c:\program files\microsoft visual studio\vc98\atl\include\atlcom.h|2852|error C2955: 'ATL::CComObjectRootEx' : use of class template requires template argument list|
c:\program files\microsoft visual studio\vc98\atl\include\atlcom.h|3259|error C2065: 'j' : undeclared identifier|
c:\program files\microsoft visual studio\vc98\atl\include\atlcom.h|3983|warning C4346: 'ATL::IDispEventImpl<nID,T,pdiid,plibid,wMajor,wMinor,tihclass>::_tihclass' : dependent name is not a type|
c:\program files\microsoft visual studio\vc98\atl\include\atlcom.h|3983|error C2143: syntax error : missing ';' before 'ATL::IDispEventImpl<nID,T,pdiid,plibid,wMajor,wMinor,tihclass>::_tih'|
c:\program files\microsoft visual studio\vc98\atl\include\atlcom.h|3983|error C4430: missing type specifier - int assumed. Note: C++ does not support default-int|
c:\program files\microsoft visual studio\vc98\atl\include\atlcom.h|3983|error C2888: 'IDispEventImpl<nID,T,pdiid,plibid,wMajor,wMinor,tihclass>::_tihclass _tihclass' : symbol cannot be defined within namespace 'ATL'|
c:\program files\microsoft visual studio\vc98\atl\include\atlcom.h|3983|fatal error C1903: unable to recover from previous error(s); stopping compilation|
||=== Build finished: 20 errors, 5 warnings ===|
can somebody help me to figure out the problem.
thanks
ooo7
-
Read and Follow: http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F
Verify you are compiling an C++ file instead of C file.
Verify your Compiler is setup right using an Hello World type program.
Tim S.
-
Hi,
Yeah the problem was with the compiler settings.
I just followed
http://wiki.codeblocks.org/index.php?title=Integrating_Microsoft_Visual_C_6_with_Code::Blocks_IDE
and most of the PROJECTS ARE BUILDING AND LINKING EXCEPT FOR one.
I have visually compared both VC++ project settings and C::B settings and both seems to be identical.
so now i need some help from you guys to find out how to see al the libs C::B using during linking process.
kind regards
ooo7
Just found the way to do it..
so its in project options and linker settings and then given the libs.
-
If you turn on full commandline logging as recommended in the link Tim gave you, you can see the whole commandline C::B uses to invoke vc++.
There is no invisible magic besides this.
-
Hi,
I added the relevant libs via linker settings and bingo its building and linking.
now would like to know are there anyway that i can debug VC++6 project through code::blocks?
thanks
ooo7 8)