Author Topic: I don't know how to generate a map file.  (Read 6407 times)

Offline dedt

  • Single posting newcomer
  • *
  • Posts: 4
I don't know how to generate a map file.
« 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.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: I don't know how to generate a map file.
« Reply #1 on: November 29, 2013, 08:32:31 pm »
Why do you think you need a map file?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline dedt

  • Single posting newcomer
  • *
  • Posts: 4
Re: I don't know how to generate a map file.
« Reply #2 on: November 29, 2013, 08:40:10 pm »
I was asked to generate a map file by my prof.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7785
    • My Best Post
Re: I don't know how to generate a map file.
« Reply #3 on: November 29, 2013, 08:57:56 pm »
Did you try this option found on http://gcc.gnu.org/onlinedocs/gcc/Link-Options.html in extra/other linker or compiler options.
Code
 -Wl,-Map,output.map 

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline dedt

  • Single posting newcomer
  • *
  • Posts: 4
Re: I don't know how to generate a map file.
« Reply #4 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?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7785
    • My Best Post
Re: I don't know how to generate a map file.
« Reply #5 on: November 29, 2013, 10:47:35 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.
C Programmer working to learn more about C++ and Git.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org