Have you tried adding the -MDelpi switch to the command? It sometimes helps. What version of fpc are you using? 2.4.0 perhaps?
Have you tried adding the -MDelpi switch to the command? It sometimes helps. What version of fpc are you using? 2.4.0 perhaps?
I once tried to change the world. But they wouldn't give me the source code. Damned evil cunning.
I use "{$MODE Delphi}" in most of my files, so I guess that means yes.
Also, I'm using Lazarus so commandline tricks don't really help (unless you can explain how to do the same thing with Laz).
Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.
You should use latest daily snapshot for windows Lazarus. The official release is way outdated.
Ok, are you referring to these?
http://www.hu.freepascal.org/lazarus/
I might give it a try, but first I'll explore my other options. I actually don't think that this is caused by using a different version.
Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.
I think that this error is caused by wrong version/format of the sdl.o file. Therefore deleting it and compiling again should work.meshtestproj.lpr(244,1) Error: Illegal COFF Magic while reading G:\n3d\repo\fpc-demos\precompiled\sdl.o
Maybe the win and linux fpc linkers require different format of the *.o files. This would explain why it compiles only on linux. As for Delphi, if I remember correctly, it uses .dcu files, not .o so also no problem there.
I finally managed to solve it.
It seems that the project was using the wrong version of sdl.pas (the one stored in the lazarus directories). Still not sure why that caused the "Undefined symbol" errors.
@Grudzio: Your explanation seems plausible. I'll keep it in mind for when I encouter the COFF magic error again.
Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.
Bookmarks