Configure codelite to use msvc toolchain
-
- CodeLite Enthusiast
- Posts: 30
- Joined: Wed May 20, 2009 1:54 am
- Contact:
Configure codelite to use msvc toolchain
Hi,
me again
Now cegcc is configured I have some source code that can only be compiled with msvc targetting Windows Mobile.
I have started from VC++ compiler template and I am trying to compile my project.
First issue I have is with preprocessor because I am supposed to use the following defines :
/D_WIN32_WCE=0x420 /DUNDER_CE /DWIN32_PLATFORM_PSPC /DWINCE /D_WINDOWS /DARM /D_ARM_ /D_UNICODE
/DUNICODE
So I have added them in Compiler Switches but then when I build my solution I cannot see them :
cl.exe /nologo /c "C:/cygwin-1.7/home/Vincent/projects/gynoid/trunk/src/gynoid/src/GDAddrBook.cpp" -g /Fo./Debug/GDAddrBook.obj "/IC:/Program Files/Microsoft Visual Studio 9.0/VC/ce/include" "/IC:/Program Files/Windows Mobile 5.0 SDK R2/PocketPC/Include/Armv4i" "/I." "/I." "/I../../include"
What am I doing wrong ?
me again
Now cegcc is configured I have some source code that can only be compiled with msvc targetting Windows Mobile.
I have started from VC++ compiler template and I am trying to compile my project.
First issue I have is with preprocessor because I am supposed to use the following defines :
/D_WIN32_WCE=0x420 /DUNDER_CE /DWIN32_PLATFORM_PSPC /DWINCE /D_WINDOWS /DARM /D_ARM_ /D_UNICODE
/DUNICODE
So I have added them in Compiler Switches but then when I build my solution I cannot see them :
cl.exe /nologo /c "C:/cygwin-1.7/home/Vincent/projects/gynoid/trunk/src/gynoid/src/GDAddrBook.cpp" -g /Fo./Debug/GDAddrBook.obj "/IC:/Program Files/Microsoft Visual Studio 9.0/VC/ce/include" "/IC:/Program Files/Windows Mobile 5.0 SDK R2/PocketPC/Include/Armv4i" "/I." "/I." "/I../../include"
What am I doing wrong ?
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Configure codelite to use msvc toolchain
Wrong placesmartmobili wrote:So I have added them in Compiler Switches but then when I build my solution I cannot see them :
You should add them into the project settings (pretty similar to the visual studio).
right click on the project -> settings -> compiler -> preprocessor
and add them as semi-colon list like this:
Code: Select all
_WIN32_WCE=0x420;UNDER_CE;WIN32_PLATFORM_PSPC
In general, codelite's project settings is modeled after VS settings (mainly)
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Enthusiast
- Posts: 30
- Joined: Wed May 20, 2009 1:54 am
- Contact:
Re: Configure codelite to use msvc toolchain
Ok I have also added the following flags in preprocessor /FD /EHsc /Gm /MTd /GS- /fp:fast /GR- /W3 /c /Zi /TP
event if I find it weird to put it here.
Anyway I can see there are added as shown below :
cl.exe /nologo /c "C:/cygwin-1.7/home/Vincent/projects/gynoid/trunk/src/gynoid/src/wince/OS_GDImaging.cpp" /D_DEBUG /D_WIN32_WCE=0x502/DUNDER_CE /DWIN32_PLATFORM_PSPC /DWINCE /D_WINDOWS /DARM /D_ARM_ /D_UNICODE /DGYNOID_EXPORTS /FD /EHsc /Gm /MTd /GS- /fp:fast /GR- /W3 /c /Zi /TP /Fo./Debug/OS_GDImaging.obj "/I." "/IC:/Program Files/Microsoft Visual Studio 9.0/VC/ce/ATLMFC/INCLUDE" "/IC:/Program Files/Microsoft Visual Studio 9.0/VC/ce/INCLUDE" "/IC:/Program Files/Windows Mobile 5.0 SDK R2/PocketPC/Include/Armv4i" "/I." "/I../../include"
I think you should have a database for compiler settings where people could store common toolchain for codelite.
for instance I could provide the following :
msvc-ce-wm5
msvc-ce-wm6
arm-mingw32ce
Thanks.
event if I find it weird to put it here.
Anyway I can see there are added as shown below :
cl.exe /nologo /c "C:/cygwin-1.7/home/Vincent/projects/gynoid/trunk/src/gynoid/src/wince/OS_GDImaging.cpp" /D_DEBUG /D_WIN32_WCE=0x502/DUNDER_CE /DWIN32_PLATFORM_PSPC /DWINCE /D_WINDOWS /DARM /D_ARM_ /D_UNICODE /DGYNOID_EXPORTS /FD /EHsc /Gm /MTd /GS- /fp:fast /GR- /W3 /c /Zi /TP /Fo./Debug/OS_GDImaging.obj "/I." "/IC:/Program Files/Microsoft Visual Studio 9.0/VC/ce/ATLMFC/INCLUDE" "/IC:/Program Files/Microsoft Visual Studio 9.0/VC/ce/INCLUDE" "/IC:/Program Files/Windows Mobile 5.0 SDK R2/PocketPC/Include/Armv4i" "/I." "/I../../include"
I think you should have a database for compiler settings where people could store common toolchain for codelite.
for instance I could provide the following :
msvc-ce-wm5
msvc-ce-wm6
arm-mingw32ce
Thanks.
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Configure codelite to use msvc toolchain
These should be in the 'Compiler Options' text field, like this:smartmobili wrote:Ok I have also added the following flags in preprocessor /FD /EHsc /Gm /MTd /GS- /fp:fast /GR- /W3 /c /Zi /TP
/FD;/EHs;/Gm etc.
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Enthusiast
- Posts: 30
- Joined: Wed May 20, 2009 1:54 am
- Contact:
Re: Configure codelite to use msvc toolchain
Arghhh actually I did it but stilll doesn't work!eranif wrote:These should be in the 'Compiler Options' text field, like this:smartmobili wrote:Ok I have also added the following flags in preprocessor /FD /EHsc /Gm /MTd /GS- /fp:fast /GR- /W3 /c /Zi /TP
/FD;/EHs;/Gm etc.
Eran
Now make is calling the wrong compiler g++ instead of msvc cl.
make[1]: warning: -jN forced in submake: disabling jobserver mode.
"C:/cygwin-1.7/bin/make.exe" -j 2 -f "static_libgynoid_wsp.mk"
----------Building project:[ static_libgynoid - Debug ]----------
make[1]: warning: -jN forced in submake: disabling jobserver mode.
g++ -c "C:/cygwin-1.7/home/Vincent/projects/gynoid/trunk/src/gynoid/src/GDAddrBook.cpp" /FD /EHsc /Gm /MTd /GS- /fp:fast /GR- /W3 /c /Zi /TP -D/D_DEBUG -D/D_WIN32_WCE=0x502 -D/DUNDER_CE -D/DWIN32_PLATFORM_PSPC -D/DWINCE -D/D_WINDOWS -D/DARM -D/D_ARM_ -D/DUNICODE -D/D_UNICODE -D/DGYNOID_EXPORTS -o ./Debug/GDAddrBook.o "-I." "-I." "-I../../include"
/bin/sh: g++: command not found
When looking at makefile I have this :
## Debug
ConfigurationName :=Debug
IntermediateDirectory :=./Debug
OutDir := $(IntermediateDirectory)
LinkerName:=g++
ArchiveTool :=ar rcu
SharedObjectLinkerName :=g++ -shared -fPIC
...
Why do I have g++ instead of cl ? I tried to replace it by cl but codelite is replacing it evrytime I launch a build.
Could it be because I have renamed directly in the xml file the default VC++ into MSVCWM5 Professional ?
I am going to reinstall it completely.
You do not have the required permissions to view the files attached to this post.
-
- CodeLite Enthusiast
- Posts: 30
- Joined: Wed May 20, 2009 1:54 am
- Contact:
Re: Configure codelite to use msvc toolchain
I have reinstalled and now it works again ...
Another thing when pasting a path in Build Settings->Build Systems I always forget to use POSIX paths and I already
report you this problem but you told me it was already handled but that 's not the case!
When I copy/paste from explorer path for make I have C:\cygwin-1.7\bin\make.exe but it doesn't work even if
I declare the nodoswaring.
Why don't you replace \ by / because since you are using a posix shell to call command it will work with cygwin and
mingw ?
UPDATE: So I managed to compile my project one time and just to be sure I tried to compile it once again and I had an issue
about missing headers. When looking at global settings, include and lib path have disappeared....
It seems codelite is following quantum mechanics, you never know if it will compile.
I will try to see if it happen again and will try to find what I did.
Last remark, in a source file when I click on an include and I want to open it in editor the following dialog appears : As you can see path are truncated and I need to resize dialog to show the full path, couldn't be possible to automatically calculate the largest width and
display the dialog with the right size ? I know that's a detail but that'sthe kinf of things that make differences between ide or editors.
Thanks
Another thing when pasting a path in Build Settings->Build Systems I always forget to use POSIX paths and I already
report you this problem but you told me it was already handled but that 's not the case!
When I copy/paste from explorer path for make I have C:\cygwin-1.7\bin\make.exe but it doesn't work even if
I declare the nodoswaring.
Why don't you replace \ by / because since you are using a posix shell to call command it will work with cygwin and
mingw ?
UPDATE: So I managed to compile my project one time and just to be sure I tried to compile it once again and I had an issue
about missing headers. When looking at global settings, include and lib path have disappeared....
It seems codelite is following quantum mechanics, you never know if it will compile.
I will try to see if it happen again and will try to find what I did.
Last remark, in a source file when I click on an include and I want to open it in editor the following dialog appears : As you can see path are truncated and I need to resize dialog to show the full path, couldn't be possible to automatically calculate the largest width and
display the dialog with the right size ? I know that's a detail but that'sthe kinf of things that make differences between ide or editors.
Thanks
You do not have the required permissions to view the files attached to this post.
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Configure codelite to use msvc toolchain
Can u paste a build log where it happens to you?smartmobili wrote:Another thing when pasting a path in Build Settings->Build Systems I always forget to use POSIX paths and I already
report you this problem but you told me it was already handled but that 's not the case!
Maybe it has something to do with the fact that its author has a a major physics? could be...smartmobili wrote:It seems codelite is following quantum mechanics, you never know if it will compile.
Or simply make the dialog resize-able (and remembers its size/pos)smartmobili wrote:As you can see path are truncated and I need to resize dialog to show the full path, couldn't be possible to automatically calculate the largest width and
display the dialog with the right size ? I know that's a detail but that'sthe kinf of things that make differences between ide or editors.
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Enthusiast
- Posts: 30
- Joined: Wed May 20, 2009 1:54 am
- Contact:
Re: Configure codelite to use msvc toolchain
I will in my next post but I have a question, here is one build log :eranif wrote: Can u paste a build log where it happens to you?
cl.exe /nologo /c -c "C:/cygwin-1.7/home/Vincent/projects/gynoid/trunk/src/gynoid/src/GDAddrBook.cpp" /FD /EHsc /Gm /MTd /GS- /fp:fast /GR- /W3 /c /Zi /TP -D_DEBUG -D_WIN32_WCE=0x502 -DUNDER_CE -DWIN32_PLATFORM_PSPC -DWINCE -D_WINDOWS -DARM -D_ARM_ -DUNICODE -D_UNICODE -DGYNOID_EXPORTS -o ./Debug/GDAddrBook.o "-IC:/Program Files/Microsoft Visual Studio 9.0/VC/ce/ATLMFC/INCLUDE" "-IC:/Program Files/Microsoft Visual Studio 9.0/VC/ce/INCLUDE" "-IC:/Program Files/Windows Mobile 5.0 SDK R2/PocketPC/Include/Armv4i" "-I." "-I." "-I../../include"
cl.exe /nologo /c -c "C:/cygwin-1.7/home/Vincent/projects/gynoid/trunk/src/gynoid/src/GDContainers.cpp" /FD /EHsc /Gm /MTd /GS- /fp:fast /GR- /W3 /c /Zi /TP -D_DEBUG -D_WIN32_WCE=0x502 -DUNDER_CE -DWIN32_PLATFORM_PSPC -DWINCE -D_WINDOWS -DARM -D_ARM_ -DUNICODE -D_UNICODE -DGYNOID_EXPORTS -o ./Debug/GDContainers.o "-IC:/Program Files/Microsoft Visual Studio 9.0/VC/ce/ATLMFC/INCLUDE" "-IC:/Program Files/Microsoft Visual Studio 9.0/VC/ce/INCLUDE" "-IC:/Program Files/Windows Mobile 5.0 SDK R2/PocketPC/Include/Armv4i" "-I." "-I." "-I../../include"
cl : Command line warning D9035 : option 'o' has been deprecated and will be removed in a future release
cl : Command line warning D9035 : option 'o' has been deprecated and will be removed in a future release
Preprocessor options are appended a minus sign -D_DEBUG -D_WIN32_WCE=0x502 but when I look at Visual studio I think it uses / :
/D "UNDER_CE" /D "WIN32_PLATFORM_PSPC" /D "WINCE".
But maybe Visual studio handles both syntax ?
And about the deprecated option 'o' what can I do to fix it ?
Last edited by smartmobili on Mon Jun 01, 2009 1:10 pm, edited 1 time in total.
-
- CodeLite Enthusiast
- Posts: 30
- Joined: Wed May 20, 2009 1:54 am
- Contact:
Re: Configure codelite to use msvc toolchain
Here is the build log about issues with non posix paths :
C:\cygwin-1.7\bin\make.exe" -j 2 -f "static_libgynoid_wsp.mk"
----------Building project:[ static_libgynoid - Debug ]----------
/bin/sh: C:\cygwin-1.7\bin\make.exe: command not found
then if I replace \ by / in Build Systems it works fine :
"C:/cygwin-1.7/bin/make.exe" -j 2 -f "static_libgynoid_wsp.mk"
----------Building project:[ static_libgynoid - Debug ]----------
make[1]: warning: -jN forced in submake: disabling jobserver mode.
cl.exe /nologo /c -c "C:/cygwin-1.7/home/Vincent/projects/gynoid/trunk/src/gynoid/src/GDAddrBook.cpp" /FD /EHsc /Gm /MTd /GS- /fp:fast /GR- /W3 /c /Zi /TP -D_DEBUG -D_WIN32_WCE=0x502 -DUNDER_CE -DWIN32_PLATFORM_PSPC -DWINCE -D_WINDOWS -DARM -D_ARM_ -DUNICODE -D_UNICODE -DGYNOID_EXPORTS -o ./Debug/GDAddrBook.o "-IC:/Program Files/Microsoft Visual Studio 9.0/VC/ce/ATLMFC/INCLUDE" "-IC:/Program Files/Microsoft Visual Studio 9.0/VC/ce/INCLUDE" "-IC:/Program Files/Windows Mobile 5.0 SDK R2/PocketPC/Include/Armv4i" "-I." "-I." "-I../../include"
...
C:\cygwin-1.7\bin\make.exe" -j 2 -f "static_libgynoid_wsp.mk"
----------Building project:[ static_libgynoid - Debug ]----------
/bin/sh: C:\cygwin-1.7\bin\make.exe: command not found
then if I replace \ by / in Build Systems it works fine :
"C:/cygwin-1.7/bin/make.exe" -j 2 -f "static_libgynoid_wsp.mk"
----------Building project:[ static_libgynoid - Debug ]----------
make[1]: warning: -jN forced in submake: disabling jobserver mode.
cl.exe /nologo /c -c "C:/cygwin-1.7/home/Vincent/projects/gynoid/trunk/src/gynoid/src/GDAddrBook.cpp" /FD /EHsc /Gm /MTd /GS- /fp:fast /GR- /W3 /c /Zi /TP -D_DEBUG -D_WIN32_WCE=0x502 -DUNDER_CE -DWIN32_PLATFORM_PSPC -DWINCE -D_WINDOWS -DARM -D_ARM_ -DUNICODE -D_UNICODE -DGYNOID_EXPORTS -o ./Debug/GDAddrBook.o "-IC:/Program Files/Microsoft Visual Studio 9.0/VC/ce/ATLMFC/INCLUDE" "-IC:/Program Files/Microsoft Visual Studio 9.0/VC/ce/INCLUDE" "-IC:/Program Files/Windows Mobile 5.0 SDK R2/PocketPC/Include/Armv4i" "-I." "-I." "-I../../include"
...
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Configure codelite to use msvc toolchain
This can be configurable as well. Select your compiler from 'settings -> build settings -> <compiler name> -> Switches'smartmobili wrote:Preprocessor options are appended a minus sign -D_DEBUG -D_WIN32_WCE=0x502 but when I look at Visual studio I think it uses / :
Here double click on an entry to update it:
Preprocessor: -D -> /D
Output : -o -> /OUT:
etc.
You better copy the settings from the 'VC++' compiler which I provide.
Also, I can see that you are using .o extension, this can also be configured from
'settings -> build settings -> <compiler name> -> Advance', at the bottom, change it from .o to .obj (AFAIR VC insists on .obj)
Now I understand which path you are talking about: the make path, and this was never fixed, I thought you were talking about the file paths - I will fix this on in the SVN trunksmartmobili wrote:C:\cygwin-1.7\bin\make.exe" -j 2 -f "static_libgynoid_wsp.mk"
----------Building project:[ static_libgynoid - Debug ]----------
/bin/sh: C:\cygwin-1.7\bin\make.exe: command not found
Eran
Make sure you have read the HOW TO POST thread