Visual C++ compiler in CodeLite

General questions regarding the usage of CodeLite
zuzu
CodeLite Enthusiast
Posts: 11
Joined: Tue Jan 12, 2010 9:27 pm
Genuine User: Yes
IDE Question: C++
Contact:

Visual C++ compiler in CodeLite

Post by zuzu »

Hi!

First of all, thanks for CodeLite it is great!

I have a question:
- How to configure CodeLite with a MSW (Visual C++ 2008 Express Edition) compiler as default?

Thanks
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Visual C++ compiler in CodeLite

Post by eranif »

Open your project settings, and change the compiler to VC++.

If you have some problems with the compiler tools, you can edit them from: settings -> build settings -> compilers, and select VC++.

Note that codelite fits the best with the GNU tools
Eran
Make sure you have read the HOW TO POST thread
zuzu
CodeLite Enthusiast
Posts: 11
Joined: Tue Jan 12, 2010 9:27 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Visual C++ compiler in CodeLite

Post by zuzu »

Open your project settings, and change the compiler to VC++.
I did it

Compiler output says:

----------Build Started--------
C:\WINDOWS\system32\cmd.exe /c ""C:/MinGW4/bin/mingw32-make.exe" -j 2 -f "vs_test_wsp.mk""
----------Building project:[ vs_test - Debug ]----------
mingw32-make[1]: Entering directory `C:/Documents and Settings/PeCe/Moje dokumenty/vs_test/vs_test'
Nazwa 'cl.exe' nie jest rozpoznawana jako polecenie wewn©trzne lub zewn©trzne,
program wykonywalny lub plik wsadowy.
mingw32-make[1]: *** [Debug/main.obj] Error 1
mingw32-make.exe: *** [All] Error 2
cl.exe /nologo /c "C:/Documents and Settings/PeCe/Moje dokumenty/vs_test/vs_test/main.cpp" /Zi /FoDebug/main.obj "/IC:/Program Files/Microsoft SDKs/Windows/v6.0A/Include" "/I."
mingw32-make[1]: Leaving directory `C:/Documents and Settings/PeCe/Moje dokumenty/vs_test/vs_test'
----------Build Ended----------
0 errors, 0 warnings


Why "mingw32" is used when I set VC++ compiler in "Project Setting" ?
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Visual C++ compiler in CodeLite

Post by eranif »

zuzu wrote:Why "mingw32" is used when I set VC++ compiler in "Project Setting" ?
Its because that mingw32-make is the builder, not the compiler.

You changed the compiler, but codelite still uses its makefiles to invoke the VC compiler (CL.EXE)

Eran
Make sure you have read the HOW TO POST thread
zuzu
CodeLite Enthusiast
Posts: 11
Joined: Tue Jan 12, 2010 9:27 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Visual C++ compiler in CodeLite

Post by zuzu »

But in the "Build Settings -> Build System," there are no other choices.

Image

What can i do?

Thanks
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Visual C++ compiler in CodeLite

Post by eranif »

There are no other "builders" (well, that is not entirely correct, in trunk there is a new builder for the "cobra" language, provided by hops)

What is the problem with the current builder? it is prefectly capable of running VC tools, I dont see the problem - its just the builder

Btw, can you translate the errors into English?
Eran
Make sure you have read the HOW TO POST thread
zuzu
CodeLite Enthusiast
Posts: 11
Joined: Tue Jan 12, 2010 9:27 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Visual C++ compiler in CodeLite

Post by zuzu »

Ok, i konw where is problem.

How to: Compile a Native C++ Program from the Command Line: http://msdn.microsoft.com/en-us/library ... 80%29.aspx
"The Visual Studio 2005 Command Prompt automatically sets up the correct path to the Visual C++ compiler and any needed libraries, so it is used instead of the regular Command Prompt window."

In default Command Prompt window cl.exe not work (name is not recognized),
because path for Visual Studio (include, libs etc.) directories not set.

We need first to run from the command line "C:\Program Files\Microsoft Visual Studio 9.0\VC\bin\vsvars32.bat" and only now can compile.

I tried set path for "C:\Program Files\Microsoft Visual Studio 9.0\VC\bin\vsvars32.bat" in Project Settings -> PreBuild" but nothing did help.

PS. Excuse me for my terrible English writing. Do you understand anything from this at all? (;
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Visual C++ compiler in CodeLite

Post by eranif »

I completely understand your problem.

Currently the only solution is to open the 'Visual Studion 2008 command prompt' from the menu, and then launch codelite from this shell. "\Program Files\CodeLite\CodeLite.exe"

This will load codelite with all the correct paths.

I am currently working on a better solution for this, but for now this is the only available solution

Eran
Make sure you have read the HOW TO POST thread
zuzu
CodeLite Enthusiast
Posts: 11
Joined: Tue Jan 12, 2010 9:27 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Visual C++ compiler in CodeLite

Post by zuzu »

Currently the only solution is to open the 'Visual Studion 2008 command prompt' from the menu, and then launch codelite from this shell. "\Program Files\CodeLite\CodeLite.exe"
Wow, it work! :)

Thanks!
Post Reply