Daniele
something stupid like checkboxes for each pack
olli
also yes, how do I make a symlink in C++?
CreateSymbolicLink(SymLink, Target, Flags); https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-createsymboliclinka
:)
#googleit
Thank you
Renan
#googleit
https://google.it
Nazarova Muslibar
Nazarova Muslibar
https://godbolt.org/z/1qe6ve
What a program this is?
Nazarova Muslibar
https://godbolt.org/z/1qe6ve
Is it visual studio
Nazarova Muslibar
Which program is better for writing code in C ++
Murod
Which program is better for writing code in C ++
that seems good-looking to you :)
olli
What a program this is?
click on the link, it's compiler explorer, a website
艾丁森
my c project needs to link libstdc++ for some reason, is it okay?
J
your c project is a c++ project
J
what are your dependencies?
J
how are you building your application/library?
艾丁森
your c project is a c++ project
the c projects dependents a c++ project, that c++ project export functions in c-style
艾丁森
So I have to link libstdc++ in the c project
艾丁森
I can't link libstdc++ staticly to the c++ project, i don't know y
J
hmm... is that dependency a single library, or two libs, where one is the C functions, and the other is the C++ stuff?
J
also, its a bit weird for a C++ lib to provide a C interface rather than the other way around
艾丁森
hmm... is that dependency a single library, or two libs, where one is the C functions, and the other is the C++ stuff?
it's a single library, but it calls new and delete. it also use virutal functions
J
yeah, that's a C++ library and that's it.
艾丁森
I wonder whether it is normal that linking libstdc++ in a c project
J
a C library that provides a C++ interface on the side
J
it's absolutely not.
J
if you're linking in libstdc++, you're either doing something wrong, or you're writing C++ like C
艾丁森
I can't provide c interfaces in a c++ lib?
J
sure, but that means that it will then need to be provided a C++ runtime in deployment anyway, so it doesn't make a lot of sense
J
if you can provide that, then why not just use C++. it'd be hella more beneficial (excluding the Linux kernel, as an example)
艾丁森
they can just load library and call those functions' names
J
uhh, sure, but that depends a lot tho. in this scenario, you're describing a library in C++, that provides a C interface, which is then called, over some FFI presumably, by another language runtime. that'd be 3 different executors at least
J
i've not really seen that happen, and what's more likely is you'll have an implementation in C (maybe even some sweet, sweet, per platform optimizations), providing bindings to other languages, including C++
艾丁森
so I can't fake this c++ implementation as a c implementation?
J
no, nor should you.
J
what library are you talking about? can you link to its repo?
Anonymous
please anyone help me out in this program
艾丁森
i write it myself actually
艾丁森
what library are you talking about? can you link to its repo?
the scenario is I need to provide some ways that web front-end can call my c++ library
J
what's the front-end written in?
J
please anyone help me out in this program
https://www.w3schools.com/cpp/cpp_classes.asp https://www.w3schools.com/cpp/cpp_encapsulation.asp https://www.w3schools.com/cpp/cpp_constructors.asp
J
javascript?
is it running in like node or something?
艾丁森
don't you know web ? running in browser
J
no, i do embedded systems mainly, and im asking if it's running on an environment like nodejs, or some random concoction you've made, or on the client system?
艾丁森
running in browsers. should i compile them to wasm?
J
yeah, that'd be more adequate. im no authority or even a knowledgable person on this, but if you intend the javascript to run on the client, and it needs that C++ lib to be there as well - i'd say dont have a lot of options
J
either deliver as wasm or rewrite it in javascript
艾丁森
it also runs in a linux server
艾丁森
linux and web browser...
J
okay, hold on. which part of that whole application stack needs that C++ library?
艾丁森
none
艾丁森
It just I have already write it in c++
Alex
either deliver as wasm or rewrite it in javascript
you can create c++ http API for lib, and call it using javascript from browser
J
none
you will need to then rephrase your questions. you're not making a lot of sense.
艾丁森
so I should rewrite it in c
艾丁森
damn it , i was an idiot
J
why do you need it in C or C++, if none of your javascript stuff needs it?
Alex
yes, and you can rake leaves with buldozers
I don`t feel rewriting on javascript or wasm are always better options
艾丁森
sorry
艾丁森
I read your message wrong
艾丁森
both linux server and web browser needs that c++ library
艾丁森
I thought you ask why I write it in c++ before
J
I don`t feel rewriting on javascript or wasm are always better options
it'll compile into wasm, so that doesn't matter much (you still want to somehow have the client execute it); you're already distributing your js library, so the compiled wasm goes with it.
J
as for rewriting it into javascript... it depends. easier to manage, i suppose - none of the c/c++/wasm magic; but then it's a trade-off of finding adequate replacements for functionality and if the performance is even acceptable
Alex
also we don`t have any info about performance requirements
J
yeah, that'd be outside my scope. i dont deal in developing for web, but afaik, it's super awesome these days. not sure what versions of browsers are actually in use by user share, and whether wasm is supported/enabled on 'em.
J
again, i'd not go that route if i really dont need to, purely out of having less things to manage (if i can have all of the app in one language, that's a huge gain in reduced complexity)
Alex
easier to use http wrapper for existing c++ lib I suppose
艾丁森
I decide to rewrite it in c
J
like i said - i dont write for web. maybe when i'll start wearing my rust hat, i'll go and start touching wasm
Alex
I decide to rewrite it in c
what are you trying to achieve?
J
he has a lib that's in C++ and exports C-like function interfaces. he was asking why his C application was now linking libstdc++