Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6951375
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T14:12:42+00:00 2026-05-27T14:12:42+00:00

You got to love linker errors *sarcasm*. Any way, I am developing a psp

  • 0

You got to love linker errors *sarcasm*. Any way, I am developing a psp game using the psp port of allegro which came with pspsdk. And after I fixed all the other undefined references this one stumps me. The full error message and makefile and code below:

Error details

1>------ Build started: Project: PSP Pong, Configuration: Debug Win32 ------
1>  psp-g++ -I. -IC:/pspsdk/psp/sdk/include -O2 -G0 -Wall -I. -IC:/pspsdk/psp/sdk/include -O2 -G0 -Wall -fno-exceptions -fno-rtti -D_PSP_FW_VERSION=150   -c -o main.o main.cpp
1>  psp-gcc -I. -IC:/pspsdk/psp/sdk/include -O2 -G0 -Wall -D_PSP_FW_VERSION=150  -L. -LC:/pspsdk/psp/sdk/lib   main.o -lalleg -lpspgu -lpspirkeyb -lm -lpsppower -lpspaudio -lpsprtc  -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o main.elf
1>  c:/pspsdk/bin/../lib/gcc/psp/4.3.5/../../../../psp/lib/crt0.o: In function `_main':
1>  ../../../../pspsdk/src/startup/crt0.c (86) : undefined reference to `main'
1>  C:\pspsdk\bin\make: *** [main.elf] Error 1
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

MakeFile

TARGET = main
OBJS = main.o

CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)

EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = PSP Pong
LIBS = -lalleg -lpspgu -lpspirkeyb -lm -lpsppower -lpspaudio -lpsprtc 
PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak

main.cpp

#include <allegro.h>
int main()
{

    allegro_init();
    install_mouse();

    set_color_depth(32);
    set_gfx_mode(GFX_AUTODETECT,480,272,0,0);

    clear_bitmap(screen);
    while (!(mouse_b & 2))
    {
        poll_mouse();
        putpixel(screen,mouse_x,mouse_y,0xFFFFFFFF);
        vsync();
    }
    clear_bitmap(screen);

    return 0;
}
END_OF_MAIN();

P.S I think the linker is not talking about the main function in main.cpp but some other main but I have no clue so any advice, corrections, any thing to help me solve this will be appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T14:12:43+00:00Added an answer on May 27, 2026 at 2:12 pm

    Just before including allegro, try adding this define:

    #define ALLEGRO_NO_MAGIC_MAIN
    

    Source:

    http://allegro-psp.webcindario.com/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wrote a simple web service in C# using SharpDevelop (which I just got
I've got an subclass of TPanel which I love so very very much and
I've got a couple of colleagues who love Access and have lots of important
I just got my first Android device, I love it... I also love the
Okay, so I've got a problem - and I'd love to have it fixed.
The latest version of the Entity Framework got me in love, still at good
I've got a string like this: I love @kevinrose 's new website <a href=http://kevinrose.com>Link</a>
I've got some objects which implement this interface: public interface IRow { void Fill(DataRow
I've got a continuous integration setup using Hudson and lately I've configured the jobs
Hey everyone I am a newbie and would love some help. I got the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.