Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • May 26 20:15
    devrite opened #66
  • May 20 06:24
    asiirtol opened #65
  • May 18 15:05
    schnitzlein commented #64
  • May 18 12:52
    schnitzlein opened #64
  • May 17 07:27
    EDDragonWolf commented #63
  • May 16 23:02
    lganzzzo commented #63
  • May 13 14:44
    EDDragonWolf commented #63
  • May 10 10:35
    DVorotilkin opened #587
  • May 05 16:34
    EDDragonWolf opened #63
  • May 04 07:21
    bamkrs closed #586
  • May 04 07:21
    bamkrs commented #586
  • May 04 05:02
    YuaXan commented #586
  • May 03 17:46
    bamkrs commented #586
  • May 03 17:38
    YuaXan opened #586
  • May 02 12:12
    boilerdev opened #585
  • May 01 22:49
    lganzzzo labeled #584
  • May 01 22:49
    lganzzzo commented #584
  • May 01 12:52
    joseph-montanez edited #584
  • May 01 12:51
    joseph-montanez edited #584
  • May 01 12:50
    joseph-montanez opened #584
AlexandreHURDYK
@AlexandreHURDYK
I don't think we have something like that, but maybe we can use the piece of hardware we're using that hosts our homemade OS in the same way. I'll try to ask a coworker.
If all else fails, it's qemu time to emulate a raspberry PI, right ?
mmn
@mmn:matrix.org
[m]
What are the ram/storage capacities of your target hw?
AlexandreHURDYK
@AlexandreHURDYK
No idea. Perhaps I can check with a command ?
mmn
@mmn:matrix.org
[m]
You don't know the device you are developing for?
AlexandreHURDYK
@AlexandreHURDYK
It's literaly a circuit board with an home made OS inside. Jobplace gave this to me monday without much precisions and told me to make my program work on that circuit board.
So I'm afraid that I lack a lot of critical information about what that improvised computer can do.
:/
I can however try to ask a coworker in a few minutes.
mmn
@mmn:matrix.org
[m]
Okay, but then that's maybe not a question for this forum. If you are going to cross-compile for an embedded device, that's quite a specialised discipline... I can try to compile oat++ on my lime2 this afternoon (which is 32 bit arm), but that one runs a full debian distro.
AlexandreHURDYK
@AlexandreHURDYK
All I should need is the two static library files so maybe just doing that on that debian distribution could work.
mmn
@mmn:matrix.org
[m]
What do you get after running
file ../ext/oatpp-1.3.0/lib/cortexa9hf_neon_Release/liboatpp.a
(replace the path with your actual path, of course)
AlexandreHURDYK
@AlexandreHURDYK
Linker says it ignores them outright because they're not compatible, then says "cannot find -l:liboatpp.a".
mmn
@mmn:matrix.org
[m]
But what does file say?
AlexandreHURDYK
@AlexandreHURDYK
Uuuuh hold on.
I got confused and didn't realize "file" was a command.
liboatpp.a: current ar archive
Mmmmh that doesn't seem to say a lot.
mmn
@mmn:matrix.org
[m]
Okay, it indeed doesn't.
What about objdump -a path/to/liboatpp.a?
AlexandreHURDYK
@AlexandreHURDYK
This one dumps a lot of stuff. Are you looking for a line in particular ?
mmn
@mmn:matrix.org
[m]
More like any one record.
I get for example
Pattern.cpp.o: tiedostomuoto elf64-x86-64
rw-r--r-- 0/0 417832 Jan 1 02:00 1970 Pattern.cpp.o
AlexandreHURDYK
@AlexandreHURDYK
Let's pick one .o entry at random then
mmn
@mmn:matrix.org
[m]
yeah
AlexandreHURDYK
@AlexandreHURDYK
Processor.cpp.o: format de fichier elf32-i386
rw-r--r-- 0/0 190588 Jan 1 01:00 1970 Processor.cpp.o
format de fichier means "file format"
mmn
@mmn:matrix.org
[m]
I know.
Je comprends.
This is the important thing: elf32-i386
So you didn't cross-compile it for (32bit) arm, you just built it for 32bit x86 architecture.
AlexandreHURDYK
@AlexandreHURDYK
Darn. So it was bad all along.
Ok so at least we know why it doesn't work now.
mmn
@mmn:matrix.org
[m]
Yeah. So you have to somehow convince cmake to use your cross-compiling (for armhf) toolchain instead of your native (x86_64) one. Maybe the line source /opt/phytec-yogurt/BSP-Yocto-i.MX6-PD18.1.1/environment-setup-cortexa9hf-neon-phytec-linux-gnueabi should have done something like that, but apparently it didn't.
AlexandreHURDYK
@AlexandreHURDYK
Alright. At least now I know what went wrong. Thanks for the troubleshooting. I'll try these links out. :)
Fabrice Aeschbacher
@aeschbacher
@AlexandreHURDYK BTW if you're using Yocto (and not an external toolchain) oat++ builds just fine with
# PN, SRC_URI et all as usual , then
inherit cmake

FILES_${PN}-staticdev += "${libdir}/*"

EXTRA_OECMAKE = "\
  -DCMAKE_BUILD_TYPE=Release \
  -DOATPP_BUILD_TESTS=OFF \
mmn
@mmn:matrix.org
[m]
Hi, I'm trying to somehow get into Oat++, but I am honestly quite struggling with the documentation. Oat++ uses macros a lot for a C++ library (maybe even more than what I am used to from C where one does not have templates etc.), and at least to me function of many of them is far from obvious without looking into the code.
My point is that it would REALLY help if the documentation provided at least a high-level overview of how does the Oat++ macro system work and what do the macros actually do (mainly in the ORM/DTO and DI parts).
The macros are used throughout the examples, but AFAIK it isn't explained anywhere what they do.
oat++
@oatpp_io_twitter

Hello @mmn:matrix.org ,

The macros are used throughout the examples, but AFAIK it isn't explained anywhere what they do.

You can find docs on ORM, DTO, and other oatpp components here on the website:

If you feel that those docs aren't enough - please file an issue on Github - in oatpp website repo - https://github.com/oatpp/website

Also, please feel free to ping me here in case you need some deeper technical details on how those macros work.
Jeremy Guinn
@JeremyGuinn
Has there been any consideration for adding support for the http/2 spec and eventually http/3?
AlexandreHURDYK
@AlexandreHURDYK

Hello.

I'm trying to send an API call client side from a thread but I my client crashes everytime I call tthe API function. There's probably something I'm missing or not doing right. I'm going to post a small reproducible example :

AlexandreHURDYK
@AlexandreHURDYK
//My client class
class VoucherClient : public oatpp::web::client::ApiClient
{
    #include OATPP_CODEGEN_BEGIN(ApiClient) 
    API_CLIENT_INIT(VoucherClient)
        API_CALL_ASYNC("POST", "/", getRoot)
        API_CALL("POST", "/connect", connect, BODY_STRING(String, ip))
    #include OATPP_CODEGEN_END(ApiClient) 
};

//My API call function :
void funcCall(shared_ptr<VoucherClient> client)
{
                                cout << "[Connect] Calling the server..." << endl;
                auto data = client->connect("127.0.0.1")->readBodyToString(); //Crash dans le thread
                OATPP_LOGD("CLIENT", "[connect] data='%s'", data->c_str());
}

//My run function :
void run()
{
           cout << "Creating objectmapper" << endl;
    auto objectMapper = oatpp::parser::json::mapping::ObjectMapper::createShared();
    cout << "Creating requestexecutor" << endl;
    auto requestExecutor = createOatppExecutor();
    cout << "Creating client" << endl;
    auto client = VoucherClient::createShared(requestExecutor, objectMapper);
    std::thread th(client);
}

//My main function :
int main()
{
    oatpp::base::Environment::init();
    printHelp();
    run();
    oatpp::base::Environment::destroy();
    cout << "Press any key to close the program" << endl;
    _getch();
    return 0;
}
My actual app is actually much bigger than that. This is just a minimal example.
I've noticed that I need to join my thread un order to allow my code to work with th.join(), but my goal in the end is to see if my server can manage being sent another request before it sends an answer to my precedent request.
And using join would prevent me from using the main thread until the child thread is done working.
AlexandreHURDYK
@AlexandreHURDYK
Ok nevermind I've found what I'm doing wrong.