Code::Blocks Forums

User forums => Help => Topic started by: dedt on November 29, 2013, 08:26:56 PM

Title: I don't know how to generate a map file.
Post by: dedt on November 29, 2013, 08:26:56 PM
As you no doubt inferred from the subject title, I'm pretty inexperienced with C++ (and programming more generally). I'm trying to generate a map file but I don't know how. From the search I did through the forum, the most I could find out was that I'm supposed to add "-Wl,-Map=main.map" to build options->link settings->other link option, but that didn't seem to do anything.
Title: Re: I don't know how to generate a map file.
Post by: oBFusCATed on November 29, 2013, 08:32:31 PM
Why do you think you need a map file?
Title: Re: I don't know how to generate a map file.
Post by: dedt on November 29, 2013, 08:40:10 PM
I was asked to generate a map file by my prof.
Title: Re: I don't know how to generate a map file.
Post by: stahta01 on November 29, 2013, 08:57:56 PM
Did you try this option found on http://gcc.gnu.org/onlinedocs/gcc/Link-Options.html (http://gcc.gnu.org/onlinedocs/gcc/Link-Options.html) in extra/other linker or compiler options.

-Wl,-Map,output.map


Tim S.
Title: Re: I don't know how to generate a map file.
Post by: dedt on November 29, 2013, 10:13:20 PM
No, it didn't work unfortunately.

Then again, maybe my expectations about what's supposed to happen are naive. I'm expecting a file to pop up after I run the program. Is this assumption correct?
Title: Re: I don't know how to generate a map file.
Post by: stahta01 on November 29, 2013, 10:47:35 PM
Quote from: dedt on November 29, 2013, 10:13:20 PM
No, it didn't work unfortunately.

Then again, maybe my expectations about what's supposed to happen are naive. I'm expecting a file to pop up after I run the program. Is this assumption correct?

No, the file will be placed in a folder on your hard-drive.

Tim S.