#### Archived

This topic is now archived and is closed to further replies.

# Strange problem with Allegro and DJGPP...

This topic is 6912 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I haven''t been into programming for a while, and now when I downloaded newest WIP version of Allegro AND new version of DJGPP, I got into problems... First of all, I cannot compile C++ (.cc) files with old way for some reason... I used to write: gcc -o hello.exe hello.cc -liostream but now this gives me response: d:/janne/djgpp/bin/ld.exe: cannot open -liostream: No such file or directory (ENOENT) same thing with Allegro. When I''m trying to run same hello with additional library , I will get: d:/janne/djgpp/bin/ld.exe: cannot open -lalleg: No such file or directory (ENOENT) I don''t have any idea whats going on... I did setup basic djgpp settings (set djgpp=...), and binary path. Could someone enlight me ? -Paladin

##### Share on other sites
Hmm... ok, I think I found the problem, but this just scares me even more...

I copied my Allegro libraries and header files to equivaliant DJGPP directories, so now djgpp can find those files directly, but why doesn''t -lalleg find files from Allegros own directories anymore??? Is this some bug, or what? I think that MAKE should do this kind of things, but not...

##### Share on other sites
And more... I just tried to compile existing source code (lbm.c) and got this:
d:/janne/djgpp/lib/crt0.o(.data+0xc2):crt0.s: undefined reference to main''
d:/janne/djgpp/lib/libc.a(crt1.o)(.text+0x44e):crt1.c: undefined reference to main''
collect2: ld returned 1 exit status

Now, did I really mess things up this bad ? :D
Could someone tell me what went wrong in my life

##### Share on other sites
First of all, it sounds like you didn''t get DJGPP''s C++ libraries. I could be wrong, but that would explain why the compiler couldn''t find iostream.

Second, with your initial Allegro problem: did you run ''make install''? Just running make won''t install the libs and headers. When make is finished, it tells you to type make install, then everything''s right where it should be.

If that''s the case, you should delete all those Allegro files you copied over to the DJGPP directories and try again.

##### Share on other sites
... darn... I forgot to make Install, but actually I think that I didn''t even see MAKE INSTALL after first make...this might be A) BUG or B) me with my night-blurry eyes

Well, I did what you told, and tried to compile something again... got this:

d:/janne/djgpp/lib/crt0.o(.data+0xc2):crt0.s: undefined reference to main''
d:/janne/djgpp/lib/libc.a(crt1.o)(.text+0x44e):crt1.c: undefined reference to main''
collect2: ld returned 1 exit status

... Any ideas? I DID delete ALL the old files, and I re-installed DJGPP and DID do every configures (set djgpp... paths)

##### Share on other sites

Now I have to say that IT''S TIME TO GO TO SLEEP!!! The reason for the last problem was that I tried to compile Allegros ROUTINE LIBRARIES without main... I think that I''m really starting to feel pretty sleepy when I''m doing stupid stuff like this

Well, so ALLEGRO WORKS 100% FINE RIGHT NOW

• 10
• 13
• 57
• 11
• 84