User forums > Using Code::Blocks
Executable running while it should not (Nightly - Windows)
mandrav:
--- Quote from: jeancf on July 06, 2007, 01:52:19 pm ---
--- Quote ---In linux it doesn't work when running through cb_console_runner (e.g. your target is set as "Console application")
--- End quote ---
My application is a wxWidgets app. In linux the target type for my project is set to GUI Application.
--- End quote ---
--- Quote from: mandrav on July 06, 2007, 11:32:53 am ---The linker search paths are used in PATH (for windows), LD_LIBRARY_PATH (for linux) and DYLD_LIBRARY_PATH (for mac) when you run your program.
--- End quote ---
wx-config --libs does not (yet) qualify as a search path, except for the compiler itself ;).
If you want this to work now, just add manually the path containing the .so in linker search paths (last).
jeancf:
I understand now. Thanks a lot for the clarification.
/~jc
jeancf:
Hang on a second... the DLL that is not found is not a wxGTK DLL linked through wx-config as you assumed. It is actually the wxsqlite3 DLL, the PATH of which is listed in the linker search paths. The only peculiar thing about it is that the path is based on a custom variable $(WXSQLITE3_DIR)\lib. Would that be the reason?
mandrav:
--- Quote from: jeancf on July 06, 2007, 06:28:08 pm ---Hang on a second... the DLL that is not found is not a wxGTK DLL linked through wx-config as you assumed. It is actually the wxsqlite3 DLL, the PATH of which is listed in the linker search paths. The only peculiar thing about it is that the path is based on a custom variable $(WXSQLITE3_DIR)\lib. Would that be the reason?
--- End quote ---
No, it shouldn't be a problem: variables' substitution is performed as normal. But maybe we have a problem with the backslash there. Can you replace it with a slash and see if it works?
You have confused me though: you mentioned you were trying this in linux and now you 're mentioning dlls?!?
jeancf:
I am confusing indeed. After a week of going back and forth between windows and Linux I start mixing things up :?
In short:
* Under windowsC::B behaves as you describe.
* Under Linux, my project is set up as a GUI Application type, the wxGTK libraries are linked through invocation of wx-config and the wxsqlite3 library is linked through $(WXSQLITE3_DIR)/lib in the linker search paths. The app compiles fine but when launched from C::B it does not run and exits with status -1. If I add the path where my library resides to LD_LIBRARY_PATH then the app runs fine.
I hope this clarifies the situation.
/~jc
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version