I have installed Code Lite "codelite-4.0.5589-mingw4.6.1-wx2.9.4.exe"
All setings defaltut:
C:\Program Files (x86)\CodeLite
C:\UnitTest++-1.3
C:\MinGW-4.6.1
C:\wxWidgets-2.9.4
Then I run code lite create new workspace in C:\Work
After that I make new project Console -> simple executable(wxWidgets enabled) named Test and with "gnu gpp" compiler.
I get this sample program...
#include <wx/init.h>
#include <wx/string.h>
int main( int argc, char** argv )
{
// initialize wxWidgets
wxInitializer init;
wxPrintf( wxT("Hello in wxWidgets World!\n\n") );
return 0;
}
and when I want to run it i get this errors...
----------Build Started--------
C:\Windows\system32\cmd.exe /c ""mingw32-make.exe" -j 2 -f "Work_wsp.mk""
----------Building project:[ Test - Debug ]----------
mingw32-make.exe[1]: Entering directory `C:/Work/Test'
gcc -o ./Debug/Test @"C:\Work\Test\Test.txt" -L. -mthreads -LC:\wxWidgets-2.9.4\lib\gcc_dll -lwxmsw29ud -lwxtiffd -lwxjpegd -lwxpngd -lwxzlibd -lwxregexud -lwxexpatd -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwxregexud -lwinspool -lwinmm -lshell32 -lcomctl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32
./Debug/main.o: In function `main':
C:/Work/Test/main.cpp:5: undefined reference to `__gxx_personality_sj0'
./Debug/main.o: In function `wxFormatString':
C:/wxWidgets-2.9.4/include/wx/strvararg.h:140: undefined reference to `__gxx_personality_sj0'
C:/wxWidgets-2.9.4/include/wx/strvararg.h:142: undefined reference to `__gxx_personality_sj0'
./Debug/main.o: In function `~wxString':
C:/wxWidgets-2.9.4/include/wx/string.h:441: undefined reference to `std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::~basic_string()'
./Debug/main.o: In function `~wxFormatString':
C:/wxWidgets-2.9.4/include/wx/strvararg.h:137: undefined reference to `__gxx_personality_sj0'
./Debug/main.o: In function `Z8wxPrintfRK14wxFormatString':
C:/wxWidgets-2.9.4/include/wx/wxcrtvararg.h:284: undefined reference to `__gxx_personality_sj0'
./Debug/main.o: In function `ZN22wxScopedCharTypeBufferIcE14CreateNonOwnedEPKcj':
C:/wxWidgets-2.9.4/include/wx/buffer.h:81: undefined reference to `__gxx_personality_sj0'
C:/wxWidgets-2.9.4/include/wx/buffer.h:89: undefined reference to `operator new(unsigned int)'
./Debug/main.o: In function `ZN22wxScopedCharTypeBufferIwE14CreateNonOwnedEPKwj':
C:/wxWidgets-2.9.4/include/wx/buffer.h:81: undefined reference to `__gxx_personality_sj0'
C:/wxWidgets-2.9.4/include/wx/buffer.h:89: undefined reference to `operator new(unsigned int)'
./Debug/main.o: In function `ZN22wxScopedCharTypeBufferIcE6DecRefEv':
C:/wxWidgets-2.9.4/include/wx/buffer.h:198: undefined reference to `operator delete(void*)'
./Debug/main.o: In function `ZN22wxScopedCharTypeBufferIwE6DecRefEv':
C:/wxWidgets-2.9.4/include/wx/buffer.h:198: undefined reference to `operator delete(void*)'
collect2: ld returned 1 exit status
mingw32-make.exe[1]: *** [Debug/Test] Error 1
mingw32-make.exe[1]: Leaving directory `C:/Work/Test'
mingw32-make.exe: *** [All] Error 2
----------Build Ended----------
12 errors, 0 warnings
If i make new project (Test2) Console Console -> simple executable(g++) everything works fine.
Sample...
#include <stdio.h>
int main(int argc, char **argv)
{
printf("hello world\n");
return 0;
}
Build...
----------Build Started--------
C:\Windows\system32\cmd.exe /c ""mingw32-make.exe" -j 2 -f "Work_wsp.mk""
----------Building project:[ Test2 - Debug ]----------
mingw32-make.exe[1]: Entering directory `C:/Work/Test2'
g++ -c "C:/Work/Test2/main.cpp" -g -O0 -Wall -o ./Debug/main.o -I. -I.
g++ -o ./Debug/Test2 @"C:\Work\Test2\Test2.txt" -L.
mingw32-make.exe[1]: Leaving directory `C:/Work/Test2'
----------Build Ended----------
0 errors, 0 warnings
Code litle don't work on windows 7
-
- CodeLite Curious
- Posts: 2
- Joined: Fri Jul 13, 2012 4:42 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
- Jarod42
- CodeLite Expert
- Posts: 240
- Joined: Wed Sep 30, 2009 5:54 pm
- Genuine User: Yes
- IDE Question: C++
- Location: France
- Contact:
Re: Code litle don't work on windows 7
see for an explanation http://stackoverflow.com/questions/7751 ... nality-sj0
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Code litle don't work on windows 7
The problem is that the compiler used to link your executable is 'gcc' ( I really have no idea why ...)
open the project settings (right click on the project -> settings)
and in the 'general' tab, change "Compiler" from "gnu gcc" to "gnu g++"
another option is that the file name is '.c' and not '.cpp' (this will make codelite to use gcc over g++)
After making all the changes ( 1. make sure g++ is the compiler set for the project, 2. file name is <filename>.cpp ) rebuild the project (right click the project -> rebuild)
Eran
open the project settings (right click on the project -> settings)
and in the 'general' tab, change "Compiler" from "gnu gcc" to "gnu g++"
another option is that the file name is '.c' and not '.cpp' (this will make codelite to use gcc over g++)
After making all the changes ( 1. make sure g++ is the compiler set for the project, 2. file name is <filename>.cpp ) rebuild the project (right click the project -> rebuild)
Eran
Make sure you have read the HOW TO POST thread