dont understand a lot of the options on code blocks, especially linker and its settings

I want to know how it works generaly so that at some point i can switch to linux and learn Unix

I managed to configure SDL but im not sure how, i put all the .dlls in system 32, filled the other search options bar with every possible address the compiler would want to look, i put -lSDL_main etc in the place the tut told me too, and i kept messing til it worked, but i dont want to touch the settings cos i dont understand them and dont want to lose them forever.

incidently i cant link my linker against the location of the header and source files, theres lots of things i dont understand and have asked before but i think im miscomunicating the issue sooo much cos people may not realise how little i understand
incidently i cant link my linker against the location of the header and source files


The linker doesn't care about source code. Only files that have already been compiled.
oh...
so i compile a header and source code and add the .o to linker library addresses
Yes, although commonly people set things up so that the whole chain from compiling to linking to finally produced executable is automated. In that chain is the creation of the *.o files that get handed to the linker.

Usually, if you're deliberately making a library, you make it out of many *.o files mashed together by the linker into a library file, which is then itself a new input file for the linker when you want to use the contents of that library. Note that things are a little bit different for dynamic libraries (i.e. if you're going to link against the library when you actually run the executable, instead of when making the executable).

It is really, really worth it to spend a couple of hours getting a good idea of how the compiler and linker work together to produce executables and libraries.
Last edited on
im having no luck so far but i wont hassle further for answers til im truly stuck, i just got over an sdl conundrum and dont think i should go further till i completley follow the linker deal, have no idea how to get to find the *.o yet will just pop it in different places till it finds it ^_^
Topic archived. No new replies allowed.