Using MS VC++

General questions regarding the usage of CodeLite
DanishDynamite
CodeLite Curious
Posts: 2
Joined: Sat Jun 15, 2013 10:22 pm
Genuine User: Yes
IDE Question: C++
Contact:

Using MS VC++

Post by DanishDynamite »

Hi all,

I have just installed CodeLite on Windows 8 and it seems very good indeed. It works flawlessly with GCC/MinGW but I somehow cannot get it working with MS VC++.
Environmental paths are ok - I have the impression that this is something to do with make or makefiles.

It looks like CodeLite by default suggests the GCC make utility even for MS VC++. Builds fail (just hello world, plain C):

mingw32-make.exe[1]: *** [Debug/main.obj] Error -1073741515
mingw32-make.exe: *** [All] Error 2
test101.mk:92: recipe for target `Debug/main.obj' failed
mingw32-make.exe[1]: Leaving directory `D:/CodeLite/CodeLite/test101'



I tried to change to nmake.exe and it also fails:

test101.mk(6) : fatal error U1033: syntax error : '=' unexpected
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\nmake.exe"' : return code '0x2'



Does anyone know how to proceed from here?
Many thanks in advance for any input.
D.D.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Using MS VC++

Post by eranif »

codelite knows how to generate GNU makefiles, not nmake makefiles.
So changing the tool to NMAKE will not work.

However, using make with VC toolchain should work without a problem.
- Make sure that VC tools are in in the PATH (so codelite can invoke them)
- In the project settings page, make sure you have selected VC as the compiler
- You should also note that codelite does not auto-detect VC tools (CL.EXE, LINK.EXE etc)

The best thing to do is to open VS command shell and launch codelite from there - this will fix all your path issues

Last thing (which is important):
I don't recommend using VC with codelite due to one main reason:
- codelite has no support for debugging executable produced by VC

Eran
Make sure you have read the HOW TO POST thread
DanishDynamite
CodeLite Curious
Posts: 2
Joined: Sat Jun 15, 2013 10:22 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Using MS VC++

Post by DanishDynamite »

Thanks for trying to help, Eran. I am still in trouble though.
However, using make with VC toolchain should work without a problem.
- Make sure that VC tools are in in the PATH (so codelite can invoke them)
- In the project settings page, make sure you have selected VC as the compiler
- You should also note that codelite does not auto-detect VC tools (CL.EXE, LINK.EXE etc)
The path to the bin directory etc do not seem to be the problem.
If I go to Settings->Build Settings and click VC++ then "something" really needs to be in the path to the make utility. Leaving it blank doesn't work. The environment path is correct.
The best thing to do is to open VS command shell and launch codelite from there - this will fix all your path issues
I only have the free express tool. Searching the directories of Visual Studio doesn't indicate that there's a VS command shell there.

I really would like this stuff to work for me, so any further help you can provide would be very welcome.
User avatar
Jarod42
CodeLite Expert
Posts: 240
Joined: Wed Sep 30, 2009 5:54 pm
Genuine User: Yes
IDE Question: C++
Location: France
Contact:

Re: Using MS VC++

Post by Jarod42 »

my "Visual Studio Command Prompt (2010)" shortcut point to:

Code: Select all

%comspec% /k ""C:\Program Files\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"" x86
.
Post Reply