Page 1 of 1

Support MS vs compiler

Posted: Tue Mar 18, 2008 7:45 pm
by Satervalley
Hi, It's a great IDE, espacially it's done mainly by one person and contributed for free using. thanks the authorl

my suggestion is, can codelite supports ms vs compiler, I installed vs2005 express in my system, it's great to develop something using codelite with vs2005 express compiler and wxWidgets, thank u.

Re: Support MS vs compiler

Posted: Tue Mar 18, 2008 9:45 pm
by eranif
CodeLite already has the basics needed for building with MS tools.

When creating a project, make sure that the new project has compiler of type 'VC++'
Also, when creating new project, there is list of 'project types' to select from, all the one starting with 'vc-*' are designed for working with VC

Eran

Re: Support MS vs compiler

Posted: Fri Jan 30, 2009 9:23 am
by Navid
Thanks You for this great IDE Eran!

Are the supplied project templates also supposed to work with VC++ Express 2008 compilers? I have set the environment variables in WinXP and the VC executable tool chain template does not find the VC include path.

The linker also complains of an extra operand (the .obj file) when called by the IDE, which then turns to mingw32-make.exe.

Thanks again!

Re: Support MS vs compiler

Posted: Fri Jan 30, 2009 2:15 pm
by eranif
Navid wrote:The linker also complains of an extra operand (the .obj file) when called by the IDE, which then turns to mingw32-make.exe.
Can u paste the output from the 'Build' tab?

Eran

Re: Support MS vs compiler

Posted: Sat Jan 31, 2009 2:04 am
by Navid
Thanks for the reply!

This is the output for a simple Hello World build using <iostream>. The project template was using New vc-executable.

I have manually set the include path for the VC includes in the project settings (Compile tab/Additional Search Paths), added /EHsc compiler option for enabling exception handling.

This is the output. I have to say, CodeLite is absolutely marvellous!

Thank you again!

----------Build Started--------
"mingw32-make.exe" -j 2 -f "ch02_wsp.mk"
----------Building project:[ deleteme2 - Debug ]----------
cl.exe /nologo /c "C:/Documents and Settings/Navid/My Documents/Visual Studio 2008/Programming-code/Chapter02/deleteme2/deleteme2.cpp" /Zi /EHsc /FoDebug/deleteme2.obj "/I"C:/Program Files/Microsoft Visual Studio 8/VC/include"" "/I." "/IC:/Program Files/Microsoft Visual Studio 9.0/VC/include"
deleteme2.cpp
cl : Command line warning D9024 : unrecognized source file type 'Files/Microsoft', object file assumed
cl : Command line warning D9027 : source file 'Files/Microsoft' ignored
cl : Command line warning D9024 : unrecognized source file type 'Visual', object file assumed
cl : Command line warning D9027 : source file 'Visual' ignored
cl : Command line warning D9024 : unrecognized source file type 'Studio', object file assumed
cl : Command line warning D9027 : source file 'Studio' ignored
cl : Command line warning D9024 : unrecognized source file type '8/VC/include', object file assumed
cl : Command line warning D9027 : source file '8/VC/include' ignored
link.exe /nologo /OUT:Debug/deleteme2.exe Debug/deleteme2.obj "/LIBPATH:"C:/Program Files/Microsoft Visual Studio 8/VC/lib"" /DEBUG
link.exe: extra operand `Debug/deleteme2.obj'
Try `link.exe --help' for more information.
mingw32-make.exe[1]: *** [Debug/deleteme2.exe] Error 1
mingw32-make.exe: *** [All] Error 2
----------Build Ended----------
0 errors, 0 warnings

Re: Support MS vs compiler

Posted: Sat Jan 31, 2009 2:53 am
by sdolim
I see a quotation problem in the -I flags. Do you have quotes in your include path directories?

Edit: actually only one of them seems to have a problem: "/I"C:/Program Files/Microsoft Visual Studio 8/VC/include""

Scott

Re: Support MS vs compiler

Posted: Sat Jan 31, 2009 4:02 am
by Navid
I did not enter any quotation marks and they appear to have been inserted by CodeLite. Using the command generated by CodeLite with or without the double-quotes produces the same linker error message as reported by the IDE when using the command line in the DOS command shell. I am no means a VC++ expert. Still, I would think it unlikely that the command line options of the VC++ toolchain would have changed between VC++ 2005 and VC++ 2008.

Thanks,

Navid

Re: Support MS vs compiler

Posted: Sat Jan 31, 2009 5:03 am
by eranif
Navid wrote:I did not enter any quotation marks and they appear to have been inserted by CodeLite
The problem is in (from the menu) settings -> build settings -> VC++ -> advanced

You dont need to update the project settings for adding the VC include path and the library path, it can be done there globally for the compiler -> without the extra quotations

Eran

Re: Support MS vs compiler

Posted: Sat Jan 31, 2009 6:20 am
by Navid
Thank you again.

The paths are now corrected! The linker error was actually from the MingW linker that was being called as it was found in the PATH environment variable first!

Now if I could only figure out why MS link.exe can't find kernel32.dll despite the correct version of Windows SDK/windowssdkdir being installed/set I'd be set ... :-)

CodeLite is obviously doing its work correctly. Thank you again!

Navid

Re: Support MS vs compiler

Posted: Sat Jan 31, 2009 7:38 am
by Navid
Just in case anyone else wants to use the VC++ 2008 Express toolchain with CodeLite, these were the additional steps that were necessary in my case on Windows XP Pro SP3 to get things going:

After installation of the VC/CodeLite packages,

run vcvarstall.bat located in C:\Program Files\Microsoft Visual Studio 9.0\VC to set up most of the environment variables for using the Visual Studio command line tools.

Make sure the Windows SDK v6.0A in installed (location: C:\Program Files\Microsoft SDKs\Windows) and that an environment variable called LIB is set to C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib

(In some cases though not mine, an additional environment variable called windowssdkdir needs to be set to the path: C:\Program Files\Microsoft SDKs\Windows\v6.0A)


The bin path to the MingW tools might be located before the VC++ toolchain. Therefore:

In CodeLite's Settings -> Build Setings -> [Compile Tab] -> VC++ -Tools:
I set the Compiler Name: to: "cl.exe /nologo /c /EHsc" (without the quotes)
Linker Name: to: {"C:\Program Files\Microsoft Visual Studio 9.0\VC\bin\link.exe" /nologo} (without the curley braces but with the quotes)
Shared Object Linker: to: {"C:\Program Files\Microsoft Visual Studio 9.0\VC\bin\link.exe" /DLL /nologo} (without the curley braces)
and the Archives Tool: to: {"C:\Program Files\Microsoft Visual Studio 9.0\VC\bin\link.exe" /nologo} (without the curley braces)

In CodeLite's Settings -> Build Setings -> [Compile Tab] -> VC++ ->Advanced:
I set the Include Path to "C:\Program Files\Microsoft Visual Studio 9.0\VC\include" (without the quotes)
and the Libraries Path to "C:\Program Files\Microsoft Visual Studio 9.0\VC\lib" (also without the quotes)

Hopefully, this will be useful to someone.