CPPP 2019 - Tools to Ease Cross-Platform C++ Development - Simon Brand

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments

Great talk

👍︎︎ 8 👤︎︎ u/zhaverzky 📅︎︎ Sep 05 2019 🗫︎ replies

I'm not seeing the slides in the Github repo.

👍︎︎ 2 👤︎︎ u/RotsiserMho 📅︎︎ Sep 05 2019 🗫︎ replies

Such a great talk!

👍︎︎ 2 👤︎︎ u/bandzaw 📅︎︎ Sep 06 2019 🗫︎ replies
Captions
[Music] so there are many talks in c++ conferences or across any tech conference about libraries or about tooling which say you know here's feature number one your speech number two I'm going to tell you all about that I'm gonna walk you through step by step what this library what this tool can do and those all have their place but I want to try something a little bit different for this talk instead of just walking you through what the tools can do I want to actually build something build something which is interesting in which you could actually achieve something with and I want to do it live so I came up with some goals I want to achieve for this talk I want to develop a small cross-platform application live so the cross-platform tooling talk I want to target Windows and Linux because this is at least a a real-life example of what you might try to target but I could do it in a talk I want to demonstrate how you could handle the pendens ease so I need at least one library which I need to fill in and link against or my program to work and I want to build something powerful it's not gonna be just a you know X silly toy hello world example I want to build something which makes people say wow you can actually achieve this in an hour with these tools and that is the the tough part is I need to do it all in an hour so you know I had to think and I thought you walk they build in an hour which has all of these things and I came back to what I usually do which is I could build a compiler you know what could possibly go wrong so maybe an alternative title for this talk set of tools to ease cross-platform C++ development right a compiler in an hour or cry trying this is what I'm going to try and do today source language so a compiler a source language and a target language the source language is what I'm taking in as input and the target language is what I'm generating so the source language could be C or C++ or Fortran or whatever an output language the target language could be an alarm or x86 it could even be C or another kind of actual source language real compilers do this so my source language for today is this can anyone tell me about this language this is brain yes so this looks weird this is actually one of my favorite languages and I'm not making a joke guy this is real because this is a really simple language with a very small set of instructions I can realistically build a compiler for in an hour so I'm going to kind of introduce the language to you so you understand enough to follow along and you should understand pretty much the entirety of the language so essentially operates on this infinite tape of zeroes every zero here is a cell of memory this is just an infinite linear tape of memory and these are all characters 8 bits 0 to 255 in addition to this memory I have a pointer which here's my correct this is kind of just like a classical Turing machine you know you have an infinite tape you're doing some kind of symbolic manipulation you have a tape head which is tracking along reading things writing things doing computations we have eight instructions each instruction is a single character it's the first one does anyone have an idea of what this instruction might do exactly moves the pointer one place to the left so we can do this instruction multiple times and move our pointer over if we want to move it back then we use this instruction which means the point to write so we can keep on stepping and eventually we get back to where we started all right this one any ideas increment yep just language I mean it looks weird but it's actually pretty sensible in a lot of ways we can just increment whatever we're pointing at now if we want to decrement it we use the minus instruction a little bit less obvious are the i/o instructions comma which reads a character from standard in so you could read for example whatever three years in ASCII and then we can write it to stand it out with dot these there are two io primitives and the last two instructions lets us do loops so this means we're going to repeat whatever is between these two square brackets while whatever we're pointing at is greater than zero so as an example if I put a minus which is the decrement instruction in there this would just keep on looping down until we get to zero and we end and that's the whole language does anyone have any questions about this before I move on yes when you increment 98 so I mean these are all zeros just for demonstration purposes these are 0 to 255 so in like proper compilers and interpreters I think you wrap when you get to the end I don't think I handle that here because I have an hour but you know my target language is going to be X 64 which is the 64-bit flavor of x86 assembly I'm not going to teach any here we're going to be using a very small subset and I'll kind of explain it as I go along the tools I'm going to be using today are these Visual Studio C make wsl and decent package we don't know what any of these are don't worry I will explain them obviously I'm coming from Microsoft so these are the tools I'm going to talk about some alternatives could use beta sheet code or C line for ID ease Nissan bill tune for build systems these are all some alternative tools you could use if you want to apply these kind of concepts but you don't like the tools for some reason so that is enough for our introduction now we can get started sewing at a bat and open up visual studio okay so I say we're going to start from scratch so we're going to create a new project and as I said we're gonna be you see make I mean see may can see make it has its issues but it's essentially the de facto standard for doing cross-platform C++ development I'm gonna call it lame duck because I'm a terrible person and there we go we have a very simple C mate template so you can see kind of where we're standing we just have a project with a single subdirectory I can hover over and we get a little tooltip which you probably can't read that just tells you a little about the instruction and then in our subdirectory we have our executable single executable which builds from this source file and the source file contains a very simple hello C make example so just for sanity sake let's build and run this and we should see there we go hello see me and now we're gonna get started on building our compiler and get rid of all of this we're gonna have three stages in our compiler we're gonna compile we're going to assemble and we're gonna link and we're using functions so this is functional programming that's not true so we're gonna have three we'll just keep them empty for now okay so we're gonna start off with compilation so the first thing we need is we need a input file which we're going to read our code from and we need an output file which we're going to write our assembly code into so use if' stream and and for now I'll just use hello W F and we'll put something there later similarly we'll have an output stream and we'll just call it temp dot awesome this is where we'll write our assembly into before calling out to our assembler and our linker to eventually give us an executable now you note that our our ID here has very helpfully told us that we don't have a stream available but it can actually add the header for us now this is a relatively recent feature in Visual Studio but it's quite handy if we just want to use something and where the ID worry about what to include okay so we have our two files and now we can get started with our compiler now because the input language is so simple as I said it's just characters each character is an instruction we can just loop over every character and for every character will write out some set of x86 instructions does that make sense so we just have char C and while we read characters we're gonna switch over see now the eight possible instructions we had were a right-left plus minus comma dot and the loop instructions a Visual Studio has this nice handy multi caret editing so if I hold down shift and alt I can actually go and write all of this stuff in and essentially a one-er saves me some typing handy so go up my cases and I'll stick in a default as well okay so now we are ready to start outputting code we're going to start with these four instructions because they're pretty simple as I said the language is an infinite tape of zeros and a pointer which is gonna move right and left as our program executes that's what we need is somewhere to store this pointer and when we're executing write down when we're writing assembly best place to store that isn't a register so I'm going to store this in our 12 so output instruction just looks like this add into our 12 the immediate 1 does anyone have any questions about that before we move on ok hopefully even if you've never seen assembly before it's fairly self-explanatory similarly for moving left we just subtract 1 if we want to add in 2 here then we need to essentially indirect through our pointer and we do that using oops these square brackets and this is just saying add 1 to whatever our 12 is pointing to which in this case is our our cell here and then just the same we can subtract 1 so those are the four very simple instructions we can go ahead and build our compiler succeeded ok so I'm going to use this compiler from the command line because it's just much easier to work with so I have this extension called whack-whack terminal which is just an integrated terminal into Visual Studio and saves you having to another terminal window open to do all of your your command line stuff so if I run out slash build dear of course all right slash bill slash lame-duck there we go so that has runner compiler and we now have our empty assembly why is this empty pardon sorry he wrote anyone saying yes correct we did not move our our input file so I have hollowed opf here ready and waiting for me which I can just move in Oh move is not I don't know how to batter command-line shell at all here we go so this is a sneak peek into wsl the our hello world is just this don't have to worry about what's doing just trust me it's a hollow world program it will be fine so we can rerun our compiler and hopefully we will get there we go something which looks like x64 assembly so now this is targeting Windows but I said we want to make a cross-platform application we want to target Linux as well and in order to do that we're going to delve into windows subsystem for Linux so this is pretty much as it says on the tin it's a subsystem in Windows for running Linux distributions so you wants you to be able to install Linux distributions easily not just like some fakie Linux environment like actually installed we've been to or mint or arch things that you're familiar with if you're coming from a Linux background and we all run bash shell scripts and Linux command line applications like you Emacs or Ruby or H that sshd any of these things which you're familiar with from the Linux world my favorite thing is we can now use Linux package managers I can use apt your pac-man and actually install software and have a productive developer experience on Linux inside Windows which is really really nice and I can even invoke Windows applications using a bash shell and if you just saw how I completely failed to move a file inside CMD you know that this is really really great I can use a bash shell and invoke my Windows command line applications one thing to note is it's not a VM this is not something which is going to take a while to spin up or use a bunch of resources it's a compatibility layer which just Maps the Linux world into the windows world so it's pretty performant in most ways file system performance is not great but most of the time it's there it's very very usable very fast and installing is as simple as running this partial command and then getting whatever whatever distribution you'd like from the Microsoft Store question you say this is the inverse of wine yes pretty much so if I've already ran that the Paracel command yep how does it compare to cygwin well cygwin is trying to give you a kind of linux shell in the windows world and you get a whole lot of problems like path mismatches between Windows and Linux tiles this is actually a Linux distribution sitting in your Windows machine I mean it doesn't have the Linux kernel yet that is coming but it's as close as you can get to actually running Linux inside Windows without like running a VM and all that nonsense so if I go open the Microsoft Store the page could not be loaded just trust me you can download a bunch of Linux distributions and I have installed you've been to so this is just what you'd be used to if you run into you guys would develop your machine I can run LS I don't have to run dare I can run I know find it gives me a bunch of files I can run GCC I can run apt can search for clang essentially anything what you're used to in a Linux environment you can do from WSL and so now I have W cell up and running but I want to target it from physical studio and in the past you have to do a bunch of jiggery pokery likes set up ssh server and type in all your configurations and things like that but it's got a lot easier in ES 2019 so this is the new C make configuration UI so it used to be you would just edit JSON files by hand but now we've got a nice little degree so you can you can modify this all without just writing JSON so you'll see that this is targeting 64-bit MS PC now if I want to add VSL wsl targeting I have a configuration and down here is wsl debug this is that targeting 64-bit Linux if I want I can change I can actually run address sanitizer from Visual Studio in Linux and I can change any C make variables I wanted here so go ahead and save that then change configuration this is now generating running C make inside WS l and all I did was add a configuration and save the file so this is found see make let's even find my VC package installation which I'll talk about later and it's generating UNIX make files I could make it generate ninja if I wanted so it generated and it's gonna start extracting the information from the target so soon hopefully this little thing should go away there we go perfect timing okay so now if I hit ctrl shift B I'm now building for Linux succeeded and I type WL I'm in my bath shell I can now run the slash and it's build W so and that runs my Linux application I just built question yes yes so this is this isn't the question was are these in different folders yes this is an out build WSL debug the other one is in our build X 60 40 bucks so it's generating the windows binary reason here and then 1x binary isn't here there's like I say yeah so I can just as easily like I mentioned you can run Windows applications from the bash shell so if I just switch this to x64 and I do dot XE I just ran the Windows version you can see these are different if I they're on file this is an elf file which is the winix binary and for canoe Linux and if I run file on the XE then it tells me it's for Windows so these are actually binary is built for different systems but I can run them from the same place which is really really nice ok so I can our build for Windows bill for Linux we're good let's keep going on our compiler so for output and input I'm going to kind of cheat you could this with system calls but it would be nightmare on windows because they're undocumented and it's just not fun so instead we're just gonna call into whoopsy so we're gonna link against Lipsy and call get char to get a character from standardin that's going to put the results in the AL register so we can just move into our twelve into where we're pointing from our twelve the result of getchar and break similarly for putting a character we're just gonna move whatever we have in our twelve to CL which is what Windows expects arguments to go will deal with with Linux in a little bit and call picture it's all okay any questions nope great okay so a little bit more complicated as loops so loops like I said if we have some instructions what we're going to do is when we get to this instruction here we're gonna check if what we're pointing at is zero if it is then we finished the loop so we're gonna jump to the end if it's not then we keep doing all the instructions in the middle and then jump back to a check okay the problem is these can be nested so we essentially you need to be able to match up our begin and end loop instructions and we can do that with a stack so hopefully the standard library comes with a stack so you can just keep a stack of all the labels which we've written out to jump to in our assembly and push and pop those as we find them then when we need to start label and we can ask our ID to give us the stack include okay we're all green so now we need to start writing our a code for here so what I said was we want to check if what were pointing at zero and if is we jump to the end and we need a way to jump back to the check so we need to have a label in here and we're just going to number all of our labels with some integer so that we can find where the where we're going to jump to then we need to do a check we're gonna compare what's in our 12 to 0 and if it is zero then we're gonna jump to the end label which we'll just call label number and write spaces after label no because this is all gonna be one label name this is gonna be like label 0 end or label 5 and and the one two lines up is gonna be like label 0 or label 1 yep so similarly for the end when we get here we want to jump back to our original label which will be a jump for label at the top of our stack now we'll keep track of that by making sure we push that here and increment it so that where I'm will have label 0 label 1 label 2 and these wall match up in our assembly so we're gonna jump to labels top and then we need a label to jump back to from here our label end which is gonna be fun labels top and yes I did thank you okay and we need to pop our label off the top so now we have matched up our begins and our ends and this will all hopefully work out in the assembly what do you all think about this code and the i/o streams interface in general any feelings 9:43 semicolon no I don't because uh I'm just gonna continue streaming to this out stream is just gonna keep on working I'm not really a fan of i/o streams in general this looks really really noisy you know keep on having to have these Chevron's and end my strings and then dump something in the middle it's really not nice but hands up if you're familiar with format lib most of the room that's cool so format live is fantastic it's a library which is hopefully going to make it into a future version of C++ in the standard but currently you can use as an external dependency so I can do is I can use format Lib to essentially get Python style formatting in my in my C++ so I can get rid of all of these Chevron's and replace them with placeholders then all I need to do in here is say that I want to fill in these placeholders with current label so this will fill in this just means the zeroth argument which is current label so I'm gonna dump in say zero or five or twelve whatever my label number is here into you is everyone okay with that cool and similarly here I can do format print so it's okay whoops get rid of these get rid of all this nonsense and put labels dot top as my argument okay so that looks grew a lot better I hope you'll agree it's a lot more readable understandable what we're actually trying to achieve this is some label with a number and then we have an instruction and then we're jumping to label with a number and end so a lot easier to see what's going on and especially if you have more complex formatting you're trying to do this just makes so much more sense the problem however is this red squiggle I don't have format Lib installed and now I have to do dependency management so I'm gonna use BC package one handing thing is I know what header I need to include I know the format Oh stream H format slash go stream H is the header I need to include in order to do all the work which I've just done and had it compile and Link of course it kind of opened the source file because I don't have it installed switch back to Windows for now helpfully and Visual Studio tells me that format can be installed with PC package and even says it can copy the command to my clipboard so I can go ahead and do that and I have VC package already installed so they go paste this in PC package install format and for 64-bit windows hopefully there we go so I already had the package downloaded because I don't trust conference Internet but this is now building it from source and installing it in a known location so that any of my visual studio applications can find it or I can use it from GCC or aplying or anything just might need a little bit more configuration so that's all built already but I'll go back and talk a little bit about DC package itself this is an open-source project developed by Microsoft and the community and you can find it at github it's a package manager for C and C++ libraries and it's cross-platform it runs on Windows Linux and Mac OS there are over a thousand packages at the moment and there's more added essentially every day they're either contributed by Microsoft or they're contributed contributed by all of you folks so you can if you have your own package or a package which you depend on and it's not in B C package you can write your own they're called port files to tell vc package have to build and install this library and then everyone can use it you just issue a pull request into the to the github repo here and if it looks good it'll get merged in and everyone benefits this is kind of tired the model works and some nice things about busy package all the libraries and their dependency chains are tested so if I have a given commit of VC package which has a thousand packages all at some given version I can do all those packages have been tested and all their dependencies they've also been taken from that package list as well so the entire chain of dependencies is good at least depending on how good what they're testing is it means you can be fairly safe in the knowledge that if I pull down in this library I'm not getting something broken and that actually wipes out a whole stream of errors you can export binary packages so although a VC package as I just showed will build everything from source you could do this say like on a build farm and then distribute all the binary packages to your developers so that you don't have to build all your dependencies all the time it supports private libraries so if you have your own proprietary stuff which you want to keep secret and no one can have then that support that you just have your own fork of of all the ports which are available and you can put your own ones in there and no one has to know anything about it you don't have to tell Microsoft you can just keep in your own world you can and you should pin your dependency versions so if you have a set of dependencies for a given version of your project you don't want those to be upgraded under your feet because that can cause problems and this is a big issue with with using system package managers for dependency management because as soon as you like upgrade like some application then maybe all of your dependencies get upgraded and now your your library which you're developing is broken so you don't want your dependencies to get updated without you asking for it and you can do that with BC package so a little bit of a demo so I already showed how to build something with it and this handily gives us some see make targets so no matter what package it is yes the question is is it possible to package non-native libraries like Python I think you could do that it's not the domain it's not the desired use case for for the manager so we got our RC make invocations here we can steal the magic words and put them into RC make so don't want the header only version takes indentation okay so now this is all I need to use format Lib in my application its installed it through z VZ package I stole the necessary see me see make instructions from what it told me and now it should be good to go so ghetto seeming to regenerate and hopefully this should go away there we go so now if I scroll down here again I look that small but this is the this is the documentation for format lab and I can write say format PR and I get format print and V print and I have full intellisense and it all just worked from VC package all I had to do is install VC package which is very very simple and Visual Studio just works with it it's really nice last place I need to put format Lib as I mentioned this the co register this is where windows expects the argument for for picture are to go but Linux is a little bit different because it has different calling conventions so I can do for our print out and then I can just give it an hour Gretch and then up here I'll say if I'm compiling for Windows then our garage is CL otherwise our garage is dill that's where Linux expects arguments to go and if ok another nice thing to note is the vigils to you has recognized that we're currently building for Windows because when 32 is defined as one so a grazer if you can see it pretty well yeah you can it can degrees out this this line here so you can focus on what you're actually building right now and you can know that this will not be touched at all if I flip to wsl then the switches so we now know that I'm I'm on this branch of the if death it's just a nice little visual feature okay so that is I hope a working brain FERC - x86 assembly compiler if everything is gone well I now need to assemble and link so that's going to be a little bit different on Windows and Linux again because they have different file formats for binary they have different system linkers so this is all gonna be if deafed yes it's fine you could of course abstract this and do it nice but I have an hour okay so if we're in win32 I'm we're gonna use masam the net wide assembler because it runs on women Windows and Linux and we can just use one assembly syntax we don't have to bother about conflicting syntaxes which is just a nightmare so I can run Assam for winged 64 and I'm going to generate a TMP table object file Linux is gonna be very similar instead of Wynn 64 I'm gonna generate elf 64 I'm going to generate tempo just because it's more idiomatic on on Linux systems okay so that should assemble my object my assembly into an object file now all I need to do is get an executable for which I need to use my linker and link against Lib C so again after win32 some windows finding these tools a bit of a pain so I cheated and made some environment variables so my linker I put in wink 64 and my universal C runtime library I put in you see RT 64 so this will get me my linker and my C runtime for Windows and then my command I'm gonna run using CID system on windows is a pain it really really is you have to essentially do a ton of quote escapes to get anything to work but you know we'll we'll make do so for Windows we need our linker we need more quotes because windows must have them we're going to compile for console our entry point is going to be start and we're gonna compile temp table - hello Dex see last thing we need is our C library and I think we have enough quotes to appease the windows guards so we can format that with our linker and are you CRT run that this stuff is kind of mechanical but you know you have to do if you want to get something working finally on Linux it's a little bit easier we can just run stood system LD link against C library generates a temp 200 and we're going to generate hello as our binary the last thing to do is Winky use the 64 bit dynamic linker and I just happened to know where that lives okay where's that say line 75 no no so they appeared that the question was I missed it did I miss a zero between here no so if you I use zero inside that placeholder earlier because I wanted to use the same argument twice so I had to say I want the zeroth argument twice if you just put nothing in between the placeholder it will use it will incrementally use so this we use the zeroth argument and this will use the first document okay so the last thing I need to do is we're calling functions we have some memory but we haven't actually set up our stack or or tearing it down or anything yes question oh so four yeah the question is about I'm using NASA as my my assembler that's mostly just so I can get something working because NASA runs on Windows and Linux you could just use like assembler which comes with GCC but it doesn't have the same syntax as the one which the Microsoft one works so it's mostly just for for sake of of sanity so the last things I need to do are create a prologue for my functions and this is just gonna set up my all the memory which I need here and make sure that we have all of the Lipsy functions we need so we need to say that our underscore start is going to be our our entry point so we need to declare it a symbol we're going to be calling some C functions so we're gonna declare them as external symbols we're gonna call XA at the end as well as we'll put that there start is going to be our our entry label so we need to say we're gonna put it in the top text section which is where code lives not much more to go now so we need to set up our stack which is going to hold all of the memory I said this table is infinite unfortunately we don't have infinite memory and computers yet so I'm just gonna pick 4,000 that sounds into it enough right so subtract 4,000 from our SP which is the stack pointer now I need to zero it fortunately x86 comes with what's essentially just a mem set function but as a single instruction and I can call it like this I can say I want to write the byte 0 I want to write it 4,000 times and I want to start at our stack pointer then we get the gorgeously named reps topspin and this is our are men set essentially last thing is I said that we want our twelve to store a current pointer so we'll initialize that to the the bottom of our stack and then we need to give a little bit more space in our stack for calling functions we'll just subtract some more and then write this out and finally I said we also need to tear this all down at the end so our epilogue just needs to set the stack pointer back to where it was and call exit there we go okay so we need to reset a stack which we do just by adding 4046 which is what we subtracted in the prologue and we want to return zero from the entire function which should do by moving zero to EAX and calling exit we write this out okay so if everything has gone well which is a very very loaded thing to say then we can build for Windows which I just did we can now build for Linux building linked okay great we can go into WSL we can run our compilers make sure in X slash builds wrong yep and you just go back to so here we go okay I can run I top-billed /w Sal and this should generate me there we go hello my binary and this is what my assembly looks like this looks like some fairly reasonable at least valid x86 assembly so we've got our prologue at the top here we've got all of our labels we've got our label ends and then all the way at the bottom we should have our our epilogue so I ran the Linux compiler now I should be able to run the Windows compiler from the same command line oops okay that compiled and it linked so we now have hello and hallo XE so if we run can run both of them at the same time okay deep breath kind of get a drumroll hello world hello world okay so we just wrote an entire compiler in an hour it worked miraculously here are some resources you can find if you want to learn more about any of the things which I've talked about today or you can come talk to me I'm at tartan llama on Twitter come find me after send me a message enjoy the rest of the conference thank you any questions as a target say can you start again tonight yeah so during configuration time you chose wsl as a target and you could have chosen Linux what is the difference oh so question yep so when I choose configurations I could add these Linux targets as well these are essentially if I if I have like a remote Linux machine or VM I set up or something something which isn't WSL but I still want to target I can do that and I would use the Linux targets for that so the wsl ones are just if you want to target WSL and don't want to do any of that setup but you can target like embedded devices or Linux desktop machines or servers by doing all of the SSH configuration yourself essentially okay but they could generate for Linux and then run it into the value SSL right yep yeah yeah you can do that you could you could generate a Linux configuration and then you would have to use the connection manager to set up your your Linux your connection into wsl and set up your SSH servers and things like that so you could do that it's just a lot easier to use WSL configuration yeah thanks sorry quick hello how was you handle the line returned on both environment how is the line returned windows so basically if i take this code and have have it mounted somewhere in linux should I be worried about a cat or even between the boss OS so do you mean if your do you mean if you're writing C++ applications or if you're just using WSL and using a bash shell and I mean of course compiling between Windows or Linux I have one code in one place and I have both compilers both micros compiler actually cares about GCC or other one cares what's the line at the end of lines give me another end the lines of your source files yeah exactly okay Daniel ends your source files okay I think you can handle that in I can't remember individual students visual see you a code at least you can easily change the the line endings yeah I think it can't be a problem if you're not like aware of it but they're there tools to help with that so you can you can convert between the two with command-line tools or with get hooks or with your text editor or your or your IDE so as long as you're aware of when you do hit a problem you know how to solve it then the base is the basic problem is when you do git diff right yeah yeah you can set up the editor to to use UNIX line endings okay thank you so how rude windows subsystem for Linux work with graphical applications yeah so WSL is only for command-line application so it doesn't work with with graphical applications you could maybe like I know supply x11 forwarding or something I haven't tried that I don't know if it would actually work but yeah if you only do graphical applications you're going to need setup of VM and one up okay another thing that might be nitpicking is in your code and the FMT namespace you had curly think I guess yeah yeah the purple lines yeah that's just uh intellisense and vc package and wsl having a little not going on very well with each other it's just like yeah that will be fixed at some point so yeah the purple lines just mean that you know this is fine in this configuration but in your other configuration it's not working so it's a it's not quite as bad as red lines which mean it's broken right now purple lines just mean if you switch configurations you're gonna have problems okay thank you very much yeah hi I understand it won't be magical but how much work would you have to do to integrate another package made and the manager likes it maven I mean in Visual Studio well what would have to change in what you've done because this was couple clicks because it knows about right yeah I understand they may they may be scraped but how much work how much additional work would it be to work with something beside PCP kitchen yeah so PC package because it's you know it's a Microsoft tool and we have spent all the time in Visual Studio making sure that that integration is really nice so with busy packages obviously if you click so you say if you want to use like Conan or something like that you absolutely could you would just have to do I've no I wouldn't like to estimate how much extra work it would be but you would have to do the configuration to make sure the biggest reviewer knew where to find those those libraries you'd probably just need to hook up make sure that C mate could find them and then see me can find them then intellisense can find them and and everything should be okay but yet you would need to do a little bit extra work to use a different package manager any other questions yep here you starting a new project to cool things to make first platform and use package management what if you have already a big project with a lot of modules and you count like build system and package management you know it's bad so you want to change we do like start using these tools for like one module and try to interpret it in existing or yeah yeah you could do this kind of thing iteratively so I mean if you if you start using VC package it doesn't mean that you need to put all of your dependencies in there if you have a huge dependency list you can like one by one move them over test make sure that you're still gold and then eventually you can move everything over you don't have to do it all just like one huge PR or something because that's yeah that's not gonna fly most places and I have just a small follow-up question because I'm working in embedded systems we're here like you have three mate targets individual Shula for Windows Linux Excel if you were using a specific tool chain because you're compiling for a specific hardware yeah how hard would it be to add it to visual studio like and so the if you have do you have like AC make two chains I'll know like it's it's more tool chain like has a full livery foolís Lipsy we oh yeah so if you have if you're doing cross-compilation what you really want is a see make tool chain file which sets up your sis routes and all your environment and has it all just in one script and then if you have your own tool chain file you can still use that with visual studio and with PC package and it will still work we don't have that because we're using the bendable Verity but we could send thank you hello thank you for the presentation and the question would be about the different platforms so you said sorry they said that the support is for Windows for Linux from Mac OS what about for example Android or embedded for PC pockets yeah I think I'm not entirely sure but just how much all the fact stuff is tested because yet testing all these platforms and having all of that infrastructure is is difficult I think it's at least like nominally supported that maybe you you couldn't necessarily just say oh hey I got everything and it works at the box and all of my libraries I need are working you probably need to do some additional testing yourself other questions great thank you very much [Applause] [Music]
Info
Channel: CPPP Conference
Views: 3,131
Rating: 4.5714288 out of 5
Keywords: CPPP, cpp, CPPPFr
Id: c8ZWdLCqnw4
Channel Id: undefined
Length: 59min 13sec (3553 seconds)
Published: Thu Sep 05 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.