Author Topic: FileManager plugin  (Read 9504 times)

Offline Andrew94

  • Multiple posting newcomer
  • *
  • Posts: 10
FileManager plugin
« on: August 24, 2010, 09:56:53 pm »
Hi,
    I successfully installed the precompiled filemanager plugin for windows, but I want to install the plugin on  Linux.  When I try to build it (I am building it in Windows Vista with GCC) I get a long list of errors. the First of which is :

.../FileExplorerSettings.h |4| error: wx/wx.h: No such file or directory|

I have wxwidgets intalled and am able to use it to make other codeblocks projects.  What do I need to do to compile the project?

As a side note, where should I post instructions on installing clang/llvm and setting it up in codeblocks?
God bless you,
Andrew Wells

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: FileManager plugin
« Reply #1 on: August 26, 2010, 01:05:00 am »
Hi Andrew,

Correct me if I'm wrong, but it sounds like you are trying to compile a linux binary from windows without using a cross-compiler.

The targets in the filemanager-unix project file were intended to be built on a linux system. The reason you are getting the "can't find <wx header>" messages is because on a linux system, we can use pkg-config to point the compiler to the required headers and libraries. This will silently fail on windows. Even if it did work, you will only get a linux binary if you use a cross compiler.

If you don't want a dedicated linux partition you could try a virtual machine, wubi or, if you are a glutton for punishment, cross-compiling.
« Last Edit: August 26, 2010, 01:07:39 am by dmoore »

Offline Andrew94

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: FileManager plugin
« Reply #2 on: August 26, 2010, 05:42:26 pm »
Hi,
    Thanks.  I was trying to compile in Windows, and I am now trying in Linux, but I get different errors.  The first few are:


 ||=== File Manager Plugin, default ===|
.../FileExplorer.cpp|13|error: sdk.h: No such file or directory|
.../FileManager/se_globals.h||In function ‘void LogMessage(const wxString&)’:|
.../FileManager/se_globals.h|21|error: ‘Manager’ has not been declared|
.../FileManager/se_globals.h||In function ‘void LogErrorMessage(const wxString&)’:|
.../FileManager/se_globals.h|24|error: ‘Manager’ has not been declared|

also, looking at the build log (compilation command below)
I see that the third build option (`pkg-config --cflags gamin`) appears to generate  (-D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread) is this how it should be?

g++ -Wall -g  -I/usr/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread     -fmessage-length=0 -fexceptions -Winvalid-pch -Ulinux -Uunix -fPIC -DcbDEBUG -DCB_PRECOMP -D__FAM__  -Wall -g -DCB_AUI    -I../../../include -I../../../include/wxscintilla/include  -c /home/andrew/projects/FileManager/FileExplorer.cpp -o .objs/FileExplorer.o

God bless you,
Andrew Wells

Online stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: FileManager plugin
« Reply #3 on: August 26, 2010, 11:36:48 pm »
.../FileExplorer.cpp|13|error: sdk.h: No such file or directory|

You need the Code::Blocks SDK source code for sdk.h.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Andrew94

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: FileManager plugin
« Reply #4 on: August 27, 2010, 01:50:47 am »
Thanks.  I downloaded the source code and set the $(#cb) variable to point to it; however, I am still unable to compile the plugin  (I tried setting the variable to the "codeblocks-10.05-release" folder and the "include" folder, which folder should I point it to?)  .  I assume I need to put the source somewhere else, but where?

(errors remain exactly the same)

God bless you,
Andrew Wells

Offline Andrew94

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: FileManager plugin
« Reply #5 on: August 27, 2010, 02:05:40 am »
I changed the build options and reduced the number of errors down to ten:

/home/andrew/projects/codeblocks-10.05-release/src/include/sdk_common.h|95|error: wx/wxscintilla.h: No such file or directory|
/home/andrew/projects/codeblocks-10.05-release/src/include/editorcolourset.h|55|error: ‘wxSCI_KEYWORDSET_MAX’ was not declared in this scope|
/home/andrew/projects/codeblocks-10.05-release/src/include/editorcolourset.h|63|error: ‘wxSCI_KEYWORDSET_MAX’ was not declared in this scope|
/home/andrew/projects/FileManager/FileExplorer.cpp|128|error: invalid use of incomplete type ‘struct wxDropTarget’|
/usr/include/wx-2.8/wx/window.h|60|error: forward declaration of ‘struct wxDropTarget’|
/home/andrew/projects/FileManager/FileExplorer.cpp|136|error: ‘wxDragResult’ does not name a type|
/home/andrew/projects/FileManager/FileExplorer.cpp|206|error: ‘wxDragResult’ does not name a type|
/home/andrew/projects/FileManager/FileExplorer.cpp||In constructor ‘wxFEDropTarget::wxFEDropTarget(FileExplorer*)’:|
/home/andrew/projects/FileManager/FileExplorer.cpp|130|error: type ‘wxDropTarget’ is not a direct base of ‘wxFEDropTarget’|
/home/andrew/projects/FileManager/FileExplorer.cpp|134|error: ‘SetDataObject’ was not declared in this scope|
/home/andrew/projects/FileManager/FileExplorer.cpp||In constructor ‘FileExplorer::FileExplorer(wxWindow*, wxWindowID, const wxPoint&, const wxSize&, long int, const wxString&)’:|
/home/andrew/projects/FileManager/FileExplorer.cpp|321|error: no matching function for call to ‘FileTreeCtrl::SetDropTarget(wxFEDropTarget*&)’|
/usr/include/wx-2.8/wx/gtk/window.h|110|note: candidates are: virtual void wxWindow::SetDropTarget(wxDropTarget*)|
/home/andrew/projects/FileManager/FileExplorer.cpp||In member function ‘void FileExplorer::OnRightClick(wxTreeEvent&)’:|
/home/andrew/projects/FileManager/FileExplorer.cpp|1164|warning: suggest explicit braces to avoid ambiguous ‘else’|
/home/andrew/projects/FileManager/FileExplorer.cpp||In member function ‘void FileExplorer::OnDelete(wxCommandEvent&)’:|
/home/andrew/projects/FileManager/FileExplorer.cpp|1425|warning: comparison between signed and unsigned integer expressions|
/home/andrew/projects/FileManager/FileExplorer.cpp|1430|warning: comparison between signed and unsigned integer expressions|
||=== Build finished: 10 errors, 3 warnings ===|

What do I do now and thanks for all of your help.

God bless you,
Andrew Wells

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: FileManager plugin
« Reply #6 on: August 27, 2010, 02:13:32 am »
The way the file manager project is currently set up, you should put the filemanager source in the "contrib" folder of the codeblocks source. (If you go to project -> build options -> search directories, you should see ../../../include and ../../../include/wxscintilla/include). Note that the FileManager project is set up expecting to find codeblocks SDK libraries in ../../../devel (this is where the codeblocks binaries will be placed if you build codeblocks using codeblocks). If those files are missing, GCC will look in the default location "/usr/lib", which means you will be building against whatever version of codeblocks you have installed on your system (this may differ from the version of source you have and potentially cause a crash when you install the plugin)

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: FileManager plugin
« Reply #7 on: August 27, 2010, 02:19:50 am »
I changed the build options and reduced the number of errors down to ten:

/home/andrew/projects/codeblocks-10.05-release/src/include/sdk_common.h|95|error: wx/wxscintilla.h: No such file or directory|

assuming you don't follow the instruction above you would need to add this search directory:
$(#cb)/include/wxscintilla/include

you will also need goto search directories -> linker and a path to wherever libcodeblocks.so is located (which is currently set to ../../../devel)

Offline Andrew94

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: FileManager plugin
« Reply #8 on: August 27, 2010, 03:09:23 am »
I now only have one error:
/usr/bin/ld: cannot find -lcodeblocks
collect2: ld returned 1 exit status

do I need to install the source ( I installed an RPM on Fedora) or is there another way to  fix this?

God bless you,
Andrew Wells

Online stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: FileManager plugin
« Reply #9 on: August 27, 2010, 05:21:20 am »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: FileManager plugin
« Reply #10 on: August 27, 2010, 08:15:00 am »
assuming you don't follow the instruction above you would need to add this search directory:
$(#cb)/include/wxscintilla/include
Wrong. wxScintilla has moved to SDK. So it would need to be:
$(#cb)/sdk/wxscintilla/include
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: FileManager plugin
« Reply #11 on: August 27, 2010, 10:46:25 am »
I now only have one error:
/usr/bin/ld: cannot find -lcodeblocks
collect2: ld returned 1 exit status

see if you can find "libcodeblocks.la". it should be in /usr/lib. if it is in a non-standard path you will need to add the path to the linker directories in project -> build options -> search directories.

Quote
do I need to install the source ( I installed an RPM on Fedora) or is there another way to  fix this?

no. so long as you are using source that is close enough to the version you have installed, you shouldn't need to build the sources yourself.
« Last Edit: August 27, 2010, 10:48:42 am by dmoore »

Offline Andrew94

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: FileManager plugin
« Reply #12 on: August 27, 2010, 09:35:27 pm »
Thanks everyone, I finally have it installed.

God bless you,
Andrew Wells

Offline Andrew94

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: FileManager plugin
« Reply #13 on: August 28, 2010, 06:30:32 pm »
One more thing.  Does an administrator mark this as solved or do I?  If I need to mark it as solved, how do I do this?

God bless you,
Andrew Wells

Online stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
[Solved] FileManager plugin
« Reply #14 on: August 28, 2010, 07:32:26 pm »
One more thing.  Does an administrator mark this as solved or do I?  If I need to mark it as solved, how do I do this?

God bless you,
Andrew Wells

If you edit the Subject of your first and last post to solved; is what I do. Nether tried to do it to a post I did not start.

Tim S.
« Last Edit: August 28, 2010, 07:34:15 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org