Reply to thread
GBAtemp.net - The Independent Video Game Community
Search
Search titles only
By:
Search titles only
By:
Reply to thread
GBAtemp.net - The Independent Video Game Community
Home
Log in
Terms & Rules
Donate
Forums
New posts
Search forums
Groups
Public Events
New
New posts
New resources
New blog entries
New profile posts
New blog entry comments
New threadmarks
Latest activity
Cheats
Cheat Codes Add and Request group
The Legend of Zelda: Tears of the Kingdom cheat codes
Pokémon Legends: Arceus cheat codes
Xenoblade Chronicles 3 cheat codes
Fire Emblem Engage cheat codes
Request a cheat...
Tutorials
Nintendo Switch tutorials
Nintendo 3DS tutorials
Nintendo Wii U tutorials
Reviews
Overview
Official reviews
User reviews
Downloads
Latest reviews
Search resources
Blogs
New entries
New comments
Blog list
Search blogs
Chat
Top chatters
Search
Search titles only
By:
Search titles only
By:
Log in
Register
New posts
Search forums
Log in
Register
Home
Forums
PC, Console & Handheld Discussions
Computer Technology and Gaming
C programming: How can I get snprintf to work?
Menu
Install the app
Install
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="mashers" data-source="post: 6664084" data-attributes="member: 366855"><p>I'm integrating bits of GodMode9 into my custom A9LH payload. One of the parts I need uses the C function snprintf. When I compile GodMode9, this works fine. But when I compile my own software I get a warning about an implicit declaration, and then the following error at the end of the build process:</p><p></p><p>[code]</p><p>/opt/devkitPro/devkitARM/bin/../lib/gcc/arm-none-eabi/5.3.0/../../../../arm-none-eabi/lib/libsysbase.a(sbrk.o): In function `_sbrk_r':</p><p>(.text+0x6c): undefined reference to `__end__'</p><p>collect2: error: ld returned 1 exit status</p><p>make[1]: *** [build/payload_stage2.elf] Error 1</p><p>make: *** [stage2] Error 2</p><p>[/code]</p><p></p><p>If I comment out the line with snprintf, it compiles fine. I have included stdio.h in the .c file which uses this function but it hasn't made any difference. I then checked the makefile and found that it was set to c11, so I changed it to c99 but this also made no difference. I then noticed that there are some differences between the C flags in the makefiles for GodMode9 and my own programme:</p><p></p><ul> <li data-xf-list-type="ul">GodMode9 has the following flags which mine does not: -g -Wpedantic -Wcast-align -pedantic -march=armv5te -mtune=arm946e-s -fomit-frame-pointer</li> <li data-xf-list-type="ul">My software has the following flags which GodMode9 does not: -MMD -MP -mcpu=arm946e-s -fno-builtin -Wno-main</li> </ul><p></p><p>Does anybody know if any of these flags are responsible for me not being able to use snprintf and if so, how can I get around this?</p><p></p><p>Thanks in advance!</p></blockquote><p></p>
[QUOTE="mashers, post: 6664084, member: 366855"] I'm integrating bits of GodMode9 into my custom A9LH payload. One of the parts I need uses the C function snprintf. When I compile GodMode9, this works fine. But when I compile my own software I get a warning about an implicit declaration, and then the following error at the end of the build process: [code] /opt/devkitPro/devkitARM/bin/../lib/gcc/arm-none-eabi/5.3.0/../../../../arm-none-eabi/lib/libsysbase.a(sbrk.o): In function `_sbrk_r': (.text+0x6c): undefined reference to `__end__' collect2: error: ld returned 1 exit status make[1]: *** [build/payload_stage2.elf] Error 1 make: *** [stage2] Error 2 [/code] If I comment out the line with snprintf, it compiles fine. I have included stdio.h in the .c file which uses this function but it hasn't made any difference. I then checked the makefile and found that it was set to c11, so I changed it to c99 but this also made no difference. I then noticed that there are some differences between the C flags in the makefiles for GodMode9 and my own programme: [LIST] [*]GodMode9 has the following flags which mine does not: -g -Wpedantic -Wcast-align -pedantic -march=armv5te -mtune=arm946e-s -fomit-frame-pointer [*]My software has the following flags which GodMode9 does not: -MMD -MP -mcpu=arm946e-s -fno-builtin -Wno-main [/LIST] Does anybody know if any of these flags are responsible for me not being able to use snprintf and if so, how can I get around this? Thanks in advance! [/QUOTE]
Insert quotes…
Verification
Post reply
Home
Forums
PC, Console & Handheld Discussions
Computer Technology and Gaming
C programming: How can I get snprintf to work?
General chit-chat
Help
Users
Settings
Notifications
Miscellaneous
Inverse message direction
Display editor on top
Enable maximized mode
Display images as links
Hide bot messages
Hide statuses
Hide chatter list
Show messages from ignored users
Temporarily disable chat
Receive mention alerts
Sound notifications
Normal messages
Private messages
Whisper messages
Mention messages
Bot messages
Desktop notifications
Normal messages
Private messages
Whisper messages
Mention messages
Bot messages
Options
Options
View top chatters
No one is chatting at the moment.
@
Psionic Roshambo
:
Yeah it could be hosted on the phone hmmm it's an idea Ken
Yesterday at 10:52 PM
@
K3Nv2
:
But could be bad for people with lower speeds but how many mbs would it really need to detect a button press
Yesterday at 10:52 PM
@
Psionic Roshambo
:
Nearly nothing
Yesterday at 10:53 PM
@
Psionic Roshambo
:
Most of it BT used
Yesterday at 10:53 PM
@
The Real Jdbye
:
movie for you
@Psionic Roshambo
https://www.imdb.com/title/tt1843303/?lang=en
+2
Yesterday at 10:53 PM
@
BigOnYa
:
That's how I pair with uremum, I wave a $5 bill across her face, and instant link.
Yesterday at 10:53 PM
@
Psionic Roshambo
:
@The Real Jdbye
, lol
Yesterday at 10:54 PM
@
K3Nv2
:
A priest travels to China holy covid
Yesterday at 11:00 PM
@
The Real Jdbye
:
being able to turn into a dinosaur would be low key amazing
Yesterday at 11:00 PM
@
K3Nv2
:
Just don't be a Trex you can't fondle your dong
Yesterday at 11:01 PM
@
The Real Jdbye
:
but you'd be the top of the food chain
59 minutes ago
@
The Real Jdbye
:
you could fuck anything
59 minutes ago
@
Psionic Roshambo
:
https://www.amazon.com/Billionaire-...5&sprefix=forced+gay+by+a+dino,aps,134&sr=8-1
58 minutes ago
@
K3Nv2
:
A Trex boning a penguin might not work
58 minutes ago
@
ColdBlitz
:
you could what?
58 minutes ago
@
The Real Jdbye
:
did he change name? wasn't it Chuck Tingle?
57 minutes ago
@
Psionic Roshambo
:
What
57 minutes ago
@
K3Nv2
:
https://youtube.com/shorts/VK44RNPKKoo?si=yXTLUF0aEvDNSZrQ
57 minutes ago
@
Xdqwerty
:
what are you guys talking about
56 minutes ago
@
K3Nv2
:
https://youtu.be/my3HxcHln3s?si=e3N9nhhfPl4_z8i3
56 minutes ago
@
The Real Jdbye
:
or is Hunter Fox just copying Chuck Tingle?
55 minutes ago
@
K3Nv2
:
That pussy is two faced af
54 minutes ago
@
The Real Jdbye
:
https://www.amazon.com/Tentacles-Made-Gay-Hunter-Fox-ebook/dp/B00M0VCUPK
let's be real, who isn't at least a little gay for tentacles though?
54 minutes ago
@
Psionic Roshambo
:
Maybe a ghost writer?
54 minutes ago
@
K3Nv2
:
https://youtu.be/zzu0VHzy7tU?si=V2sI-JSptJg0SWmC
48 minutes ago
Submit
@
K3Nv2
:
https://youtu.be/zzu0VHzy7tU?si=V2sI-JSptJg0SWmC
48 minutes ago
Chat
0