[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Hey, /g/. So I have a code, that I need to use boost in to do

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 12
Thread images: 2

File: boost.png (6KB, 277x86px) Image search: [Google]
boost.png
6KB, 277x86px
Hey, /g/.

So I have a code, that I need to use boost in to do the directory magic and I want it to compile on another PC without boost in any form. How would I go about it? Basically I have to be able to change the code while showing it to someone and recompile it without problems.

Is it possible to just have the filesystem library with the code files?

Thanks.
>>
File: download.jpg (7KB, 225x225px) Image search: [Google]
download.jpg
7KB, 225x225px
>boost
>>
>c++
>>
>>57700476
Is there anything better? This is the first thing I've found. Maybe something in the new C++ standard?
>>
>So I have a code,
Do you speak English natively? Because this sounds terrible. Using the article "a" suggests that code is something that can be quantified into logical amounts. How much code is "a code?" How many lines? You know what you have? You have a program. The amalgamation of all of your code makes a program, or perhaps a library. Or perhaps you might want to say you have "some code."

But don't say "a code." That just sounds retarded.

Also, the comma was completely unnecessary.
>>
>>57700574
jesus christ g, Im going to fuck off then
>>
Think you need to learn more about the language and how compiling works.
>>
Get over it and live on. Start playing guitar and banging hot chicks. What else to do in life? And don't forget cocaine. Cocaine is the most important.
>>
>>57700442

I'm convinced the others are giving you shit because they actually don't know.

I'm assuming C++ compilation is not too divorced from C, because if they are I don't know either.

You're probably going to need to use dynamic linking. Fact of the matter is, if there is external code you need for your program to run, it needs to exist either on the computer as a library in a standard directory for them, so the computer can know when you call library functions in your program how to resolve the reference, or you need to package the library with your code so you can link to it during compilation when it's not on the target computer.

if you just want the code to run after compilation on new systems without changes, you can use static linking, which splices the library's code into your code in a copy-paste-esque manner when you compile so you no longer need the original library. This is good if you need to guarantee final compilation works despite the target computer lacking libraries, but you can guess is pretty memory heavy and won't let you make changes to compile again.

Fair warning: dynamic linking can be a buggy bitch, error messages will be unhelpful, and you'll have to compile each file with a set of flags that I can never remember, which means you'll need to make a Makefile describing how each file is to be compiled based on its dependencies and flags. I wash my hands of teaching you that, because that rabbit hole runs deep, but if you need what you're looking for, and C++ compilation is at all like C's, this pretty much is how you're going to do it.
>>
>>57700497
Do it yourself instead of importing multiple libraries that won't be used and don't work in all compilers.
>>
>>57700574
>But don't say "a code."
an code
>>
>>57700442
>>57700574
>pajeet can't into english sahib
Thread posts: 12
Thread images: 2


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.