Replace Main xxx ... to Main xxx(env); No warnings!
On Sun, 18 Aug 2024 at 22:43, Michael Grunditz <michael.grund...@gmail.com> wrote: > > Here is a version of you main.cc: > > //#include <ext4.h> > #include <base/component.h> > #include <base/log.h> > > namespace Squid { struct Main; }; > > struct Squid::Main { > Genode::Env &_env; > > Main(Genode::Env &env) : _env(env) { > Genode::log("hello from squid"); > } > }; > using namespace Squid; > void Component::construct(Genode::Env &env) { > Main xxx = Main(env); > > } > > > I am not a c++ wizard , but the above compiles if you add "base" to > LIBS in target.mk. Notice the ';' after Struct Main. You will get a > warning that "xxx" is set but not used. > Good luck! > Michael > > On Sun, 18 Aug 2024 at 21:30, Rumen Mitov <rumen.mi...@constructor.tech> > wrote: > > > > I got it to successfully link by adding some lines to the target.mk file > > (attached below). I then got some errors / warnings regarding the stdlib. I > > fixed that by appending CC_CXX_WARN_STRICT= to the make command. > > > > However, I still cannot compile the program as I get an error that > > ld.lib.so is missing even though it is listed as a build dependency in my > > run file (see attached log file). > > > > Rumen > > > > > > ________________________________ > > From: Michael Grunditz <michael.grund...@gmail.com> > > Sent: Sunday, August 18, 2024 4:18 PM > > To: Genode users mailing list <users@lists.genode.org> > > Subject: Re: ext4.h not found > > > > I see , thanks. > > > > sön 18 aug. 2024 kl. 18:09 skrev Rumen Mitov <rumen.mi...@constructor.tech>: > > > > Hi Michael, > > > > I want to use the ext4.h header to open files on the ext4 filesystem (i.e. > > with ext4_fopen) as I am reworking the snapshotting capability of the > > project I am working on. The hello world file was just a test to see if > > everything (primarily the run file) would compile successfully. > > > > Rumen > > ________________________________ > > From: Michael Grunditz <michael.grund...@gmail.com> > > Sent: Saturday, August 17, 2024 6:43 PM > > To: Genode users mailing list <users@lists.genode.org> > > Subject: Re: ext4.h not found > > > > > > > > > > 17 aug. 2024 kl. 19:43 skrev Michael Grunditz <michael.grund...@gmail.com>: > > > > > > > > > > 16 aug. 2024 kl. 16:42 skrev Rumen Mitov <rumen.mi...@constructor.tech>: > > > > > > Hello, > > > > I want to test out lwext4, however when I try to compile it, I get an error > > that ext4.h was not found. I have attached my main.cc, target.mk and > > squid.run files below. The platform I am using is x86_64 linux. If anyone > > knows has any idea how to link the lwext4 library please let me know, as I > > could not find much information online. > > > > Best, > > Rumen > > > > > > > > Not sure what you want to achieve. Accessing ext4 file systems? Probably a > > bad idea in Genode/Linux. > > > > Michael > > > > > > > > Sorry didn’t read your run file. Looks fine even though, why include the > > header in a hello world file? > > > > > > Michael > > _______________________________________________ > > users mailing list -- users@lists.genode.org > > To unsubscribe send an email to users-le...@lists.genode.org > > Archived at > > https://lists.genode.org/mailman3/hyperkitty/list/users@lists.genode.org/message/KQPDMIL6B5QW2C77B4YC7ZC4TMKTNO2M/ > > > > _______________________________________________ > > users mailing list -- users@lists.genode.org > > To unsubscribe send an email to users-le...@lists.genode.org > > Archived at > > https://lists.genode.org/mailman3/hyperkitty/list/users@lists.genode.org/message/EG7OTZ322V57HOPRUPJ2VC4AHAVKYEHI/ _______________________________________________ users mailing list -- users@lists.genode.org To unsubscribe send an email to users-le...@lists.genode.org Archived at https://lists.genode.org/mailman3/hyperkitty/list/users@lists.genode.org/message/LATR5OBZRUFDZDOWUAFN5APRCV7WEHF7/