Author Topic: imported VC++ 6 project does not build  (Read 9782 times)

Offline ooo7

  • Multiple posting newcomer
  • *
  • Posts: 14
imported VC++ 6 project does not build
« 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


Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: imported VC++ 6 project does not build
« Reply #1 on: January 26, 2011, 07:30:17 pm »
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.
« Last Edit: January 26, 2011, 07:33:23 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline ooo7

  • Multiple posting newcomer
  • *
  • Posts: 14
Re: imported VC++ 6 project does not build
« Reply #2 on: January 27, 2011, 12:45:18 pm »
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.




« Last Edit: January 27, 2011, 01:02:34 pm by ooo7 »

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: imported VC++ 6 project does not build
« Reply #3 on: January 27, 2011, 01:02:07 pm »
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.

Offline ooo7

  • Multiple posting newcomer
  • *
  • Posts: 14
Re: imported VC++ 6 project does not build
« Reply #4 on: January 27, 2011, 01:04:00 pm »
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)