Problem importing MSVC workspace
-
- CodeLite Expert
- Posts: 167
- Joined: Wed Oct 22, 2008 6:50 am
- Contact:
Problem importing MSVC workspace
Hi,
just found Codelite and it looks great and so far seems to be just what I was looking for, but ....
I have been working mostly with MSVC C++ Express 2008 Edition and now wanted to import a sln file from an existing project as a first test.
It is a plain C project and it did seem to import it (at least I saw no complaints), but it tells me there is nothing to do for 'all', when I try to compile it.
I first created a workspace for it and then imported the .sln file.
Any hints on what I might be missing??
PS: It would be nice if one could cut & paste from the IDE output View
just found Codelite and it looks great and so far seems to be just what I was looking for, but ....
I have been working mostly with MSVC C++ Express 2008 Edition and now wanted to import a sln file from an existing project as a first test.
It is a plain C project and it did seem to import it (at least I saw no complaints), but it tells me there is nothing to do for 'all', when I try to compile it.
I first created a workspace for it and then imported the .sln file.
Any hints on what I might be missing??
PS: It would be nice if one could cut & paste from the IDE output View
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Problem importing MSVC workspace
Hi,
To help me:
- Please attach the .project / .workspace / .mk files
The best thing:
Is it possible to zip the entire MSVC workspace and send it to me (by email) - so I can test it here?
Eran
My importer was based on the SLN files of VC7.1, so I am not sure what are the changes from VC2008...coder99 wrote:I have been working mostly with MSVC C++ Express 2008 Edition and now wanted to import a sln file from an existing project as a first test.
To help me:
- Please attach the .project / .workspace / .mk files
The best thing:
Is it possible to zip the entire MSVC workspace and send it to me (by email) - so I can test it here?
You can copy / paste from the mouse right click -> copy/pastecoder99 wrote:PS: It would be nice if one could cut & paste from the IDE output View
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Expert
- Posts: 167
- Joined: Wed Oct 22, 2008 6:50 am
- Contact:
Re: Problem importing MSVC workspace
Thank you for the quick reply.
Since I can't seem to find a way to attach a file to a direct message, I'll attach the zipped up project workspace to this reply.
Please let me know if you have any questions or if I can help in any way to resolve this issue
Since I can't seem to find a way to attach a file to a direct message, I'll attach the zipped up project workspace to this reply.
Please let me know if you have any questions or if I can help in any way to resolve this issue
Win 10/11 64-bit, MSVC 2019/2022, wxWidgets 3.2.1, CodeLite 17.0 Mint 21.2
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Problem importing MSVC workspace
Hi,
I downloaded the workspace and fixed the problem.
There were 2 issues with it:
- IntermediateDirectory entry was set to $(ConfigurationName) which was not resolved for some reason
- OutputFile was left empty.
To fix your workspace:
- open project setting and select the 'general' tab
- in the 'intermediateDirectory' enter: Debug
- in the output file enter: bin2c
clean & build and you should be OK
Eran
I downloaded the workspace and fixed the problem.
There were 2 issues with it:
- IntermediateDirectory entry was set to $(ConfigurationName) which was not resolved for some reason
- OutputFile was left empty.
To fix your workspace:
- open project setting and select the 'general' tab
- in the 'intermediateDirectory' enter: Debug
- in the output file enter: bin2c
clean & build and you should be OK
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Expert
- Posts: 167
- Joined: Wed Oct 22, 2008 6:50 am
- Contact:
Re: Problem importing MSVC workspace
With those changes it now compiles the Debug version
But when I try to debug it, I get this in the Debug Tab of the Output View
After a bit of searching, I find that the output file actually exists in d:\pkg\C\bin2c. 'Clean' removes that file and Build' restores it.
Specifying the Output File as './Debug/bin2c' creates it in the correct directory, but the debugger still produces the same error,
although I can run the file from the command line.
Code: Select all
Building:
"mingw32-make.exe" -j 2 -f "bin2c_wsp.mk"
----------Building project:[ bin2c - Debug ]----------
g++ -c "D:/pkg/C/bin2c/bin2c.c" -g -o Debug/bin2c.o
g++ -o bin2c Debug/bin2c.o -O0
0 errors, 0 warnings, total time: 00:00:00 seconds
----------Build Ended----------
Code: Select all
Debug session started successfully!
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-mingw32"...
: No such file or directory.
set new-console on
set unwindonsignal on
set width 0
set height 0
break "D:/pkg/C/bin2c/bin2c.c:43"
No source file named D:/pkg/C/bin2c/bin2c.c.
Make breakpoint pending on future shared library load? (y or [n]) [answered N; input not from terminal]
Successfully set breakpoint at: D:\pkg\C\bin2c\bin2c.c:43
break "D:/pkg/C/bin2c/bin2c.c:85"
No source file named D:/pkg/C/bin2c/bin2c.c.
Make breakpoint pending on future shared library load? (y or [n]) [answered N; input not from terminal]
Successfully set breakpoint at: D:\pkg\C\bin2c\bin2c.c:85
break "D:/pkg/C/bin2c/bin2c.c:98"
No source file named D:/pkg/C/bin2c/bin2c.c.
Make breakpoint pending on future shared library load? (y or [n]) [answered N; input not from terminal]
Successfully set breakpoint at: D:\pkg\C\bin2c\bin2c.c:98
Continuing...
No executable specified, use `target exec'.
Specifying the Output File as './Debug/bin2c' creates it in the correct directory, but the debugger still produces the same error,
although I can run the file from the command line.
Win 10/11 64-bit, MSVC 2019/2022, wxWidgets 3.2.1, CodeLite 17.0 Mint 21.2
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Problem importing MSVC workspace
For debugging, set this:
project settings -> general tab
in the 'command' line set: bin2c --> this will be the executable for debugging
in the Working directory set: ./Debug --> this will be the debugger working directory
CodeLite uses these parameters to debugging.
Eran
project settings -> general tab
in the 'command' line set: bin2c --> this will be the executable for debugging
in the Working directory set: ./Debug --> this will be the debugger working directory
CodeLite uses these parameters to debugging.
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Expert
- Posts: 167
- Joined: Wed Oct 22, 2008 6:50 am
- Contact:
Re: Problem importing MSVC workspace
That help in running either the debug or release version; without it a window pops up but disappears so fast I can't tell what it might show.eranif wrote:For debugging, set this:
project settings -> general tab
in the 'command' line set: bin2c --> this will be the executable for debugging
With the command set to bin2c, the console window pops up and stays until I press a key, but only for the Run tool button. At the time the debugger tool buttons (Start/continue, Stop and Pause) were not greyed, but did not respond when the mouse hovered over them and nothing happened when they were clicked.
I then shut down Codelite and restarted, - somewhere I set the option to restart with the project loaded at exit, but I can't recall where that option is at the moment then the Debugger tool buttons are enabled and I was able to single step though the C program.
That path was as expected.eranif wrote: in the Working directory set: ./Debug --> this will be the debugger working directory
CodeLite uses these parameters to debugging.
Eran
Win 10/11 64-bit, MSVC 2019/2022, wxWidgets 3.2.1, CodeLite 17.0 Mint 21.2
-
- CodeLite Expert
- Posts: 167
- Joined: Wed Oct 22, 2008 6:50 am
- Contact:
Re: Problem importing MSVC workspace
I just imported another wxWidget MSVC project and aside from the changes we discussed earlier, the import should also massage the input libs to the linker to convert them to the gcc format, i.e. strip off the .lib extension
As well, I notice that sometimes even when there are compile or link errors, the bottom line of the Build tab says:
0 errors, 0 warnings, total time: 00:00:09 seconds
As I get to use CL more and resolve some of the questions that come up from running a somewhat different IDE, I am more and more favorably impressed. Also, since it has many of the key bindings similar to MSVC, it makes it very comfortable to migrate to CL.
As well, I notice that sometimes even when there are compile or link errors, the bottom line of the Build tab says:
0 errors, 0 warnings, total time: 00:00:09 seconds
As I get to use CL more and resolve some of the questions that come up from running a somewhat different IDE, I am more and more favorably impressed. Also, since it has many of the key bindings similar to MSVC, it makes it very comfortable to migrate to CL.
Win 10/11 64-bit, MSVC 2019/2022, wxWidgets 3.2.1, CodeLite 17.0 Mint 21.2
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Problem importing MSVC workspace
Probably the compiler regular expressions failed to detect them.coder99 wrote:As well, I notice that sometimes even when there are compile or link errors, the bottom line of the Build tab says:
0 errors, 0 warnings, total time: 00:00:09 seconds
Are these lines colored in any way? (for example, by default, error line are blue + red, while warnings are blue + orange)
Can you paste your build log here? (the complete build log)
Since I dont have VS installed, I cant test/debug it. Is it possible to get a project from you?coder99 wrote:I just imported another wxWidget MSVC project and aside from the changes we discussed earlier, the import should also massage the input libs to the linker to convert them to the gcc format, i.e. strip off the .lib extension
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Expert
- Posts: 167
- Joined: Wed Oct 22, 2008 6:50 am
- Contact:
Re: Problem importing MSVC workspace
No there is no coloring at all in those instances.eranif wrote:Probably the compiler regular expressions failed to detect them.coder99 wrote:As well, I notice that sometimes even when there are compile or link errors, the bottom line of the Build tab says:
0 errors, 0 warnings, total time: 00:00:09 seconds
Are these lines colored in any way? (for example, by default, error line are blue + red, while warnings are blue + orange)
Can you paste your build log here? (the complete build log)
It may well be that the compiler never really got started. IIRC, the fix was usually to correct some path or other in the properties.
I'll try to keep a better eye for specific instances. Usually, I now simply go check my setup and carry on, without trying to record a reproducible trail. But, I'll try to record more specifics
Edit:
One such problems came up just now - I'll paste the build window output and color the line which ought to have been flagged as an error since the #include file is not found - but I can't see the color in the 'code' window, but I'm sure you'll be able to find the extra tags.:
Code: Select all
----------Building project:[ wxSR - Debug ]----------
g++ -c "D:/pkg/CodeLite/wx/wxSrCl/wxSrFind.cpp" -g -mthreads -DHAVE_W32API_H -D__WXMSW__ -D__WXDEBUG__ -D_UNICODE -Id:\wxWidgetsEclipse2.8.9\lib\gcc_lib\mswud -Id:\wxWidgetsEclipse2.8.9\include -Wno-ctor-dtor-privacy -pipe -fmessage-length=0 -DWANT_SINGLE_INSTANCE -DWANT_APP_PATH -DWANT_CONFIG -DWANT_CMD_LINE -DwxUSE_UNICODE -D_CODE_LITE_ -o ./Debug/wxSrFind.o -I"d:/wxWidgetsEclipse2.8.9/include" -I"D:/wxWidgetsEclipse2.8.9/lib/gcc_lib/mswud" -I"d:/wxWidgetsEclipse2.8.9/gcc_lib/msw"
g++ -c "D:/pkg/CodeLite/wx/wxSrCl/wxSrConfig.cpp" -g -mthreads -DHAVE_W32API_H -D__WXMSW__ -D__WXDEBUG__ -D_UNICODE -Id:\wxWidgetsEclipse2.8.9\lib\gcc_lib\mswud -Id:\wxWidgetsEclipse2.8.9\include -Wno-ctor-dtor-privacy -pipe -fmessage-length=0 -DWANT_SINGLE_INSTANCE -DWANT_APP_PATH -DWANT_CONFIG -DWANT_CMD_LINE -DwxUSE_UNICODE -D_CODE_LITE_ -o ./Debug/wxSrConfig.o -I"d:/wxWidgetsEclipse2.8.9/include" -I"D:/wxWidgetsEclipse2.8.9/lib/gcc_lib/mswud" -I"d:/wxWidgetsEclipse2.8.9/gcc_lib/msw"
[color=#FF00FF]D:/pkg/CodeLite/wx/wxSrCl/wxSrFind.cpp:42:20: crtdbg.h: No such file or directory[/color]
D:/pkg/CodeLite/wx/wxSrCl/wxSrFind.cpp: In member function `void MyFrame::OnFindDialog(wxFindDialogEvent&)':
D:/pkg/CodeLite/wx/wxSrCl/wxSrFind.cpp:110: error: no matching function for call to `MyFrame::DoFind(wxString, int)'
D:/pkg/CodeLite/wx/wxSrCl/wxSrFrameh.h:111: note: candidates are: void MyFrame::DoFind(wxString&, int)
mingw32-make[1]: *** [Debug/wxSrFind.o] Error 1
mingw32-make[1]: *** Waiting for unfinished jobs....
mingw32-make.exe: *** [All] Error 2
1 errors, 0 warnings, total time: 00:00:02 seconds
----------Build Ended----------
Code: Select all
Building:
"mingw32-make.exe" -j 2 -f "wxSR_wsp.mk"
----------Building project:[ wxSR - Debug ]----------
Executing Pre Build commands ...
VerHeader "wxSRr.rc" version.info
Done
g++ -o ./Debug/wxSr ./Debug/wxSR.o ./Debug/wxSRBaseFrame.o ./Debug/wxSrCmdline.o ./Debug/wxSrConfig.o ./Debug/wxSrFind.o ./Debug/wxSrFrame.o ./Debug/wxSrMsg.o ./Debug/wxSrOptions.o ./Debug/wxSrSend.o ./Debug/wxSrSendConf.o ./Debug/wxSrSubjEdit.o ./Debug/wxSRr.rc.o -L"d:/wxWidgetsEclipse2.8.9/lib/gcc_lib" -lwxmsw28ud_xrc -lwxmsw28ud_dbgrid -lwxbase28ud_net -lwxmsw28ud_media -lwxmsw28ud_aui -lwxmsw28ud_html -lwxmsw28ud_adv -lwxmsw28ud_core -lwxmsw28ud_richtext -lwxbase28ud_xml -lwxbase28ud_odbc -lwxmsw28ud_core -lwxbase28ud -lwxtiffd -lwxjpegd -lwxpngd -lwxzlibd -lwxregexud -lwxexpatd -lkernel32 -luser32 -ladvapi32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -lwsock32 -lodbc32 -O0 -mthreads -Ld:\wxWidgetsEclipse2.8.9\lib\gcc_lib -lwxmsw28ud_html -lwxmsw28ud_adv -lwxmsw28ud_core -lwxbase28ud_xml -lwxbase28ud_net -lwxbase28ud -lwxtiffd -lwxjpegd -lwxpngd -lwxzlibd -lwxregexud -lwxexpatd -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwxregexud -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -mwindows
c:\mingw-3.4.5\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ld.exe: cannot open output file ./Debug/wxSr.exe: Permission denied
collect2: ld returned 1 exit status
mingw32-make[1]: *** [Debug/wxSr] Error 1
mingw32-make.exe: *** [All] Error 2
0 errors, 0 warnings, total time: 00:00:00 seconds
----------Build Ended----------
Yes, of course, although you ought to be able to reproduce my initial results without MSVC installed; I simply tried to import one of the small sample files from the distribution. IIRC, the first one was the sample/minimal; I simply asked CL to import it directly from the distribution directory, although you might want to make copies if you want to make repeated trialseranif wrote:Since I dont have VS installed, I cant test/debug it. Is it possible to get a project from you?coder99 wrote:I just imported another wxWidget MSVC project and aside from the changes we discussed earlier, the import should also massage the input libs to the linker to convert them to the gcc format, i.e. strip off the .lib extension
Eran[/quote]
Win 10/11 64-bit, MSVC 2019/2022, wxWidgets 3.2.1, CodeLite 17.0 Mint 21.2