After compiling with the simple command as you suggested no *.obj is created but only an *.o file. Well, I tried with it and interestingly it's a totally different result: While I now get even more "unresolved external symbol" messages, the actual "myfunc" is not listed there anymore. So I assume, this worked.
However, as mentioned I now have a bunch of other messages. I elliminated a part of it by linking setupapi.lib, but there are still some left and I don't know how to solve that:
Unit1.o : error LNK2001: unresolved external symbol FPC_PUSHEXCEPTADDR
Unit1.o : error LNK2001: unresolved external symbol FPC_SETJMP
Unit1.o : error LNK2001: unresolved external symbol FPC_POPADDRSTACK
Unit1.o : error LNK2001: unresolved external symbol FPC_CATCHES
Unit1.o : error LNK2001: unresolved external symbol FPC_POPSECONDOBJECTSTACK
Unit1.o : error LNK2001: unresolved external symbol FPC_DESTROYEXCEPTION
Unit1.o : error LNK2001: unresolved external symbol FPC_RERAISE
Unit1.o : error LNK2001: unresolved external symbol FPC_POPOBJECTSTACK
Any idea how to get those symbols to be resolved correctly? I assume there's either some *.lib for that or I have to pass some parameters to the "fpc test.pas" command.